[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xsl templates, Removing spurious namespace declaration
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|