[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|