Hi Michael, I think, I need to get XSD namespace prefix within XMLSchemaValidator, so that I can pass it to the PsychoPath interface.
To get the XSD namespace prefix, I was thinking to somehow access the XSDocumentInfo object within XMLSchemaValidator.java. Getting XSD namespace prefix from XSDocumentInfo is possible via, the object "protected Element fSchemaElement", which is the root of XSD document tree. But looking at the Xerces code for a while, I cannot find a means to get access to XSDocumentInfo object from within XMLSchemaValidator. Could you please suggest, what will be the correct approach to do this (i.e, accessing XSD namespace prefix from within XMLSchemaValidator)? On Thu, Nov 12, 2009 at 2:35 AM, Michael Glavassevich <[email protected]> wrote: > Hi Mukul, > > As you've noted "http://www.w3.org/2001/XMLSchema" can be bound to other > prefixes than "xs". Also, "xs" could be bound to something other than > "http://www.w3.org/2001/XMLSchema" or not be declared at all. > > We should not be hard-coding the namespace bindings. For each XPath > expression they should be determined from the namespace context of the > schema we're processing and I believe also the and the > "xpathDefaultNamespace" attribute which might be on the "assertion" or > "schema" element if the assertion doesn't have one. Doing anything else is > incorrect. > > Thanks. > > Michael Glavassevich > XML Parser Development > IBM Toronto Lab > E-mail: [email protected] > E-mail: [email protected] -- Regards, Mukul Gandhi --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
