[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: checking sequential element

Subject: Re: checking sequential element
From: "Mandar Jagtap" <mandar.jagtap@xxxxxxxxx>
Date: Wed, 31 Dec 2008 12:11:16 +0530
Re:  checking sequential element
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@xxxxxxxxx> 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
>
>



-- 
Thanks & Regards,
Mandar

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.