xsl-list
[Top] [All Lists]

Re: building path expressions around dynamic element node names

2005-05-18 05:29:20
Sorry still some problems.

David Carlisle wrote:

Also, I wanted to know how to access <Dynamic1> when the control is inside B/Class

lots of ways:

ancestor::Dynamic1
or
../parent::Dynamic1

So I tried Omprakash and your solution to checking a node name as well as accessing the node from a grand-child into one but there are problems with my syntax. Here is what I tried

<xsl:if test="../parent::node(.)=..//preceding-sibling::A/Class/text()"><!--Checking if the ancestor node equals the A/Class text. -->
        <here>nfhg</here>
</xsl:if>

Tried this as well
<xsl:variable name="AValue" select="..//preceding-sibling::A/Class/text()"/>
<xsl:if test="../parent::node(.)=$AValue"><!--Checking if the ancestor node equals the A/Class text. -->
        <here>nfhg</here>
</xsl:if>

Am I at a  tangent from the right solution and what is it ?

Thanks
Rahil

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