Hi there
I have a XSLT problem. If you think this is the wrong list to ask such a
question, please tell me, where to go. My problem is, that I need a very
rapid answer, as I have to solve this problem till tomorrow at 11 UTC, (in
about 14 hours from now). Maybe there is someone, who can give me an advice,
I would tremendously appreciate it. Thanks.
I have a file like the following:
<doccontents>
<body>
<p>
<pagenumber>88</pagenumber>
</p>
</body>
<body>
</body
<image>
<imageref>
</imageref>
</image>
<body>
</body>
<image>
<imageref>
</imageref>
</image>
<body>
</body>
<body>
</body>
<body>
<p>
<pagenumber>90</pagenumber>
</p>
</body>
</body>
<body>
</body
<image>
<imageref>
</imageref>
</image>
<body>
</body>
<body>
<p>
<pagenumber>90</pagenumber>
</p>
...
</doccontents>
The number of bodies is inconsistent, the only value that can deliminate the
entries (one entry goes from pagenumber to the next) is pagenumber.
Sometimes there is one image, sometimes three. Has anyone an idea how I
could get out the images per pagenumber (as an example the images contained
between pagenumber 88 and pagenumber 90)?
I would like to write something like
<xsl:if test="$image1 before next pagenumber">
<xsl:value-of select="$image1"/>
</xsl:if>
<xsl:if test="$image2 before next pagenumber">
<xsl:value-of select="$image2"/>
</xsl:if>
<xsl:if test="$image3 before next pagenumber">
<xsl:value-of select="$image3"/>
</xsl:if>
*instead of before next pagenumber it could also be "between current
pagenumber and next pagenumber". The problem is that the images are anywhere
in between, maybe after 5, maybe after one body.