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

Newbie question: dynamic output column ordering

Subject: Newbie question: dynamic output column ordering
From: "Mike Bandy" <michael.bandy@xxxxxxxxxxxxx>
Date: Wed, 23 Jan 2002 09:17:04 -0500
java output columns
I'm new to XSL, doing HTML report generation from an XML file.  I'm using
xalan with Java to drive my transformations and I'd like to be able to
specify the column ordering from my Java program.  So, from the XML below,
I'd like to pass in the order, left to right, of the columns in my HTML
report - for example "job_id,sow_id,date_created" or
"date_created,job_id,file_name" or whatever based on the user's entries into
a Java GUI.  (There's more to it than that, but this is where I'm stuck.)

How do I pass in the ordering and then break out the individual fields of
interest, then use the individual fields to extract the elements of
interest?  I can do it all hardcoded (like below), but how do I make it
dynamic based on parameters from my Java program?

This seems like a FAQ but I can't find an answer online - sorry if this is


    Mike Bandy
    Entegrity Solutions
    Columbia Maryland

---- XSL snippet below ----
  <xsl:template match="record">
          Output one row of the HTML table
      <td><strong><xsl:value-of select="job_id"/></strong></td>
      <td><xsl:value-of select="sow_id"/></td>
      <td><xsl:value-of select="date_completed"/></td>

---- XML below ----
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
    <status>Job Failed</status>
    <destination_name> </destination_name>
    <status>Job Completed</status>
    <destination_name> </destination_name>

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
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.