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

XSL Newbie: How2 write transforms for variable XML

Subject: XSL Newbie: How2 write transforms for variable XML
From: Joe Weder <jweder@xxxxxxx>
Date: Thu, 27 Jan 2005 15:25:08 -0500
joe weder
I'm sure there is some way to create XSL that can work for limited variability in XML content.

Simple example, consider a report that yields columnar data in which the columns in the report will vary - which columns and their order:

Sample1.xml
<data>
<row>
   <attrA>red</attrA>
   <attrB>128</attrB>
</row>
</data>

Sample2.xml
<data>
<row>
   <attrC>foo</attrC>
   <attrX>12.00</attrX>
   <attrB>128</attrB>
</row>
</data>

I want to know how I can develop XSL to handle the data without hard-coding selects for specific names (attrA, attrB, attrC, attrD). Additionally, I want to be able to define rules for each column. Like justification, color, bold, etc. - would this be some kind of meta-data or processing instructions?

Any suggestions would be greatly appreciated.

Forgive me if this is well understood, I could not find anything in the archive 'cause I was probably not searching for the right keywords.

--
Joe Weder
Senior Software Developer/Architect
Intelligent Computer Systems
A Division of Global Beverage Group
717.295.7977 ext 614
www.gbg.com

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.