xsl-list
[Top] [All Lists]

Re: [xsl] What is the Core of XSLT?

2014-03-29 18:55:10
On Sat, Mar 29, 2014 at 4:13 PM, Abel Braaksma (Exselt) 
<abel(_at_)exselt(_dot_)net> wrote:
I meant:

   <xsl:apply templates select="my:specialNode[condition-here]"/>

  .   .   .   .   .   .   .   .

  <xsl:template match="my:specialNode">

     <!-- Whatever needs to be done   -->
  </xsl:template>


Where did I say that we need to apply templates on non-nodes?


You didn't. What I meant is that I don't think you can do everything
with XSLT 1.0 that you can do now with a subset that does not include
xsl:if (xsl:choose can be implemented in xsl:ifs). For XSLT 2.0, you can
apply predicates on sequences, which I think would suffice to replace
xsl:if, but in XSLT 1.0 you cannot, as far as I can recall.


I hope that the provided code above shows clearly that conditional
operations can be completely eliminated by using <xsl:apply-templates>
regardless of the version of XSLT.

If in doubt, please provide an example.


Cheers,
Dimitre Novatchev

--~------------------------------------------------------------------
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>