Also, it's not safe to assume that the prefix of the schema element will have the same binding as on the assert element.
>From SVN rev 836132: > assertImpl.setXsdNamespacePrefix(schemaDoc.fSchemaElement.getPrefix()); The prefix could be redeclared and bound to some other namespace. For example: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <bar:element xmlns:xs="http://www.something.else.com" xmlns:bar="http://www.w3.org/2001/XMLSchema" name="foo"> ... </bar:element> </xs:schema> Again, this could all be handled cleanly by pulling the in-scope namespaces from the SchemaNamespaceSupport at the point where we're traversing the xs:assert. Thanks. Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [email protected] E-mail: [email protected] Michael Glavassevich <[email protected]> wrote on 11/14/2009 01:54:21 PM: > Hi Mukul, > > I'm still scratching my head over how this is implemented, now with > specialized methods for getting and setting prefixes for the schema > and F&O namespaces. We shouldn't need to special case them. These > namespaces are no more or less special than the user's namespaces > and really all should be pulled from the SchemaNamespaceSupport in > the traverser. We should be able to copy all of the in-scope > namespace bindings from the SchemaNamespaceSupport object on to the > static context in PsychoPath and that will include bindings for the > schema and F&O namespaces if they exist. Is that what you were > ultimately planning to do, with these recent changes just being an > intermediate step to eliminate the hard-coding which was there before? > > Thanks. > > Michael Glavassevich > XML Parser Development > IBM Toronto Lab > E-mail: [email protected] > E-mail: [email protected] > > Mukul Gandhi <[email protected]> wrote on 11/14/2009 10:57:10 AM: > > > Hi all, > > I wrote a quick blog post, trying to explain what these bug fixes > > and enhancments achieved. ref, > > http://mukulgandhi.blogspot.com/2009/11/xerces-j-xsd-11-update-bug- > > fixes-and.html. > > > > Any comments are welcome please. > > > > On Sat, Nov 14, 2009 at 1:16 PM, Mukul Gandhi <[email protected]> wrote: > > > Hi all, > > > The improvements for XSD namespace prefix which we are discussing > > > in this thread, while using XSD 1.1 assertions and also CTA (when > > > using the full XPath 2 mode) have gone into SVN. > > > > > > Interestingly, solving the XSD namespace prefix issue for assertions, > > > has fixed the same problem which existed in Xerces CTA implementation. > > > > > > I am satisfied with the current Xerces SVN code's functional > > > capabilities for assertions and CTA. The new Xerces SVN code after > > > this commit has a same functional capability as before, but with the > > > XSD namespace prefix enhancements, which we discussed in this thread. > > > > > > It would be great, if anybody may like to test the newly committed > > > code, and suggest possible improvements. > > > > > > > > -- > > Regards, > > Mukul Gandhi > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected]
