RE: [xsl] Way to find second instance?

Subject: RE: [xsl] Way to find second instance?
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Tue, 10 Jul 2001 22:51:34 +0100
> If I do something similar to the following in ASP:
> objXSL.SelectSingleNode("//@match").Value = ".[whatever = 3]"
> Response.Write (objXML.TransformNode(objXSL))
> then it will find the first instance of the "match" attribute
> in my XSL
> document, right?  If so, how can I find the second instance
> without parsing
> the XSL tree nodes.

You can do "//@match[2]", but of course both this and your original
expression will require the stylesheet to be parsed. It would certainly be
better programming practice to use a mroe specific expression that will
still work when another template rule is added to the stylesheet. In fact,
it would probably be better practice to tackle this problem completely

Mike Kay
Software AG

 XSL-List info and archive:

Current Thread