[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: RE: syntax sugar for call-template

Subject: Re: RE: syntax sugar for call-template
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Mon, 19 Feb 2001 09:16:18 +0000
xslt functions string call template
Hi Clark,

> There are two seperate items:
>
>   (a) making a way to define 'xpath' functions
>       from within XSLT (thus it must be a function
>       and support boolean, string, node-set, and
>       number data types)
>
>   (b) a less verbose call-template syntax
>
> I'm after the latter, while it appears many on this list are
> designing the former.

But the former will go some way to achieving the latter, so hopefully
make everyone more content :) Rather than:

<xsl:call-template name="func">
   <xsl:with-param name="arg" select="val" />
</xsl:call-template>

or:

<xf:func arg="val" />

you will be able to do:

<xsl:copy-of select="func(val)" />

or possibly:

<xsl:copy-of select="exsl:call('func', 'arg', val)" />

Admittedly, it doesn't meet all your requirements, specifically
because it looks as though it's likely that you won't be able to call
existing templates with it - if you can call a template with a
function call then you can't call it with xsl:call-template.

I don't think anyone's objecting to you using your shorter syntax and
then doing a pre-pass on the stylesheet to create something that runs.
In XSLT 2.0 it looks as though you should be able to define your own
extension elements that will make your shorter syntax very easy to
use (see Requirement 2.10).

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.