if (base != null) {
String b = expandQName(ctx.getDefaultNS(),base, ctx.getModel());
Statement s = subject.getProperty(RDF.value);
if (s!=null) xs.toXMLText(e,s.getObject(),b,null,ctx);
else if (b.equals(schema.ID) && !subject.isAnon())
e.appendChild(doc.createTextNode(subject.getLocalName()));
}
// add attributes that extend simple content
for (int i = 0; _attribute != null && i < _attribute.length; i++)
_attribute[i].toXML(e, subject, pending,ctx);
for (int i = 0; attributeGroup != null && i < attributeGroup.length; i++)