Hi All,
I am facing xsl-for-each group problem in my Input xml file. Please
see below my Input file.
XML File
========
<researcher>
<title>Rethinking Foreign Policy</title>
<question>Approach be abandoned?</question>
<abstract>some Text</abstract>
<section>Section The Issues</section>
<para>some text</para>
<section>Background</section>
<para>some text</para>
</researcher>
I need ouput
============
<researcher>
<cover>
<title>Rethinking Foreign Policy</title>
<question>Approach be abandoned?</question>
<abstract>some Text</abstract>
</cover>
<section label="the.issues">
<section>Section The Issues</section>
<para>some text</para>
</section>
<section label="Background">
<section>Background</section>
<para>some text</para>
</section>
</researcher>
My XSL
======
<xsl:template match="/">
<researcher>
<xsl:apply-templates select="researcher"/>
</researcher>
</xsl:template>
<xsl:template match="researcher">
<xsl:for-each-group select="." group-starting-with="section">
<section>
<xsl:element name="title">
<xsl:apply-templates select="current-group()"/>
</xsl:element>
<xsl:apply-templates/>
</section>
</xsl:for-each-group>
</xsl:template>
My problem is how insert Cover tag and Section tag. I am missing
XPATH. Because if i m using researcher tag my output is missing title,
question...etc.
Doese Anyone help me.
--
Thanks
Byomokesh Sahoo
Om Trayambakam Yajaamahe Sugandhim Pushtivardhanam
Urvaarukamiva Bandhanan Mrytor Muksheeya Mamritaat
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--