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

RE: Re: UTF characters

Subject: RE: Re: UTF characters
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 31 Mar 2010 15:02:06 +0100
RE:  Re: UTF characters
> Here is an example of the query asked earlier, suppose I have two
> paragraphs:
>
> PARA1: <p>INTRODUCTION- This is plain text</p>
> PARA2: <p>INTRODUCTION- This is text with UTF character 'Y </p>
>
> AND if write something like:
> <xsl:template match="p">
>     <xsl:if test="contains(text(),'INTRODUCTION')">
>         <!--do something-->
>     </xsl:if>
> </xsl:template>

It seems you are using "UTF" to mean an "unusual" character, in some sense
of the word.

Try:

<xsl:if test="matches(text(), '\P{IsBasicLatin}')">

However, it would be nice to know what you want to do differently if this
condition is true. If we knew, we might be able to suggest a better
approach.

Regards,

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

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-2013 All Rights Reserved.