// TODO
}
context.addFirst(typeInfo);
// attributes
int len = atts.getLength();
Attributes2Impl atts2 = new Attributes2Impl();
int count = 0;
for (int i = 0; i < len; i++)
{
String attUri = atts.getURI(i);
String attLocalName = atts.getLocalName(i);
String attQName = atts.getQName(i);
String attValue = atts.getValue(i);
if (XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI.equals(attUri))
{
continue; // ?
}
QName attName = new QName(attUri, attLocalName);
AttributeDeclaration attDecl =
(AttributeDeclaration) schema.attributeDeclarations.get(attName);
boolean declared = (attDecl != null);
String attType = (attDecl != null) ?
attDecl.datatype.toString() : "CDATA";
XMLSchemaAttributeTypeInfo attTypeInfo =
new XMLSchemaAttributeTypeInfo(schema, attDecl, true);
attributes.add(attTypeInfo);
atts2.addAttribute(attUri, attLocalName, attQName, attType, attValue);
atts2.setDeclared(count, declared);
atts2.setSpecified(count, true);
count++;
}
// add defaulted attributes to atts2
// TODO
// atts2.setSpecified(count, false);