xsl-list
[Top] [All Lists]

compare two unicode variables

2005-05-11 14:03:36


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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>