Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Newbie Question removing 'namespace elements'

From: allendavidson@-----------.---------.---
To: NULL
Date: 5/12/2008 3:52:00 AM

Hi,

I'm trying to apply an XSLT to some XML to change the following.

1.	Wrap a <root></root> element around all the XML (XML will later be read 
by SSIS and the XML reader apparently ignores root level elements so I am 
trying to promote all existing elements one level)

2.	Remove the namespaces xmlns="http://webservices.ecircle-ag.com/ecm" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

My XML is:


And my XSLT is:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
exclude-result-prefixes="#default xsl xsi">

	<xsl:template match="/">
		<root>
		<xsl:copy-of select="."></xsl:copy-of>
		</root>
	</xsl:template>
	
</xsl:stylesheet>


The wrapping of <root></root> works but I cant strip out the namespaces (not 
sure if i'm using the correct terminology here). Any Ideas (NB very new to 
XML)

Thanks
Allen


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent