RE: Data Integration at runtime using XSL
Hi David, That code is giving the output. But we have two requirements. 1. Output in CSV format. 2. Selected field ids. (The solution posted earlier by you copies all the elements) Thanks & Regards, Ambika Prasad Das -----Original Message----- From: David Carlisle [mailto:davidc@xxxxxxxxx] Sent: Tuesday, September 19, 2006 3:33 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: Data Integration at runtime using XSL > Just to add one more point. The given solution is not working for > XSLTC. The version you posted back was the XSLT2 version, and XSLTC is an XSLT1 system. I posted an XSLt1 stylesheet earlier. > I want the output in CSV format. The final output is as follows. earlier you said you wanted > > The output required is > <header> > abc > </header> > <main-element> > <fid id='DATA_STATUS'>0</fid> > </ main-element > which is what the stylesheets I posted did. The code you posted just now has undefined variables as your XSLT processor should have told you. saxon says: Error at xsl:when on line 16 of file:/c:/tmp/hmmm.xsl: Variable varString has not been declared Error at xsl:value-of on line 18 of file:/c:/tmp/hmmm.xsl: Variable varString has not been declared Error at xsl:value-of on line 21 of file:/c:/tmp/hmmm.xsl: Variable varString has not been declared Transformation failed: Failed to compile stylesheet. 3 errors detected. these lines are _inside_ the definition of varString, so there is no binding of the variable at that point. Just take the code posted earlier for iterating through a | separated string using xslt1 and then if you want to use , rather than elements just generate commas with <xsl:text>,</xsl:text> David
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