[oXygen-user] xsl:result-document with no href causes "Cannot write to a URI that has already been read" err-XTRE1500

Andrew Welch
Tue Oct 28 06:54:34 CDT 2008


>> I think there is a slight issue, this stylesheet (when run against
>> itself with no output file given) causes the exception "Cannot write
>> to a URI that has already been read":
>>
>> <xsl:stylesheet
>>    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>>    version="2.0">
>>
>> <xsl:template match="/">
>>    <xsl:result-document validation="strict">
>>        <foo/>
>>    </xsl:result-document>
>> </xsl:template>
>>
>> </xsl:stylesheet>
>
> Well
>
> XSLT 2.0 Spec says
>
> [[
> The href attribute is optional. The default value is the zero-length
> string. The effective value of the attribute must be a URI Reference,
> which may be absolute or relative. There may be implementation-defined
> restrictions on the form of absolute URI that may be used, but the
> implementation is not required to enforce any restrictions. Any legal
> relative URI must be accepted. Note that the zero-length string is a
> legal relative URI.
> ]]
> it means that absence of @href is equivalente to "" which means the
> base URI so the document itself
>
> So the error is ok from this perspective


That doesn't seem right to me - you can never write to the same URI,
so why would @href be optional?

I'll raise it on the xsl-list...



-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/



More information about the oXygen-user mailing list