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: Need some help with an expression...


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

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