xsl-list
[Top] [All Lists]

RE: [xsl] Data Integration at runtime using XSL

2006-09-19 03:07:02
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(_at_)nag(_dot_)co(_dot_)uk] 
Sent: Tuesday, September 19, 2006 3:33 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] 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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--