This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: XML/XSL transformation using XALAN/JAVA
- To: "Thushara Perera" <thusharap at eurocenter dot lk>, "XSL News Group \(E-mail\)" <XSL-List at lists dot mulberrytech dot com>
- Subject: [xsl] Re: XML/XSL transformation using XALAN/JAVA
- From: "jackson" <jackson at dstc dot edu dot au>
- Date: Sat, 28 Apr 2001 14:40:00 +1000
- Cc: "David Jackson" <jackson at dstc dot edu dot au>
- Organization: DSTC
- References: <711677989624D411B81E0030050162552F6B00@eccolcom01.colombo.eurocenter.lk>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Thushara
You're on the right track in that you want to find out about following
siblings, but you're trying to use a function (non-existent at that) where
you want to use an axis.
Try:
<xsl:value-of select="following-sibling::PRODUCTQUALIFIER"/>
This is explained in XPath spec:
http://www.w3.org/TR/xpath#axes
There are some examples of the use of axes:
http://www.w3.org/TR/xpath#location-paths
including a couple with following and preceding siblings.
XPath functions are explained in:
http://www.w3.org/TR/xpath#corelib
The use of these can be a bit strange at first, and the XPath spec is
perhaps not the best place to learn about them. I think there are some
good tutorials around.
You might try, for example:
http://www.zvon.org/xxl/XPathTutorial/General/examples.html
Examples 15 and 16 seem particularly relevant.
Norman Walsh has a good intro to XPath too:
http://www.arbortext.com/Think_Tank/XML_Resources/Issue_one/issue_one.html
In working with XPath you need to understand how axes relate to
document structure. Then you need to understand how location
steps are built up, with functions being only a part (generally a lesser
part) of what you want to do.
David Jackson
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list