xsl-list
[Top] [All Lists]

Re: [xsl] yet another namespace question (unwanted xmlns=""

2010-08-14 09:14:19
Birnbaum, David J wrote:

Not a big deal at the moment, perhaps, but I would prefer not to have to suppress a 
namespace definition that appears to be irrelevant to the output separately, explicitly, 
and individually for every element I create in the svg namespace. Aside from the 
aesthetics, as the stylesheet grows beyond being a frustrating namespace exercise into 
something that generates useful output, there emerges a real development and maintenance 
cost. What I'd like to be able to do is include a declaration only once in the 
stylesheet, so that it will then apply automatically to exclude the xmlns="" 
where it isn't needed, that is, on elements in the svg namespace.

I've read, tinkered, and googled, but I seem to keep missing the solution. Since the 
default namespace isn't being used and the namespace of the literal result element is 
specified by a prefix, is there a graceful general (global) way to prevent the stylesheet 
from generating the superfluous xmlns="" output on what will eventually become 
more complex in-line svg?

Move the
  xmlns="http://www.w3.org/1999/xhtml";
to the xsl:stylesheet element. Currently you have it inside of a template so that it only applies to the elements created in that template.

--

        Martin Honnen
        http://msmvps.com/blogs/martin_honnen/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>