I have a richtext field in the schema (Tridion 2011 SP1), with the XSLT base filter attached (by default XSLT or normal, it does not matter for this problem).
In IE9, when I create a component based on this schema, XHTML on the Source tab is displayed fine, without any namespace, for example:
<p>a paragraph</p> <p> <a href="http://www.sdltridion.com">a link</a> </p>
I can save the component.
But in Firefox (16.0.2, unsupported) the namespace is displayed on the Source tab:
<p xmlns="http://www.w3.org/1999/XSL/Transform">a paragraph</p> <p xmlns="http://www.w3.org/1999/XSL/Transform"> <a href="http://www.sdltridion.com">a link</a> </p>
resulting in the following XML validation error:
The paragraph element in the namespace 'http://www.yme.com/GeneralContent' has an invalid child element 'p' in the namespace 'http://www.w3.org/1999/XSL/Transform'. List of possible expected elements: any element in the namespace 'Http://www.w3.org/1999/xhtml' ..
Now I know that this is an unsupported version of Firefox, but where does this namespace come from? The namespace defined in Richtext XSLT is http://www.w3.org/1999/XSL/Transform ...
And does anyone know of a possible workaround?
This is XSLT filtering, but as I said, this also happens with XSLT by default:
<stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform"> <output omit-xml-declaration="yes" method="xml" cdata-section-elements="script"></output> <template match="/ | node() | @*"> <copy> <apply-templates select="node() | @*"></apply-templates> </copy> </template> <template match="*[(self::br or self::p or self::div) and normalize-space(translate(., ' ', '')) = '' and not(@*) and not(processing-instruction()) and not(comment()) and not(*[not(self::br) or @* or * or node()]) and not(following::node()[not((self::text() or self::br or self::p or self::div) and normalize-space(translate(., ' ', '')) = '' and not(@*) and not(processing-instruction()) and not(comment()) and not(*[not(self::br) or @* or * or node()]))])]"> </template> <template match="br[parent::div and not(preceding-sibling::node()) and not(following-sibling::node())]"> <text></text> </template> <template match="table|td|tr|th|tbody|p|div|a"> <element name="{name()}"> <choose> <when test="name() ='img'"> <for-each select="@*"> <attribute name="{name()}"> <value-of select="."></value-of> </attribute> </for-each> </when> <otherwise> <for-each select="@*"> <choose> <when test="name() ='border'"></when> <when test="name() ='cellpadding'"></when> <when test="name() ='cellspacing'"></when> <when test="name() ='bgcolor'"></when> <when test="name() ='bordercolor'"></when> <when test="name() ='width'"></when> <when test="name() ='height'"></when> <when test="name() ='bordercolor'"></when> <when test="name() ='span'"></when> <when test="name() ='style'"></when> <when test="name() ='class'"> <choose> <when test=". ='MsoNormal'"></when> <otherwise> <attribute name="{name()}"> <value-of select="."></value-of> </attribute> </otherwise> </choose> </when> <otherwise> <attribute name="{name()}"> <value-of select="."></value-of> </attribute> </otherwise> </choose> </for-each> </otherwise> </choose> <apply-templates></apply-templates> </element> </template> <template match="h1"> <element name="h2"> <apply-templates></apply-templates> </element> </template> <template match="td/p"> <apply-templates></apply-templates> </template> <template match="li/p"> <apply-templates></apply-templates> </template> <template match="link|script|font|iframe|ilayer|layer|span|small"> <apply-templates></apply-templates> </template> </stylesheet>