DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10251>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10251 namespace comparison for included schema Summary: namespace comparison for included schema Product: Xerces2-J Version: 2.0.1 Platform: All OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: XML Schema Structures AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Problem found in Xerces-J-2.0.2, which is not yet listed in the version dropdown. Given a schema foo.xsd that includes bar.xsd, if both schemas have the same targetNamespace, Xerces incorrectly reports that both schemas must have the same targetNamespace. The problem should be reproducible with the XMLGrammarBuilder sample (although we also had to write an entityResolver to process the included schemas). The actual bug is in org.apache.xerces.impl.xs.traversers.XSDHandler.java, line 528, method constructTrees. The block which reads: // if the referred document has a target namespace differing // from the caller, it's an error else if (callerTNS != currSchemaInfo.fTargetNamespace) { reportSchemaError(NS_ERROR_CODES[referType][secondIdx], new Object [] {callerTNS, currSchemaInfo.fTargetNamespace}, DOMUtil.getRoot(schemaRoot)); return null; } should read: // if the referred document has a target namespace differing // from the caller, it's an error else if (!(callerTNS.equals(currSchemaInfo.fTargetNamespace))) { reportSchemaError(NS_ERROR_CODES[referType][secondIdx], new Object [] {callerTNS, currSchemaInfo.fTargetNamespace}, DOMUtil.getRoot(schemaRoot)); return null; } (i.e., changing the String comparison from using != to using the String.equals () method). --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
