[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xform from node-within-node to nodelist-then-edgelist?
Hope this isn't too dumb-ass a question.. I've got an input file, of the form.. <node> <node>blah blah</node> <node> <node>blah blah</node> </node> <node> so basically an outline structure. I want to transform this into a structure suitable for display using the touchgraph linkbrowser, which wants files of the form.. <nodelist> <node id="1">blah blah</node> <node id="2">blah blah</node> <node id="3">blah blah</node> <node id="4">blah blah</node> </nodelist> <edgelist> <edge fromid="1" toid="2"> <edge fromid="1" toid="3"> <edge fromid="3" toid="4"> </edgelist> I've left a bunch of irrelevant stuff out. Now, I can create the edges no problem, by using generate-id() to make the node-id then passing the node-id as a parameter when I call the template recursively on the child nodes. No probs. What I can't seem to work out is how to delay the output of the edges until after I have finished the nodes. Any thoughts? Can I do this with XSLT? A friend whose opinions I respect has suggested that FO is what I need to be using, but I can't make head nor tail of that. Is he right? Do I need to go back and understand FO? regards Martin Whinnery
|
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
|