Issue Details (XML | Word | Printable)

Key: XERCESJ-1039
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Michael Glavassevich
Reporter: Lucian Holland
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Xerces2-J

Target namespaces containing a space cause spurious errors

Created: 26/Jan/05 09:11 PM   Updated: 07/Feb/05 09:31 PM
Return to search
Component/s: XML Schema 1.0 Structures
Affects Version/s: 2.6.2
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
XML File Licensed for inclusion in ASF works acme.xsd 2005-01-26 09:26 PM Lucian Holland 0.5 kB
Environment: java 1.4 running on linux

Resolution Date: 28/Jan/05 05:59 AM


 Description  « Hide
In a schema which has a space in the target namespace, references to other components in the schema fail. I believe that this is because the targetNamespace is escaped by the schema loader, but the corresponding prefix binding does not get escaped. As a result the parser thinks that the prefix refers to a different namespace to that of the current schema! The attached schema demonstrates this. Note that it works if you bind a prefix to a pre-escaped version of the namespace. Obviously namespaces containing unescaped spaces are not a great idea, but it would be helpful if Xerces was consistent in its behaviour and failed in a slightly more explicit fashion on this.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Lucian Holland added a comment - 26/Jan/05 09:26 PM
Schema that shows the problem.

Michael Glavassevich added a comment - 28/Jan/05 05:59 AM
To validate an anyURI we apply the escaping rules from XLink to make it a URI that we then validate with Xerces' URI class. We were returning the escaped value instead of the original as the actual value. This was affecting all anyURIs containing characters excluded by RFC 2396. Thanks for catching this. A fix is now in CVS.

Lucian Holland added a comment - 07/Feb/05 07:20 PM
Sorry - didn't get round to verifying this until now. All works fine now - thanks for the quick turnaround!