[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] parameters or ancestor attributes ?!?!?!
I need to use a value of an upper node, but it doesn't seem to work. I have tried to use ancestor to access upper templates, pass the section's name attribute through a parameter from one template to another, and set variables to use in other templates. So far I have had no luck, the processor keeps telling me that the variable is not defined, etc. I am using lotusxsl_1_1_17 to process my xsl. Here is some of the code I've tried, any suggestions, better ways?? I have some XML code which looks like: <SECTION name=test1> <FIELD><NAME>subtest1</NAME></FIELD> <FIELD><NAME>subtest2</NAME></FIELD> <FIELD><NAME>subtest3</NAME></FIELD> </SECTION> <SECTION name=test2> <FIELD><NAME>subtest1</NAME></FIELD> <FIELD><NAME>subtest2</NAME></FIELD> <FIELD><NAME>subtest3</NAME></FIELD> </SECTION> I am trying to get an out put which has the value of the ancestor node. I want an out put to look like: test1.subtest1 test1.subtest2 test1.subtest3 test2.subtest1 test2.subtest2 test2.subtest3 XSL code that I tried: <xsl:template match="SECTION"> <xsl:call-template name="FIELD"> <xsl:with-param name="x"> <xsl:value-of select="@name"/> </xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template match="FIELD" name="FIELD"> <xsl:param name="x" select="default value"/> <xsl:value-of select="$x"/> <!-- I have also tried <xsl:copy-of select="$x"/> here --> <xsl:text>.</xsl:text> <xsl:value-of select="NAME"/> </xsl:template> begin:vcard n:Diodati;Dan x-mozilla-html:FALSE org:Nightfire Software adr:;;;;;; version:2.1 email;internet:dan@xxxxxxxxxxxxx title:Software Engineer fn:Dan Diodati end:vcard
|
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
|