Subject: Re: [xsl] xml->xsl using xslt From: "Spencer Tickner" <spencertickner@xxxxxxxxx> Date: Mon, 11 Feb 2008 09:03:51 -0800 |
Ignore the stuff under my name,, copy and paste error ;) On Feb 11, 2008 9:02 AM, Spencer Tickner <spencertickner@xxxxxxxxx> wrote: > 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 -> |
---|---|---|
Re: [xsl] xml->xsl using xslt, Spencer Tickner | Thread | Re: [xsl] xml->xsl using xslt, Andrew Welch |
Re: [xsl] Sorting out rowspans, Andrew Welch | Date | [xsl] Merge two xml files into one , Kerry, Richard |
Month |