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

mozer
Tue Oct 28 06:46:37 CDT 2008


On Tue, Oct 28, 2008 at 12:22 PM, Andrew Welch <> wrote:
> Hi,
>
> Congratulations on integrating Saxon-SA - a great move!
>
> 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

Regards,

Xmlizer



More information about the oXygen-user mailing list