This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: XSLT feature request - element value templates!
- To: xsl-list at mulberrytech dot com
- Subject: Re: XSLT feature request - element value templates!
- From: Warren Hedley <w dot hedley at auckland dot ac dot nz>
- Date: Wed, 28 Jun 2000 15:18:13 -0400
- Organization: Department of Engineering Science, The University of Auckland
- References: <7784D3376646D311B082000021CF26243F81F9@PIKE> <200006281805.TAA16258@nag.co.uk>
- Reply-To: xsl-list at mulberrytech dot com
David Carlisle wrote:
>
> simplifying xsl:value down to {} would only deal with
> a relatively infrequent case, as normally in elements you are wanting
> some more structured data. using text like {} instead of an element node
This is where my original suggestion makes a little more sense.
<xsl:text template="{$a}/{$b}.html" />
This can still be inserted amongst other content elements, it just
provides a concise syntax for generating dense text nodes that
happens to be consistent with the avt syntax.
The {} characters can still be generated using good old
<xsl:text>{}</xsl:text>
and content which requires these characters must be handled in the
way we are accustomed to now.
David Carlisle wrote:
>
> having a more concise syntax for
> passing parameters would help a lot more
You're right - this would be number two on my list of annoying
things in XSLT. In particular, I'd like a facility for calling
templates as if they were functions inside of
<xsl:value-of select=" ... " />
elements, making those pesky recursive templates a whole lot
more concise. There are sure to be bugs in this example.
<xsl:template name="recursive_template">
<xsl:param name="p1" />
<xsl:param name="p2" />
<xsl:if test="not_finished">
<xsl:value-of select="template:recursive_template(
p1=$p1, p2=$p2)" />
</xsl:if>
</xsl:template>
--
Warren Hedley
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list