xsl-list
[Top] [All Lists]

Re: Halt rendering of nodes based on node id!!

2005-02-17 15:15:02
Tempore 11:33:06, die 02/17/2005 AD, hinc in xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com scripsit Adam J Knight <adam(_at_)brightidea(_dot_)com(_dot_)au>:

Question:
Given the following xml/xsl files:
How do I stop stylesheet rendering or exclude nodes from rendering once a
particular nodes children are rendered. Ie: If the current node selected is node with id(10); it, its ancestors and its children are displayed. However, the children of its children(12,13) are not rendered.
Hi,

The node with id(10) has no descendants with id(12) or id(13)

The modification I believe will need to occur here:
<xsl:apply-templates select="//tree_node[parent::tree or
ancestor::tree_node[(_at_)id=$id]]"/>

I didn't quite understand your question, but you might try this:

<xsl:variable name="TheNode" select="//tree_node[(_at_)id=$id]"/>
<xsl:apply-templates select="$TheNode/ancestor-or-self::tree_node | $TheNode/child::*"/>


Btw, the number of exclamation marks in the subject line of a post tends to be inversely related to the number of responses and the quality of their content.


regards,
--
Joris Gillis (http://www.ticalc.org/cgi-bin/acct-view.cgi?userid=38041)
"Φιλήκοον ειναι μαλλον η φιλόλαλον" - Κλεόβουλος

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