Your templates don't match the example input that you posted.
Your input didn't have a field element, but I'll assume that you snipped
that and it is the top level element a parent of teh value element that
youposted.
<xsl:template match="/field">
so when
<xsl:template name="examplesec">
is called the current element is the document element, field,
Note that since this is teh document element match="/field" rather than
match="field", this is presumaby generating the document element of teh
result, but it's generating fo:block not fo:root.
<xsl:apply-templates select="examplegp" mode="section"/>
this would select examplegp children of field
but in your input examplegp is a child of value.
I think you are making it harder than you need.
In your main text you want examplegp to vanish, so
<xsl:template match="examplegp"/>
then in the template that's making you main document run, just make a
second pass over the document, processing all the examples.
<xsl:template match="whatever">
<fo:root>
...
<xsl:apply-templates/>
...
<fo:block>
... examples section ...
<xsl:for-each seleect="//examplegp">
... a new example ..
<xsl:apply-templates select="."/>
</xsl:for-each>
</fo:block>
...
</fo:root>
David
--~------------------------------------------------------------------
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>
--~--