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

Function from-ancestors and parent element name.

Subject: Function from-ancestors and parent element name.
From: Stephane St-Denis <Stephane.St-Denis@xxxxxx>
Date: Wed, 08 Sep 1999 11:41:22 -0400
xsl parent ancestor
Hi everybody!

I would like to know if it is possible to pass in parameter for the
function from-ancestors
a reference of a element.

This is my example :

 <xsl:for-each select=".//name">
  <div>
   <xsl:attribute name="style">
    <xsl:text>margin-left:</xsl:text>

    '********* I would like to have a count of the
    ' ******** parent of the name element *****
    <xsl:value-of select="count(from-ancestors(parent(.)))"/>
    <xsl:text>em</xsl:text>
   </xsl:attribute>
 </xsl:for-each>


I have a error pattern match when i use this statement :
count(from-ancestors(parent(.))).
I have no choice to use in parameter "parent(.)" because i don't know
what is the name
of the parent element.

I would like to now if this statement is supported.  If not, I replace
this by what???

Thanks !!!


 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.