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: "Liam R. E. Quin liam@xxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 2 Jan 2025 22:55:39 -0000
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?
Assuming XPath 3 or later.

--
Liam Quin,B https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Barefoot Web-slave, antique illustrations: B http://www.fromoldbooks.org

Current Thread