[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: first question to the list: contains

Subject: RE: first question to the list: contains
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Sat, 3 Nov 2007 08:49:51 -0000
RE:  first question to the list: contains
> Scott, thanks for the great explanation.  Though it's 
> disappointing (as I need to check for _any_ Japanese 
> character to make this test effective), at least it makes sense. 

Scott's explanation is correct: you can't distinguish between a character
represented natively, and the same character represented as an entity
reference. And in your application, you shouldn't, because you really don't
want to constrain the document creator/sender to use one form rather than
the other.

XSLT 2.0 has good facilities for this. There's a function
string-to-codepoints which allows you to convert a string into a sequence of
integers representing the Unicode codepoints; or you can use regular
expressions which include constructs to match particular character
categories - 12360 is in the Hiragana block which is matched by
\p{IsHiragana}.

Michael Kay
http://www.saxonica.com/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.