Re: [xsl] How to select elements containing ARPT but not elementscontaining APPC_ARPT or ARPT_RMK?

Subject: Re: [xsl] How to select elements containing ARPT but not elementscontaining APPC_ARPT or ARPT_RMK?
From: "David Carlisle d.p.carlisle@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 24 Oct 2022 10:33:45 -0000
 > For my education, would you please explain why this XPath expression
selects all <row> elements:

> //row[matches(affected_tables, '[ ;]?ARPT[ ;]?')]


matches(affected_tables, '[ ;]?ARPT[ ;]?' )

is the same as matches(affected_tables, 'ARPT') which is same as contains(
affected_tables, 'ARPT')  as you are matching
ARPT preceded and followed by 0 or 1 ";" but that is true if the string
contains ARPT and false otherwise.

[;]? is the same as ;? and adds no constraint as it always matches

Current Thread