Subject: [xsl] generating xml from xslt From: Sarkup Sarkup <sarkups@xxxxxxxxx> Date: Tue, 26 Aug 2008 08:46:49 -0700 (PDT) |
Hi: I have an xslt through which I am generating an XML file. <root> <status> <locn> <loc1> <address> <add1/> <add2/> <add3/> </address> </loc1> </locn> </status> <main> <para>This is a test only</para> </main> </root> I need to write an XSLT to generate this XML file. However, the values of add1, add2 and add3 are required to be entered at runtime. So I need to generate atleast 5 such xml files with different values for add1, add2 and add3. How do I do this? I started writing an XSLT for this. Here is what I have written so far. This is not complete and accurate so please let me know how to achieve this. <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml"/> <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> <xsl:template match="/root/status/locn/loc1/address"> <xsl:element name="add1"></xsl:element> <xsl:element name="add2"></xsl:element> <xsl:element name="add3"></xsl:element> </xsl:template> </xsl:stylesheet> Thank you
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XSLT Web based Editing/Au, Karl Stubsjoen | Thread | Re: [xsl] generating xml from xslt, Martin Honnen |
[xsl] XSLT Web based Editing/Author, Senthilukvelaan | Date | Re: [xsl] generating xml from xslt, Martin Honnen |
Month |