I could be wrong, but I think Xerces should do the escaping for you,
according to the rules of XLink 5.4. See
http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#anyURI
Escaping spaces is not possible in the case of xsi:schemaLocation
because it is a space-separated list, but I would expect escaping to be
possible for xsi:noNamespaceSchemaLocation.
Mark.
On 28 Oct, 2005, at 4:45 pm, Nigel Kibble wrote:
I tried escaping the spaces within the name (using %20) but this
didn’t resolve the issue.
It seems Xerces is struggling to open a schema document with spaces
in the name.
Regards,
Nigel.
-----Original Message-----
From: Peter Hendry [mailto:[EMAIL PROTECTED]
Sent: 28 October 2005 15:36
To: [email protected]
Subject: Re: Xerces validation with schema (blanks in file name)
Should the spaces be encoded as %20 ?
Pete
Nigel Kibble wrote:
Hi,
I’m trying to use Xerces to validate an XML document that references
an external schema .XSD. The .XSD file name contains blanks in the
name, and this seems to be causing Xerces to be unable to open the
schema document.
Whenever I try to run my app it results in the error
”Failed to read schema document 'Tradacoms CORHDR 6.xsd', because 1)
could not find the document; 2) the document could not be read; 3) the
root element of the document is not <xsd:schema>.”
The reference within the XML document is:
<?xml version="1.0" encoding="UTF-8" ?><CORHDR_6
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="Tradacoms CORHDR 6.xsd">
If I replace the spaces with another character (ie underscore) and
rename the .XSD file accordingly then everything works OK. Is this a
bug / feature of Xerces, or is there something I can do to workaround
this?
I’d really appreciate any guidance you can give me with this.
Best regards,
Nigel Kibble.
-
----------------------------------------------------------------------
This message has been checked for any known virus by MessageLabs.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] For
additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]