[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] xml->xsl using xslt
Subject: Re: [xsl] xml->xsl using xslt From: "Spencer Tickner" <spencertickner@xxxxxxxxx> Date: Mon, 11 Feb 2008 09:02:28 -0800 |
Possible,, and exactly what XSLT does. <?xml version='1.0'?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="text1"> <text2> <xsl:apply-templates/> </text2> </xsl:template> <xsl:template match="sample"> <sample1> <xsl:apply-templates/> </sample1> </xsl:template> <xsl:template match="text()"><xsl:value-of select="."/></xsl:template> </xsl:stylesheet> Should do it Spencer <xsl:template match="text1"> <text2> <xsl:applty-templates On Feb 11, 2008 8:58 AM, Rose Rose <rose2577@xxxxxxxxx> wrote: > Hi all: > > Is it possible to write an xslt to convert one xml > document to another by renaming the elements? > eg: if i have soemthing like this: > > <text1> > <sample>data</sample> > </text1> > > and I want to transform it to: > > <text2> > > <sample1>data</sample1> > </text2> > > Can I do something like this in xslt? > > Any suggestions/help appreciated. > > > ____________________________________________________________________________________ > Never miss a thing. Make Yahoo your home page. > http://www.yahoo.com/r/hs
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] xml->xsl using xslt, Rose Rose | Thread | Re: [xsl] xml->xsl using xslt, Spencer Tickner |
[xsl] xml->xsl using xslt, Rose Rose | Date | Re: [xsl] Sorting out rowspans, Andrew Welch |
Month |