https://saxonica.plan.io/https://saxonica.plan.io/favicon.ico2019-12-18T00:02:00ZSaxonica Developer CommunitySaxon - Bug #4413: resolve-uri() function also normalises consecutive spaceshttps://saxonica.plan.io/issues/4413?journal_id=146472019-12-18T00:02:00ZMichael Kaymike@saxonica.com
<ul></ul><p>I've reproduced this effect. Saxon is carefully escaping the spaces as %20 so that the Java JDK URI class doesn't barf on the URIs, and is then unescaping each %20 back to a space. The final step is to turn the resulting string into an instance of <code>xs:anyURI</code>, and it's at this stage that multiple spaces are being collapsed: the <code>xs:anyURI</code> type in XSD has the facet whitespace=collapse which means that the value space does not allow strings with consecutive spaces.</p>
<p>(XSD 1.1 part 2 is actually a bit inconsistent on this. It claims that the value space allows all sequences of characters, but by imposing the whiteSpace=collapse facet, it effectively constrains the value space. I've heard some XSD gurus say this is OK, the value space can include "ineffable" values that have no string representation; but this is hardly practical).</p>
<p>Given the fact that resolve-uri() is defined to return an xs:anyURI and that casting a string to xs:anyURI collapses whitespace, I don't think we can treat this as a bug, however inconvenient it might be.</p> Saxon - Bug #4413: resolve-uri() function also normalises consecutive spaceshttps://saxonica.plan.io/issues/4413?journal_id=146482019-12-18T01:38:14ZMatthew Hutchins
<ul></ul><p>Thanks for that.
This is my first Saxonica bug report, so not sure if I am responsible for marking it as cancelled/resolved, and if so, how to do it.</p> Saxon - Bug #4413: resolve-uri() function also normalises consecutive spaceshttps://saxonica.plan.io/issues/4413?journal_id=146552019-12-19T17:20:14ZMichael Kaymike@saxonica.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li><li><strong>Assignee</strong> set to <i>Michael Kay</i></li></ul><p>Closed as invalid. The product is behaving as designed, even if it's surprising.</p>