Re: [xsl] How to retrieve the element with value DIR and not the element with value TURN_DIR?

Subject: Re: [xsl] How to retrieve the element with value DIR and not the element with value TURN_DIR?
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 2 Jan 2025 22:41:26 -0000
On 02/01/2025 23:36, Roger L Costello costello@xxxxxxxxx wrote:

I want to retrieve the <row> whose <field> has the string DIR. In the following example, I want the second <row> retrieved. Is there a simple XPath expression to achieve this?


<Test>
     <row>
         <field>TURN_DIR, PT_TRN_DIR, NX_TRN_DIR</field>
     </row>
     <row>
         <field>DIR, DIRECTION</field>
     </row>
</Test>


/Test/row[field[tokenize(., ',\s*') = 'DIR']]

Current Thread