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

xsl templates, Removing spurious namespace declaration

Subject: xsl templates, Removing spurious namespace declarations in output elements
From: "Tim Wilkins" <Tim.Wilkins@xxxxxxxxxxxxxxxx>
Date: Tue, 8 Apr 2003 18:43:29 +0100
xsl remove namespace
I require as final output an XML file without any use of namespaces.  The
input data does make use of namespaces, although this is part of a multiple
pass operation and I have elements which don't use namespaces by this stage.
I wish to copy some of these elements without changing them, and have tried,
for example

<xsl:template match="Attribute">
   <xsl:copy-of select="current()"/>
</xsl:template>

The template copies the elements as required, except that I get spurious
namespace declarations such as "xmlns:gml="http://www.opengis.net/gml" in
the output (as attributes on the "Attribute" output element), even though
the xsl:stylesheet specifically excludes them (using
exclude-result-prefixes).  How do I get rid of them?  My guess is that,
since I'm trying to copy an element without a namespace it is assuming that
any could apply, but in this case none do (the output uses a DTD).  I also
get namespace declarations from the input file, not mentioned by the style
sheet, and I wish to exclude these as well, without making the stylesheet
depend upon these.

Thank you,

Tim Wilkins


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.