|
Subject: [xsl] Move XML elements to one place using XSLT 2.0 From: Jacobus Reyneke <jacobusreyneke@xxxxxxxxx> Date: Thu, 18 Mar 2010 12:12:51 +0200 |
Good day,
This is a low priority request, but if someone has the time, please have a look.
I have an XML document that outputs to XSL-FO using XSL 2.0. All was
well and happy until I tried to move all my notes in the XML file into
an Appendix (they currently appear structurally in the same place on
input and output). It's now a whole bottle or red wine later, but I
still don't have the answer (pleeshh helpsh me)
I'm trying to change this:
<root>
<a>
<note>aaaa</note>
<b>
<note>bbbbb</note>
</b>
<c>
<note>cccc</note>
</c>
</a>
</root>
Into:
<root>
<a>
<b>
</b>
<c>
</c>
</a>
<note>aaaa</note>
<note>bbbbb</note>
<note>cccc</note>
</root>
Here comes the difficult part: How can I change the following style
sheet to do the re-shuffling without touching the first three
templates. Currently input and output structure is the same. Now I
need to grab the 'notes' and put them in one place but without
affecting the rest of my xslt.
<xsl:template match="a">
........
</xsl:template>
<xsl:template match="b">
........
</xsl:template>
<xsl:template match="c">
........
</xsl:template>
<xsl:template match="note">
........
</xsl:template>
Kind regards,
Jacobus
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] initial template paramete, Michael Kay | Thread | Re: [xsl] Move XML elements to one , Christian Roth |
| RE: [xsl] exslt random:random-seque, Michael Kay | Date | Re: [xsl] Move XML elements to one , Christian Roth |
| Month |