// its typed-value is its dm:string-value as an xdt:untypedAtomic.
// - If the element has a complex type with mixed content (including xs:anyType),
// its typed-value is its dm:string-value as an xdt:untypedAtomic.
return new UntypedAtomicValue(stringValue());
} else if(t instanceof ComplexType) {
ContentType ct = ((ComplexType) t).getContentType();
if(ct.isType(ContentType.EmptyContent)) {
// - If the element has a complex type with empty content, its typed-value
// is the empty sequence.
return ValueSequence.<AtomicValue> emptySequence();
} else if(ct.isType(ContentType.SimpleContent)) {
// - If the element has a simple type or a complex type with simple content,
// the result is a sequence of zero or more atomic values.
return new UntypedAtomicValue(stringValue().toString());
}
}