Subject: [xsl] matches() method in XPath 1.0 From: "Manuel Souto Pico terminolator@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Mon, 30 Jan 2023 23:30:20 -0000 |
Dear all, I have a simple question, hopefully someone can help. Given some nodes like this: <text>Some text.</text> <text>foo.svg</text> in XPath 2.0 I can match the ones (like the second) that contain a file name with something like //text[matches(text(), '[^\s]*\.(svg|png|jpg)')] That should match the second text node, and not the first. I am looking for something to achieve the same purpose in XPath 1.0, even if it's using something like ends-with instead of regex. Why XPath 1.0? I'd love to use version 2.0 but this is for using the ITS data categories, which seem not to be compatible with XPath 2.0 https://www.w3.org/TR/its20/#d0e2513 Could someone have an idea? Thank you so much. Cheers, Manuel PS: Apologies if questions about XPath are not appropriate in this list, please let me know if that's the case.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] cursed RTF outputs, Michael Kay mike@xxx | Thread | Re: [xsl] matches() method in XPath, Piez, Wendell A. (Fe |
Re: [xsl] Re: Creating sequence/ran, Dimitre Novatchev dn | Date | Re: [xsl] matches() method in XPath, Piez, Wendell A. (Fe |
Month |