I need to be able to parse (either via DOM or SAX) an XML with namespace
spread out in several schema; this means the final type could reside in an
embedded schema a couple level deeper. I need to tell if an element is
defined as a simple type or as an array type.
I took the sample jaxp.TypeInfoWriter (because I also need access
to org.w3c.dom.TypeInfo); then to add a org.apache.xerces.xs.PSVIProvider to
private PSVIProvider fPSVIProvider;
and set it this way,
org.apache.xerces.parsers.SAXParser saxParser = new
fPSVIProvider = (PSVIProvider)saxParser;
However, in the startElement( ... ) method, I did this,
unfortunately, elemPSVI is always null no matter how I configure the schema
So, is my approach workable? if yes, what I did wrong. Or is there better
Also, I tried out-of-box simpletype.DatatypeInterfaceUsage sample on the
provided personal.xsd and personal-schema.xml; I found the same result. But
I found the underlying parsers are different between the two samples. One
org.apache.xerces.jaxp.SAXParserImpl, which inherits
the other uses,
I found although they have the same simple name, they don't overlap at all.
So how to choose which to use one or the other?