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

RE: Match first non-empty from different fragments

Subject: RE: Match first non-empty from different fragments
From: <Jarno.Elovirta@xxxxxxxxx>
Date: Fri, 21 Jan 2005 10:06:53 +0200
first non empty level
Hi,

> Context node is results (top level if that is what context
> node refers to)
>
> Also, above "There are man z:row" should read "There are many z:row"
>
> >  name: <xsl:value-of
> select="(result//rs:data/z:row/@name_of_event[string(.)])[last()]"/>
> >
> > provided event result always precedes meet result.
> It may or may not.

Ok, then you have to use some other expression.

> Can you explain the above select?  I don't get it.

The above first selects all result//rs:data/z:row/@name_of_event attributes
whose value is not empty string, then selects the last in document order.
However, if the order in your source is not stable, you have to use some other
system. Just use the xsl:choose to check if meet name is an empty string
(remember to make sure you're checking if the value is empty, not if the
attribute exists), then based on that select the result you want.

Cheers,

Jarno

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.