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

RE: position() and last() problem

Subject: RE: position() and last() problem
From: "Andrew Welch" <AWelch@xxxxxxxxxxxxxxx>
Date: Wed, 8 Jan 2003 16:44:28 -0000
position last
Hi,

Would 
 
 <xsl:if test="parent::view and not(parent::view/following-sibling::view)">

be what you are after?

cheers
andrew



> -----Original Message-----
> From: jfi@xxxxxxxxxxxxxxxx [mailto:jfi@xxxxxxxxxxxxxxxx]
> Sent: 08 January 2003 15:43
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  position() and last() problem
> 
> 
> 
> Hi List,
> 
> I´ve got a problem finding out whether a parent element is a 
> "last()" one.
> I read the FAQ but it didn´t help.
> 
> My XML file has the following structure:
> 
> <views>
>   <view>
>     <stuff>...</stuff>
>   </view>
>   <view>
>     <stuff>...</stuff>
>     <view>
>       <stuff>...</stuff>
>       <view>
>         <stuff>...</stuff>
>       </view>
>        <view>
>         <stuff>...</stuff>
>       </view>
>     </view>
>     <view>
>       <stuff>...</stuff>
>     </view>
>   </view>
> </views>
> 
> That means each <view>-element can contain an undefined 
> number of other
> <view>s. What I want to know is whether the parent of a 
> <view> - if it is
> also the view - is the last one.
> 
> I tried <xsl:if test="ancestor::con:view[1][position()]!=last()">, but
> understanding more and more of XSLT I know that can´t work. 
> But I don´t
> know yet what can.
> All whitespace is stripped.
> 
> Thanks for your help!
> 
> Julia
> 
> 
> 
> 
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
> 
> 
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.427 / Virus Database: 240 - Release Date: 06/12/2002
>  
> 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.427 / Virus Database: 240 - Release Date: 06/12/2002
 

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.