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

Sorting problem with Xalan 1.0.0

Subject: Sorting problem with Xalan 1.0.0
From: rainer_mueller@xxxxxx
Date: Tue, 4 Apr 2000 19:22:13 +0200
xalan 1.0
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

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.