It can be like this:
<xsl:template match="citref">
<xsl:if test="not(child::delim[preceding-sibling::*[1][name() = 'citau']])">
<xsl:message>citau does not followed by delim</xsl:message>
</xsl:if>
</xsl:template>
You need to consider other scenarios also for presence of delim as
well as citau.
Hope this helps!!
Mandar Jagtap
On Wed, Dec 31, 2008 at 12:00 PM, Ganesh Babu N
<nbabuganesh(_at_)gmail(_dot_)com> wrote:
Dear All,
I want to test the presence of <delim/> tag after </citau> in the
below example. If it is missing the XSL should raise an error.
<citref id="bib12">
<citaug>
<citau>
<citsname>Ferri</citsname>
<delim/>
<citfnames>E</citfnames>
</citau>
<delim/>
<cittext>(ed.).</cittext>
</citaug>
I have tried the following code but i am not getting the required result.
<xsl:template match="citref">
<xsl:if test="citau/following-sibling::*[1]/self::delim">
<xsl:message>citau does not followed by delim</xsl:message>
</xsl:if>
</xsl:template>
Please help me in getting the desired result.
Regards,
Ganesh
--~------------------------------------------------------------------
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>
--~--
--
Thanks & Regards,
Mandar
--~------------------------------------------------------------------
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>
--~--