[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] compare two unicode variables
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 "á"(unicode) and I do have a equal ENTRY_FORM "á"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="á"; $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
|
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
|