Re: [xsl] transformation to create an XML file

Subject: Re: [xsl] transformation to create an XML file
From: Chris von See <chris@xxxxxxxxxxxxx>
Date: Fri, 22 Aug 2008 15:21:16 -0700
If you mean that you want to be able to change element names based on stylesheet parameters, you should be able to use <xsl:element name="{$parameterName}">...</xsl:element>, where "$parameterName" is the variable containing the name of the element you want to create.

If you want to change the content of elements with fixed names of "param1" and "param2" then you can definitely include content from stylesheet parameters using <xsl:value-of select="$paramData" /> where "$paramData" contains the content you want to place inside the param1 or param2 elements.


Cheers Chris


On Aug 22, 2008, at 3:15 PM, Sarkup Sarkup wrote:


I want to be able to create a dynamic xml file by passing parameters at run time. I know XSLT for styling. I want to now dynamically create an XML file.


--- On Fri, 8/22/08, Bordeman, Chris <Chris.Bordeman@xxxxxxxxxxxxxxxxx> wrote:


From: Bordeman, Chris <Chris.Bordeman@xxxxxxxxxxxxxxxxx>
Subject: RE: [xsl] transformation to create an XML file
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Date: Friday, August 22, 2008, 10:10 PM
That's exactly what XSLT is for.  Bare minimum, read the
tutorial
starting at http://www.w3schools.com/xsl/xsl_languages.asp.

Chris Bordeman
Senior Software Developer
AppOne, Inc., a Wolters Kluwer Financial Services Company
"Connecting dealers & lenders"
http://www.appone.net
http://www.dmsone.net
225. 754. 5912 (P)
866. 422. 9910 (F)


-----Original Message----- From: Sarkup Sarkup [mailto:sarkups@xxxxxxxxx] Sent: Friday, August 22, 2008 5:04 PM To: mulberry list Subject: [xsl] transformation to create an XML file

Hi:

I want to be able to write a transformation to create an
xml file like
this:


<root>


<param1></param1>
<param2></param2>

</root>

I want to define what param1 and param2 values will be when
I run the
tranformation. Is it possible to do this using XSLT? Can
anyone provide
me with some examples?

Thanks

Current Thread