You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Alberto Massari (JIRA)" <xe...@xml.apache.org> on 2006/05/12 23:22:09 UTC

[jira] Resolved: (XERCESC-1581) anyURI spaces rejected, while RFC allows them

     [ http://issues.apache.org/jira/browse/XERCESC-1581?page=all ]
     
Alberto Massari resolved XERCESC-1581:
--------------------------------------

    Resolution: Fixed

Fix is in SVN. Please verify.

> 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/#anyURI
> As 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=18785
> Is 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@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org