B
BakedBean
Hi,
Hoping someone can help with this as it's been driving me round the
bend! I have the following setup in XML:
<unit>
<title/>
<section>
<title/>
<subsection>
<content/>
</subsection>
</section>
<section>
<title/>
<content/>
<subsection>
<content/>
</subsection>
</section>
</unit>
What I am trying to do is to put a page count (e.g. Page 1 of 147) on
each html page that is produced. However, the issue is that the section
will only have a corresponding html page, if there isn't a subsection
in position() = 2. I have managed to calculate the total number of
pages and then minused the number of sections that don't have
corresponding html pages, but I can't get the page number as it goes
along. I tried:
<xsl:value-of
select="count(*[name(parent::section/preceding-sibling::section[1]/*[position()
= 2]) = 'subsection'])"/>
and a whole number of other ideas, which didn't work! Has anyone got
any ideas as I'm plain out. . .
Cheers
Hoping someone can help with this as it's been driving me round the
bend! I have the following setup in XML:
<unit>
<title/>
<section>
<title/>
<subsection>
<content/>
</subsection>
</section>
<section>
<title/>
<content/>
<subsection>
<content/>
</subsection>
</section>
</unit>
What I am trying to do is to put a page count (e.g. Page 1 of 147) on
each html page that is produced. However, the issue is that the section
will only have a corresponding html page, if there isn't a subsection
in position() = 2. I have managed to calculate the total number of
pages and then minused the number of sections that don't have
corresponding html pages, but I can't get the page number as it goes
along. I tried:
<xsl:value-of
select="count(*[name(parent::section/preceding-sibling::section[1]/*[position()
= 2]) = 'subsection'])"/>
and a whole number of other ideas, which didn't work! Has anyone got
any ideas as I'm plain out. . .
Cheers