Subject: Re: [xsl] Is XPath and/or XSLT designed such that I should never have to write special case code? From: "Liam R. E. Quin liam@xxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 23 Jun 2021 04:27:33 -0000 |
On Tue, 2021-06-22 at 19:51 +0000, Dimitre Novatchev dnovatchev@xxxxxxxxx wrote: > > > Example: finding all (X)Html elements that have class $myClass: > > B B B B B //*[contains(concat(' ', @class, ' '), concat(' ', $myClass, ' > ')] > Expressions like this, which work in some cases but are not partially case insensitive in the way that HTML class attributes are defined to be, is part of why we introduced contains-token() in XPath 3.B However, you're right, it's a good example for matching a token in a space-separated list. 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Is XPath and/or XSLT desi, Dimitre Novatchev dn | Thread | Re: [xsl] Is XPath and/or XSLT desi, Mukul Gandhi mukulg@ |
Re: [xsl] Is XPath and/or XSLT desi, Mukul Gandhi mukulg@ | Date | Re: [xsl] Is XPath and/or XSLT desi, Michael Kay mike@xxx |
Month |