Re: [xsl] recognize character entities

Subject: Re: [xsl] recognize character entities
From: Abel Online <abel.online@xxxxxxxxx>
Date: Thu, 31 Aug 2006 11:30:32 +0200
Frank Marent wrote:
short feedback on this topic. thanks for everybody helping me. we are now successful with the following statement that selects elements starting with special characters (can probably be optimized but works):

<xsl:template match="*[matches(substring(text()[1], 1, 1), '[&#592;-&#99999;]')]">
I remember from the thread that the elements you where after had to be of one character only. If this is still through, you may optimize your regex as follows:
<xsl:template match="*[matches(., '^[&#592;-&#99999;]$')]">


Meaning: from start to finish there's only one character in your mentioned range. But are you aware that a lot of non-math characters are included now as well? The full hiragana and katakana set, all CJK ideographs, incl. extensions, Khmer, Ogham etc. If you don't mind that, or if you want to treat them the same, it is of no concern Otherwise, I'd suggest you take out the mathematical ranges as specified by W3C as reserved for MathML. On the http://www.unicode.org/charts/ website, there's a full list of all characters, in case you are interested.

Cheers,
Abel Braaksma
http://abelleba.metacarpus.com

Current Thread