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

RE: Converting XML to XML

Subject: RE: Converting XML to XML
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 17 Aug 2005 12:37:24 +0100
RE:  Converting XML to XML
Your stylesheet probably doesn't need to declare this namespace, so just
delete it: it's needed only when the target vocabulary is XSL-FO, but some
XSLT editors seem to declare it for you by default.

If you do need a namespace in your stylesheet that you don't want copied
into the result document, use the exclude-result-prefixes attribute to
exclude it.

Michael Kay
http://www.saxonica.com/
 

> -----Original Message-----
> From: ChandraShekar, A [mailto:ChandraShekar.A@xxxxxxxxxxx] 
> Sent: 17 August 2005 12:17
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE:  Converting XML to XML
> 
>  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:  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

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.