xsl-list
[Top] [All Lists]

RE: how can i get a sub-tree(between two chapter)

2003-06-26 01:53:56
Hi,

and i want to cut the file to parts(each part is limited by 
onther chap) :

  <xsl:template match="/">
    <xsl:for-each select="//*[starts-with(name(), 'chap')]">
      <xsl:copy>
        <xsl:apply-templates select="node()[not(self::* and starts-with(name(), 
'chap'))]"/>
      </xsl:copy>
    </xsl:for-each>
  </xsl:template>
  <xsl:template match="@* | node()">
    <xsl:copy>
      <xsl:apply-templates select="@* | node()"/>
    </xsl:copy>
  </xsl:template>

Cheers,

Jarno - Covenant: Call The Ships To Port (Club version)

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>