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

compare two unicode variables

Subject: compare two unicode variables
From: hochen@xxxxxxxxxxx
Date: Wed, 11 May 2005 16:03:36 -0500
unicode compare
My search.xsl is like this:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <!--xsl:output method="html" encoding="ISO-8859-1" /-->
     <xsl:output method="xml" />
    
<!-- define the parameter -->
<xsl:param name="Kentry" />
<xsl:param name="wordLength" />

  
<xsl:template match='*|@*'>
   
<xsl:copy>
 <xsl:for-each select="/reportname/Entry[substring(ENTRY_FORM,1,$wordLength) =
substring($Kentry,1, $wordLength)]">
    <Entry>
    
    <xsl:copy-of select='node()|@*' />

    </Entry>
  </xsl:for-each>
 </xsl:copy>
   
  </xsl:template>

</xsl:stylesheet>

Parameter "Kentry" could be "&#x00E1;"(unicode) and I do have a equal ENTRY_FORM
"&#x00E1;"in my xml file. Why it doesn't select it? It select other normal
characters with this line: <xsl:for-each
select="/reportname/Entry[substring(ENTRY_FORM,1,$wordLength) =
substring($Kentry,1, $wordLength)]">

Besides, the parameter came from php page, code is like this:
$word="&#x00E1;";
$params=array("wordLength" => $length, "Kentry" => $word );
$result =xslt_process($xp,$xml_file, $xslt_file, NULL, $arg_buffer, $params)

The xslt is "Sablotron Version 1.0.2)


Thanks!

Helen

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.