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

how to "print" xsl:element result from inside a functi

Subject: how to "print" xsl:element result from inside a function?
From: "Mtekel" <thx@xxxxxxxxx>
Date: Sun, 10 May 2009 05:34:38 +0200
 how to "print" xsl:element result from inside a functi

I have a question concerning getting the output from the recursively called

In short, I have code:

<xsl:function name="F:TagIT" as="xs:string">
	<xsl:param name="TAG"/>
	<xsl:element name="{$TAG}">MISSING!</xsl:element>

<xsl:function name="F:AddMissing" >
	<xsl:param name="List" />
		<xsl:if test="not(empty($List))">
		<xsl:variable name="TAG" select="subsequence($List,1,1)"/>

		<xsl:value-of select="F:TagIT($TAG)"/>

		<xsl:value-of select="F:AddMissing(remove($List,1))"/>

And then later I call the function by:

<xsl:value-of select="F:AddMissing(('Test1','t2','tst3'))"/>

It will print MISSING!MISSING!MISSING! - but without the XML tags generated
by xsl:element.

When I debug the program in Altova XML spy and go step by step, I can see
that the correct tag is generated in F:TagIT, but then as the recursion goes
on, it is lost - it seems to me like if the output of the function was
lost... however the word MISSING is printed without problems...

Do you know how to solve this?

Any advice appreciaded.

Thx in advance.

Current Thread


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.
First Name
Last Name
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.