Re: [xsl] Flattening characters to plain latin

Subject: Re: [xsl] Flattening characters to plain latin
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Fri, 16 Feb 2007 11:59:13 +0100
Michael Kay wrote:
In XPath 2.0 I think you can achieve this using

codepoints-to-string(string-to-codepoints(normalize-unicode($in, 'NFKD'))[.
lt 127])

This splits composite characters into the base character plus modifiers,
then strips off the modifiers.

Wow! Some solutions to complex problems are just too pretty to ignore! Reading the requirement of the OP, I would've never thought there was such an easy, solid and sound solution to it. May I nominate it for the Best XSLT 2 Coding Example Award?


Cheers!
-- Abel

Current Thread