|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSLT feature request - element value templates!
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








