|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Function from-ancestors and parent element name.
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








