xsl-list
[Top] [All Lists]

[xsl] xs:anyURI allows a space

2007-07-16 07:11:25
What is it that xs:anyURI allows a space, but Java's URI class does
not (when using the single argument constructor) ?

If makes it difficult when resolving relative paths in the URIResolver
as something that's a valid xs:anyURI in a call to doc() causes a
URISyntaxException in Java when it hits the resolver - don't they both
sing from the same rec?

The solution it seems is to manually %HH escape the spaces (and use
the single arg constructor), or manually deconstruct the href and then
use the appropriate constructor, eg for the relative href "the
file.xml":

new URI(null, null, href, null)

Neither seems like the right way.

Related-but-possibly-Saxon-specific-question: Should the href argument
that's passed to the resolve(href, base) method in the URIResolver be
%HH encoded - the base argument is, but the href argument comes
through exactly as it's written in the stylesheet ?


--
http://andrewjwelch.com

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>