RE: [xsl] RE: syntax sugar for call-template

Subject: RE: [xsl] RE: syntax sugar for call-template
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Sat, 17 Feb 2001 09:16:25 -0000
> Isn't the very fact that the template is being called in the context
> of an XPath expression enough to indicate that its contents aren't
> going to be written to the result tree? The same sort of thing happens
> with templates that are called within variables...

I wanted to be quite clear that

<xsl:function name="increment">
   <xsl:param name="x"/>
   <xsl:return select="$x+1"/>

is an error, and I felt it would be harder to state this clearly and give
clear error messages if <xsl:function> and <xsl:template> were coalesced
into a single construct.

I think it's better that this should be an error than that the <a/> element
is written to some "black hole" output destination. Certainly, <a/>
shouldn't be written to the final result tree, which it would be in a
template called using xsl:call-template.

Mike K

 XSL-List info and archive:

Current Thread