Backslashes aren't allowed in URIs, however the XML schema type xs:anyURI [1] allows much more than the URI RFC. Specifically it's lexical space is defined as "finite-length character sequences which, when the algorithm defined in Section 5.4 of [XML Linking Language] is applied to them, result in strings which are legal URIs according to [RFC 2396], as amended by [RFC 2732]." Backslashes are not interpreted as path separators but they are allowed in xs:anyURI values. Xerces-J accepts "file:///c:\testing\bla.jpg" as a valid xs:anyURI value. If Xerces-C rejects it then it has a bug.
Thanks. [1] http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] John Snelson <[EMAIL PROTECTED]> wrote on 04/28/2008 05:26:17 AM: > This doesn't validate because backslashes aren't valid in URIs. It's > common to find URI implementations that accept backslashes and deal with > them, but that doesn't mean they are valid. > > John > > tomer_shim wrote: > > Hello, > > > > I'm getting the error "<some_path> is NOT a valid URI". > > An example path is: file:///c:\testing\bla.jpg . > > > > It seems that when I try to replace all the '\' with '/' it works. Why a > > path with backslashes isn't doesn't pass validation? > > > > Thank you for the support. > > > -- > John Snelson, Oracle Corporation http://snelson.org.uk/john > Berkeley DB XML: http://oracle.com/database/berkeley-db/xml > XQilla: http://xqilla.sourceforge.net
