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: Fri, 3 Jan 2025 01:16:37 -0000
On Thu, 2025-01-02 at 23:04 +0000, Martin Honnen martin.honnen@xxxxxx
wrote:
>
> contains-token tokenizes on pure whitespace, no? With that comma in
> there I don't think it helps.

oh, i didn't look closely enough, you're right. No, tokenize() it is.

Or contains(concat(',', field, ','), 'DIR') but then you are sensitive
to values like
   "DIR , OTHER"
(a leading or trailing space should be removed by the XML parser,
though)

liam

--
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