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

Re: question about a past problem (solved by Ken)

Subject: Re: question about a past problem (solved by Ken)
From: Andreas Peter <info@xxxxxxxxxx>
Date: Wed, 21 Nov 2007 00:09:24 +0100
Re:  question about a past problem (solved by Ken)
Quoting "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>:

At 2007-11-20 23:46 +0100, Andreas Peter wrote:
Here is the flat XML-code:
...
I am using this stylesheet for transformations:
...
   <xsl:template match="h2">
       <title>
           <xsl:apply-templates/>
       </title>
       <xsl:for-each-group select="following-sibling::*"
group-starting-with="h2|h3|h4|h5">
           <xsl:apply-templates select="current-group()"/>

As you guessed, the above is causing the paragraphs to be added to your result.

But something is wrong with it but I cannot see the mistake at the
moment. My problem is, that the textnodes are outputted after every
<sectxx>. This should come from the <xsl:apply-templates
select="current-group()"/> but I donnot really want them to be
displayed.

Since you are using group-starting-with= then you know the first member of the current group is the one starting with what you want.

So you can probably just say:

<xsl:apply-templates select="current-group()[1]"/>

This puts all your sections as siblings with no intervening paragraphs.

I hope this helps.

. . . . . . . . . . Ken

--
Comprehensive in-depth XSLT2/XSL-FO1.1 classes: Austin TX,Jan-2008
World-wide corporate, govt. & user group XML, XSL and UBL training
RSS feeds:     publicly-available developer resources and training
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal


Thanks Ken, that helps.

Andreas

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.