[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xml->xsl using xslt
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
|
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
|