xsl-list
[Top] [All Lists]

Re: [xsl] Problem with Positional Grouping from MSXML

2007-02-02 08:50:58
Andy Carr1 wrote:

If my xml fragment contained a table element  how could that be handled as
it isn't in the w:p group:- it's on the same level as w:p

It might suffice to extend Darkman's first template in this way:

<xsl:template match="ns0:Body">
  <Body>
    <xsl:for-each-group
        select="w:p|w:tbl"
        group-starting-with="w:p[my:p-style(.) eq 'BodyHeading']">
      <Section>
        <xsl:apply-templates select="current-group()"/>
      </Section>
    </xsl:for-each-group>
  </Body>
</xsl:template>

and to add another template for the table:

<xsl:template match="w:tbl">
  <Table>
      <xsl:apply-templates/>
  </Table>
</xsl:template>

But you probably need more templates for the table content.

  Yves


--~------------------------------------------------------------------
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>
--~--