This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: How to find parent's-parent's-sibling-sibling name
- From: "Vasu Chakkera" <vasucv at hotmail dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Thu, 19 Sep 2002 08:31:50 +0000
- Subject: Re: [xsl] How to find parent's-parent's-sibling-sibling name
- Reply-to: xsl-list at lists dot mulberrytech dot com
And I hope that I am right in what I have mentioned in the Subject line
of
this mail ;-)
with what you have asked for, i wud have thot that u need parent's sibling..
Try the following code and let me know if thaz not what you want
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each select="/BehaviourInfo/BehaviourBitmaps/BehaviourBitmapsInfo">
<xsl:value-of select="."/><br/>
<xsl:value-of select="../../Trap/Name"/>
<hr/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
From: "Satish, L. Gnanendra" <LGnanendra.Satish@sciatl.com>
Reply-To: xsl-list@lists.mulberrytech.com
To: "'xsl-list@lists.mulberrytech.com'" <xsl-list@lists.mulberrytech.com>
Subject: [xsl] How to find parent's-parent's-sibling-sibling name
Date: Thu, 19 Sep 2002 08:13:02 +0200
Hello,
I am a novice to XSLT and I would like a fast fix to this.
And I hope that I am right in what I have mentioned in the Subject line
of
this mail ;-)
The sample xml snippet is given below.
<BehaviourInfo ID="3">
<Name>&text_88;</Name>
<Trap>
<Name>AlarmEvent</Name>
</Trap>
<BehaviourBitmaps>
<BehaviourBitmapsInfo>
<Name>&text_90;</Name>
</BehaviourBitmapsInfo>
<BehaviourBitmapsInfo>
<Name>&text_91;</Name>
</BehaviourBitmapsInfo>
</BehaviourBitmaps>
</BehaviourInfo>
Right now I am iterating in the "BehaviourBitmapsInfo" tag. How do I find
"Trap/Name" from this position without leaving the iteration?
rgds,
Gnanendra.
- - - - - - - Appended by Scientific-Atlanta, Inc. - - - - - - -
This e-mail and any attachments may contain information which is
confidential, proprietary, privileged or otherwise protected by law. The
information is solely intended for the named addressee (or a person
responsible for delivering it to the addressee). If you are not the
intended
recipient of this message, you are not authorized to read, print, retain,
copy or disseminate this message or any part of it. If you have received
this e-mail in error, please notify the sender immediately by return e-mail
and delete it from your computer.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list