xsl-list
[Top] [All Lists]

Re: [xsl] XSL and XML Help

2006-10-17 09:50:13
Hi again,

At 01:30 PM 10/16/2006, Dr KM wrote:
> In XSLT 1.0, indeed, the content of a for-each instruction
> is formally called a "template", while what we commonly
> call a "template" is actually named a "template rule"
> (which usage I see you observe :-).

  Yes, there were a lot of confusion between "template" and
"template rule".  So XSLT 2.0 replaced "template" by
"sequence constructor".  But in your initial sentence above,
I guess you meant "template rule", isn't it ?-)

Indeed. As one generally does, when speaking (loosely) of XSLT 1.0. This "attraction" of terms is implicitly warranted (confusing though it can be) by the element name for the element declaring a template rule, namely "template". :-)

> I suppose this is also not the case in XSLT 2.0?

  Mmh, I'm not sure what you mean here?

You just explained it, as well as illustrated it using xsl:function (in XSLT 2.0). As for that -- well, functions are cool (I use them happily when writing 2.0), but the collective XSLT mind has barely begun to get our collective head around their many implications for stylesheet design, maintenance and performance. (We'll get there.) It's early days, but I suppose one might argue that using xsl:apply-templates inside a function declaration in general might lean towards bad form, as a function would seem to cross the line from tree transformation (building result trees) to data processing (returning values) ... why not use an xsl:call-template?

But I think we've now taken this beyond where the OP wanted to go (but thanks anyway: we do like to be thorough).

Cheers,
Wendell


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>