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

instance a template from xsl:for-each-group

Subject: instance a template from xsl:for-each-group
From: Andreas Peter <info@xxxxxxxxxx>
Date: Tue, 17 Nov 2009 21:29:38 +0100
 instance a template from xsl:for-each-group
Hello XSL-list,

I want to do a conversion from WordML to Docbook. I have the following xsl (as a sample):

<xsl:template match="w:body">
           <xsl:call-template name="chapter"/>

<xsl:template name="chapter">
<xsl:param name="levelnr" select="1"/>
<xsl:param name="nodes" select="*"/>
<xsl:for-each-group select="$nodes"
<xsl:element name="sect{$levelnr}">
<xsl:apply-templates select="node()"/>
<xsl:when test="not(current-group()[position()>1])">
<xsl:apply-templates select="current-group()"/>
<xsl:call-template name="chapter">
<xsl:with-param name="levelnr" select="$levelnr+1"/>
<xsl:with-param name="nodes" select="current-group()[position!=1]"/>

   <xsl:template match="w:p[descendant-or-self::*[@w:val='paragraph']]">

I need to instance the third template from the <xsl:apply-templates select="current-group()"/> inside the second template.
I hope this problem could be solved without pasting the source xml -- this would be to long (WordML).

Thanks in advance Andreas

Current Thread


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.
First Name
Last Name
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.