XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old August 8th, 2003, 04:23 AM
wastlinger wastlinger is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 6 wastlinger User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
flat xml file to hierarchical using xsl

I currently have something like the following xml file;

<document>
<textheading level="1">heading text</textheading>
<textheading level="2">heading text</textheading>
<textparagraph>text</textparagraph>
<textheading level="3">heading text</textheading>
<textparagraph>text</textparagraph>
<textheading level="3">heading text</textheading>
<textparagraph>text</textparagraph>
<textheading level="2">heading text</textheading>
<textparagraph>text</textparagraph>
<textheading level="3">heading text</textheading>
<textparagraph>text</textparagraph>
</document>

I want to nest these and create the following using an xsl file;

<document>
</documenttitle>heading text</documenttitle>
<textheading1>
<heading>heading text</heading>
<textheading2>
<heading>heading text</heading>
<textparagraph>text</textparagraph>
<textheading3>
<heading>heading text</heading>
<textparagraph>text</textparagraph>
<textparagraph>text</textparagraph>
</textheading3>
<textheading3>
<heading>heading text</heading>
<textparagraph>text</textparagraph>
<textparagraph>text</textparagraph>
</textheading3>
</textheading2>
<textheading2>
<heading>heading text</heading>
<textparagraph>text</textparagraph>
<textheading3>
<heading>heading text</heading>
<textparagraph>text</textparagraph>
<textparagraph>text</textparagraph>
</textheading3>
</textheading2>
</textheading1>
</document>

Is there anyone out there who can point me to an existing xslt stylesheet that does this?

Just to give a little more background, I am using the openoffice.org writer word processor and want to convert the content xml file(the first above xml file format) into another xml file format (the second of the above formats).

thanks in advance for any help

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > flat xml file to hierarchical using xsl


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway