|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Grouping by attribute
I've got this flat-structured XML:
<document>
<metaData>
<title>Title</title>
<publisher>Publisher</publisher>
</metaData>
<contentSection>
<p>text</p>
<headline level="2">Headline</headline>
<p>text</p>
<p>text</p>
<headline level="2">Section</headline>
<p>text</p>
<pagenum id="page2"/>
<p>text</p>
<headline level="3">Subsection</headline>
<p>text</p>
<headline level="2">Section</headline>
<p>text</p>
<p>text</p>
</contentSection>
</document>
And want it transformed to this XML:
<body>
<level1>
<h1>Title</h1>
<p>text</p>
<level2>
<h2>Headline</h2>
<p>text</p>
<p>text</p>
</level2>
<level2>
<h2>Section</h2>
<p>text</p>
<pagenum id="page2"/>
<p>text</p>
<level3>
<h3>Subsection</h3>
<p>text</p>
</level3>
</level2>
<level2>
<h2>Section</h2>
<p>text</p>
<p>text</p>
</level2>
</level1>
</body>
How would I do that using XSLT? XSLT 2.0 solutions are ok.
Regards
Jostein
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








