On 22/04/2010 23:08, Terry Ofner wrote:
I am having group-adjacent problems. Here is a snippet of starting
document:
I am seeking this:
<narrative name="1A">
<text>
<para>Directions: Read the selection....</para>
<para><b>Jason and the Golden Fleece</b></para>
<para><i>....</i></para>
<table>
<!--lots of rows and cells-->
</table>
</text>
</narrative>
this is the same as your input except all the children of narrative are
wrapped in text, which doesn't need grouping at all?
just
xsl:template match="narrative">
<xsl:copy>
<xsl:copy-of seelct="@*
<text>
<xsl:copy-of select="*"/>
</text>
</xsl:copy>
but presumably this isn't what you want?
or perhaps you want para and tables to be in the same group which would
just requirre changing your code
group-adjacent="name()">
to
group-adjacent="exists(self::table|self::para)">
if you want tables and paras in one group and everything else in the other
or
group-adjacent="replace(name(),'table','para')">
if you want tables and paras in one group and each distinct element type
other than these two in their own groups
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>
--~--