views:

40

answers:

1

I am trying to do xsl transformation in javascript in firefox 3.5. The transformed value has something like this:

<span xmlns="http://www.w3.org/1999/xhtml/"&gt;...&lt;/span&gt;

How can I ensure that the xmlns isn't set here? This happens only in Firefox and not IE.

A: 

Why do you want to remove the namespace?

The purpose of namespaces are not always well understood or appreciated.

If you are transforming to XHTML, the namespace is valid (and can be useful). It tells you(and more importantly, the browser) what type of span element you are dealing with so you can decide how to render it. Depending on the vocabulary, or the version of the vocabulary, you may decide to handle the XML differently.

Mads Hansen