[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xsl] Converting XML to XML
Subject: RE: [xsl] Converting XML to XML From: "ChandraShekar, A" <ChandraShekar.A@xxxxxxxxxxx> Date: Wed, 17 Aug 2005 16:47:12 +0530 |
Hello, I have written small program to convert XML to XML. But each XML tag contains xmlns:fo="http://www.w3.org/1999/XSL/Format" as a attribute. How to avoid this? -----Original Message----- From: Michael Kay [mailto:mike@xxxxxxxxxxxx] Sent: Wednesday, August 17, 2005 4:40 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] Converting XML to XML > > Is it possible to convert XML to XML using XSLT ? Yes, that's precisely what XSLT does. > > In my case Source is : > <a> > <b> > </b> > <c> > </c> > </a> > > Destination is : > > <x> > <y> > </y> > <z> > </z> > </x> > > Please provide me some sample code. > <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="a"> <x><xsl:apply-templates/></x> </xsl:template> <xsl:template match="b"> <y><xsl:apply-templates/></y> </xsl:template> <xsl:template match="c"> <z><xsl:apply-templates/></z> </xsl:template> </xsl:stylesheet> Michael Kay http://www.saxonica.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Converting XML to XML, Michael Kay | Thread | Re: [xsl] Converting XML to XML, David Carlisle |
RE: [xsl] Converting XML to XML, Michael Kay | Date | Re: [xsl] Converting XML to XML, David Carlisle |
Month |