[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Data Integration at runtime using XSL


Subject: Re: [xsl] Data Integration at runtime using XSL
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 19 Sep 2006 11:02:37 +0100

> 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


Current Thread
Keywords