[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-c-dev
Subject:    [jira] Created: (XERCESC-1581) anyURI spaces rejected, while RFC
From:       "Chris Storah (JIRA)" <xerces-c-dev () xml ! apache ! org>
Date:       2006-03-27 5:01:18
Message-ID: 663273608.1143435678817.JavaMail.jira () ajax
[Download RAW message or body]

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic