This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: RE: syntax sugar for call-template
- To: "'Jeni Tennison'" <mail at jenitennison dot com>
- Subject: RE: [xsl] RE: syntax sugar for call-template
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Sat, 17 Feb 2001 09:16:25 -0000
- Cc: <xsl-list at lists dot mulberrytech dot com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
> 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"/>
<a/>
<xsl:return select="$x+1"/>
</xsl:function>
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: http://www.mulberrytech.com/xsl/xsl-list