This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
sibling axis Q
- To: xsl-list at mulberrytech dot com
- Subject: sibling axis Q
- From: mxmodi at duke-energy dot com
- Date: Wed, 27 Sep 2000 11:08:55 -0500
- Reply-To: xsl-list at mulberrytech dot com
Hi,
I am trying to grab elements that are a sibling of the current node I am
working on. I am not sure if that makes much sense, so let me just show you
the XML.
<root>
<child1>
<data>
<record>
<Name>some name</Name>
<Week>some dates</Week>
<Log>
<Daily>daily text</Daily>
<Weekly>weekly text</Weekly>
</Log>
<Week>different week for same name</Week>
<Log>
<Daily>daily text</Daily>
<Weekly>weekly text</Weekly>
</Log>
</record>
<record>
<Name>different name</Name>
<Week>some dates-same or different</Week>
<Log>
<Daily>daily text</Daily>
<Weekly>weekly text</Weekly>
</Log>
</record>
<record>
..........
</record>
</data>
</child1>
</root>
I have tried to use the ancestor axis with some luck. I can display a
different "Week" for each "Name". However, I am having trouble extracting
the "Log" only for that particular "Week". Is there anything like a
"sibling axis"? I have tried following-sibling axis, however, that would
return the data for all the following "Logs" for each "Week". Any
thoughts...? Any help is appreciated.
Thanks,
Maulik
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list