[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: xml->xsl using xslt

Subject: Re: xml->xsl using xslt
From: "Spencer Tickner" <spencertickner@xxxxxxxxx>
Date: Mon, 11 Feb 2008 09:02:28 -0800
Re:  xml->xsl using xslt
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.