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

Re: Style sheet to perform namespace mapping from inpu

Subject: Re: Style sheet to perform namespace mapping from input to output
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Tue, 25 Mar 2008 11:31:29 +0530
Re:  Style sheet to perform namespace mapping from inpu
David meant, you need to have following namespace declarations:

<xsl:stylesheet xmlns:old="http://old-schema-uri"
xmlns:new="http://new-schema-uri"


On 3/24/08, Farrukh Najmi <farrukh@xxxxxxxxxxxxxxxxxxxxx> wrote:
> Thanks David. The resulting style sheet gives an error similar to:
>
> ERROR:  'Namespace for prefix 'new' has not been declared.'
>
> I am assuming that I need to somehow add the 'new' namespace declaration
> via 'xmlns:new ' attribute in result tree.
>
> This is probably a dumb question but how do I replace xmlns:old
> namespace declaration with xmlns:new namespace declaration?
>
> Thanks again for your kind help.
>
> David Carlisle wrote:
> > declare old and new prefixes on xsl:stylesheet, then something like
> >
> > <xsl:template match="old:*">
> > <xsl:element name="new:{local-name(.)">
> >   <xsl:copy-of select="@*"/>
> >    <xsl;apply-templates/>
> >  </xsl:element">
> > </xsl:template>
> >
>
>
> --
> Regards,
> Farrukh Najmi
>
> Web: http://www.wellfleetsoftware.com


-- 
Regards,
Mukul Gandhi

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.