[ https://issues.apache.org/jira/browse/XERCESC-1659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Boris Kolpackov closed XERCESC-1659. ------------------------------------ Resolution: Fixed The fix is in SVN. All test cases now pass with multi-import support enabled. > Order sensitivity in schemaLocation and noNamespaceSchemaLocation > ----------------------------------------------------------------- > > Key: XERCESC-1659 > URL: https://issues.apache.org/jira/browse/XERCESC-1659 > Project: Xerces-C++ > Issue Type: Bug > Components: Validating Parser (XML Schema) > Affects Versions: 3.1.0 > Environment: all > Reporter: Boris Kolpackov > Assignee: Boris Kolpackov > Fix For: 3.1.0 > > Attachments: test-case-1.tar.gz, test-case-2.tar.gz > > > I am attaching two test cases (each consists of 3 schemas plus an XML > instance). If you try to run domprint on the first test case, you will get > the following error: > $ domprint -v=always -n -s -f test-users.xml > Error at file "test-users.xml", line 6, column 78 > Message: Unknown element 'b:UserDatabase' > If you change the order of the schemaLocation and noNamespaceSchemaLocation > attributes in test-users.xml then the error disappears. > The second test case is a slight modification of the first test case with the > only difference being the schemas with targetNamespace are now do not have a > namespace, and the schema that used to be without a namespace > (derived-user-config.xsd) now is in a namespace. If you run domprint on this > test case, you will get the following error: > $ domprint -v=always -n -s -f test-users.xml > Error at file "test-users.xml", line 6, column 55 > Message: Unknown element 'UserDatabase' > This seems to prove that for Xerces-C++, for some reason, it is important > that the schema that declares the root element is mentioned in the first > *Location attribute (nor matter whether schemaLocation or > noNamespaceSchemaLocation). Now comes the surprise: if we reverse the order > of the two attributes in the second test case, domprint terminates with > segmentation fault. Examination of the core points to the IGXMLScanner.cpp, > line 2288: > elemDecl = fGrammar->getElemDecl( > uriId, nameRawBuf, qnameRawBuf, currentScope > ); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org For additional commands, e-mail: c-dev-h...@xerces.apache.org