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

Re: determine if a value exist in the following-siblin

Subject: Re: determine if a value exist in the following-sibling
From: Red Light <skydelta98@xxxxxxxxx>
Date: Tue, 5 Apr 2011 03:09:19 -0700 (PDT)
Re:  determine if a value exist in the following-siblin
Hi Andrew,

thanks a lot

--- On Tue, 4/5/11, Andrew Welch
<andrew.j.welch@xxxxxxxxx> wrote:

> From: Andrew Welch
<andrew.j.welch@xxxxxxxxx>
> Subject: Re:  determine if a value exist in
the following-sibling
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Cc: "Michel
Hendriksen" <michel.hendriksen@xxxxxxxxx>
> Date: Tuesday, April 5, 2011, 9:59
AM
> Typically use normalize-space() to
> check for non-whitespace content.
>
> To check that the first <amount> following sibling
> has a value with
>
something in it:
> 
> following-sibling::amounts[1]/value[normalize-space(.)]
> 
> For any remove the [1], or to check that the very next
> element is an
<amount>
> 
> following-sibling::*[1][self::amounts]/.....
> 
> 
> 
> On 5
April 2011 10:48, Michel Hendriksen <michel.hendriksen@xxxxxxxxx>
> wrote:
> >
string-length(value) > 0
> >
> > On Tue, Apr 5, 2011 at 11:42 AM, Red Light
<skydelta98@xxxxxxxxx>
> wrote:
> >> Hi,
> >>
> >> please anyone can help me
with this expression,
> >>
> >> i got the following xml :
> >> <amounts>
> >>
       <period_id>1</period_id>
> >>        <value>1</value>
> >> </amounts>
>
>> <amounts>
> >>        <period_id>2</period_id>
> >>        <value></value>
> >> </amounts>
> >>
> >> in my code i have <xsl:for-each
> select="amounts">
> >>
> >> and i want to test if the next elements of amounts
> have a "value"
or not,
> >> i'm using xslt 1.0 with xalan/apache fop.
> >>
> >> NB: i tried
with the
> following:boolean(following-sibling::amount/text())
> >> but the
expression is wrong ....
> >>
> >> and thanks a lot for you help
> >>
> >>
>
--~------------------------------------------------------------------
> >>
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@xxxxxxxxxxxxxxxxxxxxxx>
> >> --~--
> >>
> >>
> >
> >
> --~------------------------------------------------------------------
>
> 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@xxxxxxxxxxxxxxxxxxxxxx>
> > --~--
> >
> >
> 
> 
>
> -- 
> Andrew Welch
> http://andrewjwelch.com
> 
>
--~------------------------------------------------------------------
>
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@xxxxxxxxxxxxxxxxxxxxxx>
> --~--

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.