开发者

XSL transformation in Firefox, how to omit xmlns in returned transform?

开发者 https://www.devze.com 2022-12-30 19:33 出处:网络
I am trying to do XSL transformation in javascript in Firefox 3.5. The transformed value has something like this:

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/">...</span>

How can I ensure that the xmlns isn't set here? This h开发者_如何学Cappens only in Firefox and not IE.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号