XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
kunal jainSubject: Varriable inputs to XSL transformation
Author: kunal jain
Date: 12 Jun 2007 01:31 PM
Hi,

Actually i didnt much understand the comment by you, i am not a expert in XSL :(. My Problem is as following, i am having the following xml (xml1), which is derived out of some source. The xml is of some company, and it shows the the product sales by department ( Units and Amount). For example, the product AAA in department Manufacturing have units as 500 and amount as 62,823,395. Similar logic works for other department and products.
THe problem is that there are some user configurations, which are different from this xml. Lets say the user wants to just see the units of all the products in the department Manufacturing. I need to take that configuration into the XSL, currently there are two configuration inputs, but there can be more combinations like units and amount for manufacturing or units for both manufacturing and IT. Below is also the kind of xml which will be output in the case of user inputs of manufacturing and units.
The XML1 is generated on the fly and is not stored anywhere.

XML1...........
<table>
<head>
<row>
<cr colspan="1" rowspan="3"/>
<hg-hg colspan="4" rowspan="1" >
<caption caption="Ev"/>
</hg-hg>
</row>
<row>
<c-hg colspan="2" rowspan="1">
<caption caption="Manufacturing"/>
</c-hg>
<c-hg colspan="2" rowspan="1">
<caption caption="IT"/>
</c-hg>
</row>
<row>
<hg-hg colspan="1" rowspan="1">
<caption caption="Product"/>
</hg-hg>
<c-hg colspan="1" rowspan="1">
<caption caption="Units"/>
</c-hg>
<c-hg colspan="1" rowspan="1">
<caption caption="$ Amount"/>
</c-hg>
<c-hg colspan="1" rowspan="1">
<caption caption="Units"/>
</c-hg>
<c-hg colspan="1" rowspan="1">
<caption caption="$ Amount"/>
</c-hg>
</row>
</head>
<body>
<row>
<r-hg colspan="1" indent="1" rowspan="1">
<caption caption="AAA"/>
</r-hg>
<l value="500"/>
<l value="62,823,395"/>
<l value="441"/>
<l value="49,635,600"/>
</row>
<row>
<r-hg colspan="1" indent="1" rowspan="1" style="odd">
<caption caption="BBB"/>
</r-hg>
<l value="921"/>
<l value="283,835,573"/>
<l value="879"/>
<l value="271,281,733"/>
</row>
<row>
<r-hg colspan="1" indent="1" rowspan="1">
<caption caption="CCC"/>
</r-hg>
<l value="487"/>
<l value="64,593,105"/>
<l value="487"/>
<l value="64,716,720"/>
</row>
</body>
</table>



Output XML
<output >
<delivery>
<del label="AAA"/>
<del label="BBB"/>
<del label="CCC"/>
</delivery>
<data seriesName="Manufacturing">
<set value="500"/>
<set value="921"/>
<set value="487"/>
</data>
</output>

Please help me get this transformation done. with user inputs. All helps are greatly appreciated.

Thanks
Kunal

Posttop
James DurningSubject: Variable inputs to XSL transformation
Author: James Durning
Date: 13 Jun 2007 11:14 AM
Please see follow-up at http://www.topxml.com/forum/Varriable_inputs_to_XSL_transformation/m_4664/tm.htm

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.