ldodgen Posted March 3, 2006 Share Posted March 3, 2006 An XML document has an element with an attribute and i'm trying to assign that attribute to a variable in XSLT. Can't remember how to do that. HELP!!XML:<1stElement> <2ndElement type="leaf"> <3rdElement></3rdElement>XSL:<xsl:variable name="type" select="1stElement/2ndElement **What goes here, to link to the attribute of 2nd Element** " /> Link to comment Share on other sites More sharing options...
boen_robot Posted March 3, 2006 Share Posted March 3, 2006 <xsl:variable name="type" select="1stElement/2ndElement/@type " /> I think this should do it. Use the XPath tutorial next time. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now