Subject: Re: [xsl] Grouping problem From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Sat, 04 Apr 2009 16:27:42 +0200 |
and I want to structure the document like this:
<document> <section> Some text-fragments ... <section> Some text-fragments ... </section> </section> <section> ... Some fragments for the second section ... </section> </document>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:output method="xml" indent="yes"/> <xsl:strip-space elements="*"/>
<xsl:template match="text-fragment"> <xsl:copy> <xsl:apply-templates/> </xsl:copy> </xsl:template>
<document> <section> <text-fragment> Some text </text-fragment> <text-fragment> Some text </text-fragment> <text-fragment> Some text </text-fragment> <text-fragment> Some text </text-fragment> <section> <text-fragment> Some text </text-fragment> <text-fragment> Some text </text-fragment> <text-fragment> Some text </text-fragment> <text-fragment> Some text </text-fragment> </section> <section> <text-fragment> Some text </text-fragment> <text-fragment> Some text </text-fragment> <text-fragment> Some text </text-fragment> <text-fragment> Some text </text-fragment> </section> </section> <section> <text-fragment> Some text </text-fragment> <text-fragment> Some text </text-fragment> <text-fragment> Some text </text-fragment> <text-fragment> Some text </text-fragment> </section> </document>
Martin Honnen http://JavaScript.FAQTs.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Grouping problem, Vincent De Groote | Thread | RE: [xsl] Grouping problem, Michael Kay |
Re: [xsl] Grouping problem, Martin Honnen | Date | RE: [xsl] Grouping problem, Michael Kay |
Month |