When I parse an instance doc with the SchemaTypeSystem.parse() method, 
I end up with an object of class 
        "org.apache.xmlbeans.impl.values.XmlComplexContentImpl"

instead of the expected "ConfigServerConfigDocument". The STS is the union
of the built-in (and scomp-compiled, I assume) types and the subject schema.

It looks to me like it's not recognizing the root element, even though 
the instance object succesfully passes validation - what am I doing wrong?

        - Andy

XmlObject schemaObject = schemaDocAsXmlObject.selectChildren(new 
QName("http://www.w3.org/2001/XMLSchema";, "schema"))[0];
SchemaTypeSystem sts = XmlBeans.compileXsd(new XmlObject[] { schemaObject }, 
XmlBeans.getBuiltinTypeSystem(), compileOptions);
XmlObject xml = configSchema.sts.parse((String)doc, configSchema.docSchemaType, 
options);

Schema has:
<xml-fragment targetNamespace="http://lett.com/ns/netconf/server/config/1.0"; 
... >
    <xs:element name="config-serverConfig" type="ncsc:configServerConfigType"/>
...
</xml-fragment>

instance doc has:
<config-serverConfig xmlns="http://lett.com/ns/netconf/server/config/1.0";>
  <daemonConfig/>
...
</config-serverConfig>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to