[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Transformation Grouping Problem (XSLT 2.0, Saxon-

Subject: Re: Transformation Grouping Problem (XSLT 2.0, Saxon-PE 9.3.0.5)
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Fri, 16 Sep 2011 16:52:58 +0200
Re:  Transformation Grouping Problem  (XSLT 2.0
Raymond Lillibridge wrote:

For instance, I'd like to create an XML result-document that contains only:

<book>
             <title>My Book Title</title>

             <para>book Blah, blah, blah</para>
             <para>book Dah, dah, dah</para>
             <para>book Lah, lah, lah</para>  </book>


...and another XML result-document that contains only:


<level1>
             <title>level1 AAA</title>
             <para>level1 Blah, blah, blah</para>
             <para>level1 Dah, dah, dah</para>
             <para>level1 Lah, lah, lah</para>  </level1>

...&c.

<xsl:template match="book | level1 | level2 | level3"> <xsl:copy> <xsl:copy-of select="*[not(*)]"/> </xsl:copy> </xsl:template>

then add

  <xsl:template match="/">
    <xsl:apply-templates select="//book"/>
  </xsl:template>

or e.g.
  <xsl:template match="/">
    <xsl:apply-templates select="//level1"/>
  </xsl:template>

as needed depending on which kind of elements you want to output.


--


	Martin Honnen --- MVP Data Platform Development
	http://msmvps.com/blogs/martin_honnen/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.