[xsl] compare two unicode variables

Subject: [xsl] compare two unicode variables
From: hochen@xxxxxxxxxxx
Date: Wed, 11 May 2005 16:03:36 -0500
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