Subject: Re: Need some help with an expression... From: Charles Douthart <charles.douthart@xxxxxxxxxxxxx> Date: Wed, 23 Aug 2000 08:45:37 -0400 |
Thank you to everybody who replied -- I was getting a headache comparable only to those that occured when dealing with complex POSIX regular expressions for the first time! I wound up using the expression cited below (which was mentioned by a couple of folks). -charles douthart- Francis Norton wrote: > > If I understand your requirement correctly - in particular, that the "9" > is a search parameter - then the following example - which simply adds > to your perfectly correct first attempt - should do what you want. > > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > > <xsl:template match="/"> > <out> > <xsl:value-of > select="/box/category[@name='someType']/header[self/instance='9']/ref"/> > </out> > </xsl:template> > > </xsl:stylesheet> > > Basically what you do is put anything that is only part of the search > path, but not part of the result path, in square brackets. I think of > the square brackets as being like the where claseu of an SQL statement > (but then I think of xpath as being the SQL of tree-structured data...) XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Need some help with an expressi, Francis Norton | Thread | Re: Need some help with an expressi, David Allouche |
Re: name() and attribute() ?, Francis Norton | Date | Re: name() and attribute(), Paul Terray |
Month |