Subject: Re: [xsl] create xml from incoming xml and load it into a variable From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx> Date: Fri, 25 Jul 2008 11:02:28 +0100 |
2008/7/25 sudheshna iyer <sudheshnaiyer@xxxxxxxxx>: > How do I create xml from incoming xml and load it into a variable from xsl? Afterr loading I > > have to loop through the variable for doing more xsl transformations? > > My xsl has incoming xml. I have to create another xml of different format, put it in a variable > and loop through that variable to apply more xsl transformations. Do the first pass in a variable: <xsl:variable name="first-pass"> <xsl:apply-templates mode="first-pass"/> </xsl:variable> The do the second pass by calling apply-templates on the first pass: <xsl:apply-templates select="$first-pass"/> ...or something similar - you may want to mode the second pass if it's less work. Remember to have two root match templates, one moded, to ensure do don't get infinite recursion. If the first pass could be a one-off batch process, then you're better off separating out the transforms than repeatedly doing the first pass each time. -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] create xml from incoming , David Carlisle | Thread | Re: [xsl] create xml from incoming , sudheshna iyer |
Re: [xsl] create xml from incoming , David Carlisle | Date | [xsl] RE: [spam?] [xsl] create xml , Sedov, Vyacheslav - |
Month |