
Andrew Welch wrote:
But I think more like Andrew: maybe making @href optional doesn't make sense? I guess that's a question for XSL List.
No it makes sense that it's optional to me - it doesn't make sense if omitting it returns the URI of the stylesheet.
Well, returning the URI of the stylesheet sounds weird to me. If the @href effective value is a relative URI, it is resolved against the base output URI. While it is implementation-defined, I would be surprised by an implementation setting the base output URI to the stylesheet URI.
Another way of looking at it is:
<xsl:template match="/"> </xsl:template>
and
<xsl:template match="/"> <xsl:result-document> </xsl:result-document> </xsl:template>
are equivalent where the xsl:result-document instruction is implied in the first instance, and explicit in the second. Both create document nodes in the result tree.
More exactly both create a final result tree (and the former will create a final result tree only if it is the initial template.) So really, I don't see the usefulness of having @href optional (but I think I don't have enough imagination here.) Regards, -- Florent Georges http://www.fgeorges.org/