Jay Bryant wrote:
Try changing the test to use the preceding-sibling axis, thus:
<xsl:when test="count(preceding-sibling::p) = 0">
That test catches the first p in a series of neighboring p elements.
Be aware that with large input files and with a not-too-optimizing
processor, this test might perform quadratic. If that happens, you can
try changing it to:
<xsl:when test="not(preceding-sibling::p[1])">
which will behave the same but is easier optimized by the processor.
A note to the OP: in your xsl:otherwise statement you have na added
xsl:if which seems redundant there because it tests for the inverse of
the xsl:when. If so intended, you can remove it.
Cheers,
-- Abel Braaksma
--~------------------------------------------------------------------
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>
--~--