anyURI spaces rejected, while RFC allows them
---------------------------------------------
Key: XERCESC-1581
URL:
http://issues.apache.org/jira/browse/XERCESC-1581 Project: Xerces-C++
Type: Bug
Components: Validating Parser (Schema) (Xerces 1.5 or up only)
Versions: 2.7.0
Environment: Windows XP, Linux, Mac OSX Tiger
Reporter: Chris Storah
When validating an instance document based on a schema that uses the xs:anyURI datatype, spaces cause a validation error to be thrown (and the following message is displayed):
Message: Datatype error: Type:InvalidDatatypeValueException, Message:Value 'urn:abc:v1 schema.xsd' is NOT a valid URI .
Although the schema specification says spaces should be avoided, in this case the document is coming from an external source so spaces are used.
See
http://www.w3.org/TR/xmlschema-2/#anyURIAs the URI validation code calls XMLUri::isValidURI, the problem can be emulated using the code:
XMLCh* test = X("urn:abc:v1 schema.xsd"); // fails
//XMLCh* test = X("urn:abc:v1%20schema.xsd"); // works
bool valid = XMLUri::isValidURI(true, test);
Also, I notice that Xerces-J had a similar problem:
http://issues.apache.org/bugzilla/show_bug.cgi?id=18785Is this a bug?
If not, is there anyway around this problem - apart from replacing spaces with their escaped versions prior to parsing?
Chris
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa-
For more information on JIRA, see:
http://www.atlassian.com/software/jira---------------------------------------------------------------------
To unsubscribe, e-mail:
c-dev-unsubscribe@...
For additional commands, e-mail:
c-dev-help@...