This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: parent()



 

   I tried to get the value of the id attribute of a parent 'element' node. 

   <xsl:value-of select="../@id"/>         returns nothing don't know why...


This is the correct expression.
Usual reasons for not getting the value you expect is that the current
node is not what you think it is.

   <xsl:value-of select="../element"/>     returns the subtree

If you ask for the string value of an element you get the character data
of all the descendents of the element.


David



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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]