This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Testing for Parent Nodes of multiple types
- To: "Xsl-List" <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] Testing for Parent Nodes of multiple types
- From: "Ciaran Byrne" <ciaran dot byrne at 3tl dot com>
- Date: Wed, 14 Mar 2001 16:36:04 -0800
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi all,
In my content I am testing for the parent of
my context node. The parent can be one of several different
elements.
For example, let's say that the parent of the element 'b' can
be 'p','b','i','u','td'.
At the moment in my xsl:if I have the node test
<xsl:if test="parent::p or parent::b or parent::i or parent::u or
parent::td">
...
</xsl:if>
Is anyone aware of a more efficient way to implement this ?
Thanks,
Ciaran.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list