Re: [xsl] [Fwd: Excluding unused and duplicate namespace declarations]

Subject: Re: [xsl] [Fwd: Excluding unused and duplicate namespace declarations]
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Mon, 19 Mar 2007 00:32:44 +0100
Ryan Puddephatt wrote:
Hi all,
I'm trying to remove all the unused and duplicate declarations from my document, but they can change depending on the input, is there an easy way to do this?


Thanks in advance

Ryan

If you transform something with XSLT 2.0, you can set exclude-result-prefixes="#all" on the main xsl:stylesheet or xsl:transform element, which will remove all namespace declarations that are unused.


It doesn't matter whether your prefixes change. If your namespace changes, your whole document (i.e, the identity of your document and nodes) changes and you'll have to pull other tricks. But different namespaces for the same content are unlikely, so I presume you meant prefixes, right?

-- Abel Braaksma
  http://www.nuntia.nl

Current Thread