xsl-list
[Top] [All Lists]

Re: [xsl] How can I know if a node has already been processed ?

2008-11-06 18:06:18
Thanks for your reply, M. Carlisle. It's very detailed and I looked at
your ctop.xsl and understood (I thnik) what you mean with the
apply[*[1][self::mml:inverse]] "trick". It might have been a solution,
but meanwhile, I've still been searching and found the "intermediate
tree" technique, which is very simple and I'm a bit upset with myself
that I didn't think of it earlier. Found this example in the W3C XSLT
2 recommandation :
-------------------------------------
<xsl:stylesheet
  version="2.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

<xsl:import href="phase1.xsl"/>
<xsl:import href="phase2.xsl"/>

<xsl:variable name="intermediate">
  <xsl:apply-templates select="/" mode="phase1"/>
</xsl:variable>

<xsl:template match="/">
  <xsl:apply-templates select="$intermediate" mode="phase2"/>
</xsl:template>

</xsl:stylesheet>
----------------------------------

So I process the mathml once first adding an attribute to the nodes I
don't want to process twice and it works. Plus, this technique will be
useful for many other things.

Thank you
Frédéric

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