|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: xslt processing XML file by applying multiple tra
> Hello, > I have an XML document that i need to transform into > another XML document. To do that, I need to first > tranform the original XML document using one xsl file. > The the output XML generated in the first translation, > I need to again transform it to another XML using a > second xsl file. > > If possible, I want to do this by using a single xsl > file where i would somehow do the first translation > and then pass the whole result document throught a > second translation. u betcha! In XSLT 2.0: <xsl:template mode="pass1" match="/"> . . </xsl:template> <xsl:template mode="pass2" match="/"> . . </xsl:template> <xsl:variable name="pass1-result"> <xsl:apply-templates mode="pass1" select="/" /> </xsl:variable> <xsl:template match="/"> <!-- see note below --> <xsl:apply-templates mode="pass2" select="$pass1-result" </xsl:template> In XLST 1.0, the select attribute would be select="exslt:node-set($pass1-result)" where xmlns:exslt="http://exlst.org/common" HTH, - mark
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








