[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

xs:anyURI allows a space

Subject: xs:anyURI allows a space
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Mon, 16 Jul 2007 15:11:06 +0100
 xs:anyURI allows a space
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.