Re: [xsl] Will an <xsl:result-document> with no href attribute override the current stylesheet?

Subject: Re: [xsl] Will an <xsl:result-document> with no href attribute override the current stylesheet?
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Sun, 15 Dec 2013 18:45:57 -0500
At 2013-12-15 15:26 -0800, Dimitre Novatchev wrote:
The W3C XSLT 2.0 Specification says (about the href attribute of

"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 isn't absolutely clear, but I am interpreting this to mean that no href attribute is equivalent to:


The rules of resolving a relative literal-URI when applied in this
case should produce the URI of the current stylesheet -- same as

I disagree. I understand (and I rely on it in my current project) that a relative URI is relative to the specified output URI. I specify dozens of file names without paths and all of the files show up in the specified output directory.

Will an <xsl:result-document> instruction with missing or empty href
attribute overwrite the current stylesheet?


If I invoked, say, Saxon with -o:/Users/admin/t/out/myfile.html

Then the zero-length URI would have the URI: /Users/admin/t/out/myfile.html

I hope this helps.

. . . . . . Ken

-- Public XSLT, XSL-FO, UBL & code list classes: Melbourne, AU May 2014 | Contact us for world-wide XML consulting and instructor-led training | Free 5-hour lecture: | Crane Softwrights Ltd. | G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx | Google+ profile: | Legal business disclaimers: |

Current Thread