This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Matching node by its position
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>, <xsl-list-digest at lists dot mulberrytech dot com>
- Date: Tue, 16 Jul 2002 09:11:55 +0100
- Subject: RE: [xsl] Matching node by its position
- Reply-to: xsl-list at lists dot mulberrytech dot com
>
> I want to match and select only the second student node.
>
> I tried something like this
>
> <xsl:template match="student[1]">
> <xsl:template match="student[position()=1]">
>
> Both of them did not work. IE5.x is showing a blank page with
> some error at the status area of the browser.
>
Both these are correct, though they will match the first student, not
the second. If they didn't work, then there is an error somewhere else
in your stylesheet.
Running stylesheets in IE5 is not a good way of debugging them: error
messages tend to be extremely cryptic and to disappear down black holes.
Try downloading Saxon, if only to get more sensible messages.
Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list