[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: generating xml from xslt

Subject: Re: generating xml from xslt
From: Sarkup Sarkup <sarkups@xxxxxxxxx>
Date: Tue, 26 Aug 2008 10:13:16 -0700 (PDT)
Re:  generating xml from xslt
Hi

Thanks for your help. Is there a quicker way of doing this instead of entering the value for the parameters everytime the transformation is run? I have xalan xslt processor. If I want to generate 50 files it will take a long time to run this transformaiton. 


--- On Tue, 8/26/08, Martin Honnen <Martin.Honnen@xxxxxx> wrote:

> From: Martin Honnen <Martin.Honnen@xxxxxx>
> Subject: Re:  generating xml from xslt
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Date: Tuesday, August 26, 2008, 3:59 PM
> Sarkup Sarkup wrote:
> 
> > <xsl:stylesheet version="1.0" 
> >
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> > <xsl:output method="xml"/>
> 
> 
> Define three global parameters
>    <xsl:param name="a1"/>
>    <xsl:param name="a2"/>
>    <xsl:param name="a3"/>
> so that you can provide values for the transformation then
> keep this 
> template
> 
> >  <xsl:template match="@*|node()">
> >   <xsl:copy>
> >    <xsl:apply-templates
> select="@*|node()"/>
> >   </xsl:copy>
> >  </xsl:template>
> 
> remove the following 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>
> 
> and add three templates
>    <xsl:template match="add1">
>      <xsl:copy>
>        <xsl:value-of select="$a1"/>
>      </xsl:copy>
>    </xsl:template>
>    <xsl:template match="add2">
>      <xsl:copy>
>        <xsl:value-of select="$a2"/>
>      </xsl:copy>
>    </xsl:template>
>    <xsl:template match="add3">
>      <xsl:copy>
>        <xsl:value-of select="$a3"/>
>      </xsl:copy>
>    </xsl:template>
> -- 
> 
> 	Martin Honnen
> 	http://JavaScript.FAQTs.com/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.