|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Crazy idea
Francis Norton <francis@xxxxxxxxxxx> wrote:
> ... a function call typically takes a single line, maybe less than
> one line. If I'm trying to keep my code legible then each parameterised
> named template call will take about 2+n lines where n is the number of
> parameters; eg:
>
> <!-- generate and implictly pass back a result object -->
> <xsl:call-template name="valid-choice">
> <xsl:with-param name="tree-count" select="$tree-count" />
> <xsl:with-param name="content-list" select="$content-list" />
> <xsl:with-param name="valid-pattern" select="$valid-pattern" />
> </xsl:call-template>
Yes, that's pretty annoying. It would have been so very nice if it were
possible to write:
<xsl:call-template name="its-name" some-param-name="..."
another-param-name="..."/>
As long that the parameter names don't clash with XSL attributes - XSLT
could declare it would never define any attribute whose name matches some
pattern (ends with "-param", say?). Today I've got little pieces of code
which would be functions in any other language, but it turns out that the
call to a named template is longer then the code it replaces!
Have fun,
Oren Ben-Kiki
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








