覆盖Sitecore中的富文本字段的XHTML验证

时间:2011-02-09 11:22:50

标签: xsd sitecore xml-validation sitecore6

我正试图在this article中详细嵌入一些渲染图。但是,当我尝试将渲染添加到Rich Text字段时,我得到了XHTML验证错误。我无法为客户端禁用XHTML验证,因此我想扩展用于验证的模式。它存储在/ sitecore / shell / schemas目录中。

我想要嵌入的渲染的标记是:

<smart:addresssnippet runat="server" />

我尝试为智能命名空间添加新架构,但这似乎不起作用。当我回到Rich Text字段的HTML时,Sitecore已将代码重写为:

<smart:addresssnippet runat="server" xmlns:smart="http://www.sitecore.net/xhtml"></smart:addresssnippet>

验证失败。有没有人遇到过这种情况或者将渲染添加到验证模式的方法?

2 个答案:

答案 0 :(得分:2)

我已经测试过在我的本地实例上将以下xml添加到sitecore \ shell \ Schemas \ xhtml.xsd,它会根据需要呈现标记,并且在富文本编辑器中没有验证错误。

  <xs:element name="smart:addresssnippet">
    <xs:complexType mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
      </xs:choice>
    </xs:complexType>
  </xs:element> 

答案 1 :(得分:0)

我会联系Sitecore支持here(如果您有登录信息),或者您也可以尝试here