Subject: Sorting problem with Xalan 1.0.0 From: rainer_mueller@xxxxxx Date: Tue, 4 Apr 2000 19:22:13 +0200 |
Hi there, after updating to Xalan 1.0.0 I have problems with the <xsl:sort> statement. --- BOF XSL --- <xsl:variable name="sortby">prod_no</xsl:variable> <xsl:variable name="orderby">ascending</xsl:variable> <xsl:apply-templates select="/document/content/table/record"> <xsl:sort select="*[local-name()=string($sortby)]" order="{$orderby}"/> </xsl:apply-templates> --- EOF XSL --- >>>>>>> Xalan Version 1.0.0, XML4J Version Xerces 1.0.3 <<<<<<< ========= Parsing file:c:/temp/web/lockCustodyView.xsl ========== XSL Error: Attribute: order has an illegal value: {$orderby}, ... If I remove the order="{$orderby} attribute I get the following error message. Parsing the XSL and XML file works but while transforming ... Transforming... XSL Error: pattern = '*[local-name()=string($sortby)]' VariableReference given for variable out of context or without definition! Name = sortby, source tree node: prod_no XPATH: pattern = '*[local-name()=string($sortby)]' VariableReference given for variable out of context or without definition! Name = sortby Here is how my XML document looks like --- BOF XML --- <document name="DOCUMENT_ACCOUNT_LIST" mimetype="x-jdf-document/x-table-content"> <content> <table> <record name="12"> <prod_no>123</prod_no> <prod_no_form>abc</prod_no_form> </record> <record name="14"> <prod_no>345</prod_no> <prod_no_form>ghi</prod_no_form> </record> </table> </content> </document> --- EOF --- Please 'r' if you have any comments, ideas, queries or input ... Thanks a million, Rainer XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: "translate function" - got it, David Carlisle | Thread | Re: Sorting problem with Xalan 1.0., David Carlisle |
Re: <xsl:choose> <xsl:when> problem, David Carlisle | Date | Why saxon doesnt allow this?, Selva, Francis |
Month |