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

Re: Removing Namespace declaration from root element

Subject: Re: Removing Namespace declaration from root element [xsltproc XSLT 1.0]
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Fri, 17 Sep 2010 09:16:23 +0100
Re:  Removing Namespace declaration from root element
On 17/09/2010 8:00 AM, pankaj.c@xxxxxxxxxxxxxxxxxx wrote:
Hello all,

I am trying to remove namespace declaration from root element in my xml
input. Below is what it looks like:

Root Element:
=========
<chapter xmlns:sb="http://www.elsevier.com/xml/common/struct-bib/dtd"
xmlns:ce="http://www.elsevier.com/xml/common/dtd" xmlns:mml="
http://www.w3.org/1998/Math/MathML" xmlns:xlink="
http://www.w3.org/1999/xlink" xmlns:aid="
http://ns.adobe.com/AdobeInDesign/4.0/" xmlns:aid5="
http://ns.adobe.com/AdobeInDesign/5.0/" aid:pstyle="" aid5:tablestyle=""
version="5.2" xml:lang="en" docsubtype="chp" id="c0030">
<ce:footnote id="fn0010">
======

Desired Output
=========

<chapter version="5.2" xml:lang="en" docsubtype="chp" id="c0030">
<ce:footnote id="fn0010">


Your desired output is not namespace-well-formed (prefix ce is undeclared), so it's not possible to generate it using XSLT.

Michael Kay
Saxonica

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.