This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Way to find second instance?


> 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
differently...

Mike Kay
Software AG


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]