I need a bit of help with count() as so far I've
been unable to construct a valid expression to obtain what I need
Basically
what I'm trying to do is generate Table numbers relative to Chapters but only
for tables that contain a title element. Here's an example
structure
<chapter>
<p>...</p>
<table
class="topic/table">
<title class="table/title">(should
resolve to Table 1.1) ...<title>
...
</table>
<table class="topic/table>...</table>
<section>
<table> ...</table>
<table>
<title class="table/title">(should resolve to
Table 1.2) ...<title>
...
</table>
</chapter>
<chapter>
<table
class="topic/table>>...</table>
<section>
<p>
<table class="topic/table">
<title class="table/title">Should resolve to Table 2.1
</title>
...
</table>
</p>
</section>
</chapter>
Getting the
chapter number is easy enough 'count(preceding::chapter)+1' but what I'm having
problems with is the Table number in relation to the chapter
I can get the
Table position in relation to the document
via
select="count(preceding::*[contains(@class,' topic/table
')]/*[contains(@class,' topic/title ')])+1"
but I'm not quite sure how to
combine the 2 expressions to give me the proper count in relationship to the
current <chapter>
Any help would be much appreciated.
-Kit
--~------------------------------------------------------------------
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>
--~--