xsl-list
[Top] [All Lists]

RE: [xsl] Unicode character blocks in strings

2009-05-29 07:51:26
At 2009-05-29 12:46 +0100, tom tom wrote:
I don't understand why the regex \p{{IsCJKUnifiedIdeographs}} contains a double '{}' structure. Why doesn't \p{IsCJKUnifiedIdeographs} work?

Because the value of the regex= attribute is an attribute value template.

In an attribute value template, the single brace is a signal to perform a "value-of" instruction with the contents as the value of the select= expression.

Since you need actual brace brackets in the attribute, you need to double them up in order to escape the attribute value template parsing.

This happens a lot when writing XSLT stylesheets that create Ant scripts (a very useful design pattern).

I hope this helps.

. . . . . . . . . . . . Ken

--
XSLT/XSL-FO/XQuery hands-on training - Los Angeles, USA 2009-06-08
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18
Video overview:  http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18
G. Ken Holman                 mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--