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 23:04:16 -0000
On 02/01/2025 23:55, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx wrote:
On Thu, 2025-01-02 at 22:35 +0000, Roger L Costello costello@xxxxxxxxx
wrote:
Hi Folks,

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?

B B B B B B B <field>TURN_DIR, PT_TRN_DIR, NX_TRN_DIR</field>

B B B B B B B <field>DIR, DIRECTION</field>


so, field[contains-token(row, 'DIR')] maybe?


contains-token tokenizes on pure whitespace, no? With that comma in
there I don't think it helps. Unless you would do somethink complicated
like /Test/row[field[contains-token(., 'DIR,')]]

Current Thread