Friends, Is it possible to generate a XML file using XSLT? If so can
Some one point me in the right direction as to how this can be
achieved?
Thanks
Sri
Oliver Wong - 25 Nov 2005 18:14 GMT
> Friends, Is it possible to generate a XML file using XSLT? If so can
> Some one point me in the right direction as to how this can be
> achieved?
I haven't worked with XSLT in a while, but my understanding is that it
can produce any String output given a XML file as an input.
This tutorial gives an example of transforming an XML file into another
XML file: http://www.w3schools.com/xsl/xsl_languages.asp
- Oliver
Oliver Wong - 25 Nov 2005 18:16 GMT
>> Friends, Is it possible to generate a XML file using XSLT? If so can
>> Some one point me in the right direction as to how this can be
>> achieved?
>
> I haven't worked with XSLT in a while, but my understanding is that it
> can produce any String output given a XML file as an input.
I just saw your other post which is older, and yet much clearer on the
requirements. XSLT, as far as I know, needs XML as input. If you don't have
an XML file to start with, you can't use XSLT.
- Oliver
Malte - 25 Nov 2005 18:32 GMT
> Friends, Is it possible to generate a XML file using XSLT? If so can
> Some one point me in the right direction as to how this can be
> achieved?
>
> Thanks
> Sri
Bascially, you can have XSLT generate anything. But you have to start
with an XML input. This may be transformed into another XML file.
Alan Krueger - 26 Nov 2005 01:47 GMT
> Friends, Is it possible to generate a XML file using XSLT? If so can
> Some one point me in the right direction as to how this can be
> achieved?
http://www.w3.org/TR/xslt#output
Note that the method attribute can be "xml".
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/">
<outputDocument>
<xsl:apply-templates/>
</outputDocument>
</xsl:template>
<!-- ... -->
</xsl:stylesheet>