This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 3055 - [F+O] How does iri-to-uri() handle an invalid IRI?
Summary: [F+O] How does iri-to-uri() handle an invalid IRI?
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Functions and Operators 1.0 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Ashok Malhotra
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-28 09:59 UTC by Michael Kay
Modified: 2006-11-16 18:52 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2006-03-28 09:59:06 UTC
The new rules for iri-to-uri() agreed in

http://www.w3.org/Bugs/Public/show_bug.cgi?id=2457

do not say how an invalid IRI should be handled: for example, a string that is not a valid IRI because it contains a space character.

There are two options: we define a new error code, or we say that invalid characters should be %HH-encoded.

Because it is common practice to use a space in a URI with the expectation that it will be encoded as %20, I suggest that we use the latter approach.
Comment 1 Ashok Malhotra 2006-04-18 22:12:09 UTC
On the 2006 April 18 telcon the joint WGs agreed to add the following words to the description of fn:iri-to-uri: If $uri-part contains an invalid character, such as a space character, the invalid character is 
replaced by its percent-encoded form as described in [rfc3986] before the conversion is performed.

The WGS also asked that a note be added saying that this function does not check whether $uri-part was a legal IRI; it merely operates on the characters in $uri-part.