[xslt] xsl:number over include question
- From: John Hurst <ajh hawthorn csse monash edu au>
- To: xslt gnome org
- Subject: [xslt] xsl:number over include question
- Date: Fri, 27 Jul 2001 18:02:39 +1000
I have an XML document split across a number of source files. The
root file looks like this:
<section><title>Intro</title>
...
</section>
<include file="file1.xml"/>
<include file="file2.xml"/>
<include file="file3.xml"/>
<section><title>Conclusions</title>
...
</section>
Where each subfile has the internal structure
<section><title>Section N</title>
...
</section>
The XSLT to handle this seems straightforward enough:
<xsl:template match="include">
<xsl:apply-templates select="document(@file)/*"/>
</xsl:template>
and that much works OK, but when I go to number the sections, as with
<xsl:template match="section/title">
<H2>
<xsl:number level="single" count="section" format="1. "/>
<xsl:apply-templates/>
</H2>
</xsl:template>
only the sections in the master file "Intro" and "Conclusions" get
numbered properly, while all the included sections renumber from 1.
Please, can anyone explain what I'm doing wrong, and how to fix it?
cheers,
--John Hurst
-- Associate Dean (Teaching), Faculty of Information Technology
-- Associate Professor, School of Computer Science and Software Engineering
--rm G23, Building 63
--PO Box 26, Monash University, Clayton, VIC 3168 ~ ~~~&#:
--ajh@csse.monash.edu.au +61 3 990 55192 _..___ ---____@___H__
--(mob 0407 569 041) (fax +61 3 990 55146) |_____[_|_________[__]_
--http://www.csse.monash.edu.au/~ajh oo oo oo O--O--O o=o
--free times, see http://www.csse.monash.edu.au/~ajh/cgi-bin/appointments.cgi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]