This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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.
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.