XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Varriable inputs to XSL transformation

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

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS