Subject: RE: [xsl] Unicode character blocks in strings From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Tue, 26 May 2009 14:16:56 +0100 |
Try: <xsl:analyze-string regex="\p{{IsCJKUnifiedIdeographs}}"> <xsl:matching-substring> <out><xsl:value-of select="."/></out> </xsl:matching-substring> <xsl:non-matching-substring> <out><xsl:value-of select="."/></out> </xsl:non-matching-substring> </xsl:analyze-string> Regards, Michael Kay http://www.saxonica.com/ http://twitter.com/michaelhkay > -----Original Message----- > From: tom tom [mailto:tomxsllist@xxxxxxxxxxx] > Sent: 26 May 2009 14:08 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: [xsl] Unicode character blocks in strings > > > I have a string containing a mix of Chinese and Latin > characters, eg 0"8yM"<WPMH1N1Aw8PH7. > I wish to return a nodeset containing the following kind of structure: > > > > 0"8yM"<WPM > H1N1 > Aw8PH7 > > > Where H1N1 falls into the BasicLatin unicode character block > and the other two strings can be categorized as CJKUnifiedIdeographs. > > Can anyone suggest the cleanest way to do this using XSLT 2? > > Tom > > _________________________________________________________________ > View your Twitter and Flickr updates from one place (C Learn more! > http://clk.atdmt.com/UKM/go/137984870/direct/01/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Unicode character blocks in s, tom tom | Thread | RE: [xsl] Unicode character blocks , tom tom |
[xsl] Unicode character blocks in s, tom tom | Date | Re: [xsl] Unicode character blocks , David Carlisle |
Month |