兼容 XHTML 的实时通讯工具嵌入
可以将以下代码嵌入到网站中以添加 Windows Live Messenger 功能。 有什么方法可以使这个 XHTML 1.0 Transitional 兼容吗?
<div
id="Microsoft_Live_Messenger_PresenceButton_e17530aa6eff7871"
msgr:width="100"
msgr:backColor="#DBDBDB"
msgr:altBackColor="#FFFFFF"
msgr:foreColor="#424542"
msgr:conversationUrl="http://settings.messenger.live.com/Conversation/[email protected]&mkt=de-DE&useTheme=true&themeName=gray&foreColor=676769&backColor=DBDBDB&linkColor=444444&borderColor=8D8D8D&buttonForeColor=99CC33&buttonBackColor=676769&buttonBorderColor=99CC33&buttonDisabledColor=F1F1F1&headerForeColor=729527&headerBackColor=B2B2B2&menuForeColor=676769&menuBackColor=BBBBBB&chatForeColor=99CC33&chatBackColor=EAEAEA&chatDisabledColor=B2B2B2&chatErrorColor=760502&chatLabelColor=6E6C6C"></div>
<script type="text/javascript" src="http://messenger.services.live.com/users/[email protected]/presence?dt=&mkt=de-DE&cb=Microsoft_Live_Messenger_PresenceButton_onPresence"></script>
The following code can be embedded on a website to add windows live messenger functionality. Is there any way to make this XHTML 1.0 Translitional compliant?
<div
id="Microsoft_Live_Messenger_PresenceButton_e17530aa6eff7871"
msgr:width="100"
msgr:backColor="#DBDBDB"
msgr:altBackColor="#FFFFFF"
msgr:foreColor="#424542"
msgr:conversationUrl="http://settings.messenger.live.com/Conversation/[email protected]&mkt=de-DE&useTheme=true&themeName=gray&foreColor=676769&backColor=DBDBDB&linkColor=444444&borderColor=8D8D8D&buttonForeColor=99CC33&buttonBackColor=676769&buttonBorderColor=99CC33&buttonDisabledColor=F1F1F1&headerForeColor=729527&headerBackColor=B2B2B2&menuForeColor=676769&menuBackColor=BBBBBB&chatForeColor=99CC33&chatBackColor=EAEAEA&chatDisabledColor=B2B2B2&chatErrorColor=760502&chatLabelColor=6E6C6C"></div>
<script type="text/javascript" src="http://messenger.services.live.com/users/[email protected]/presence?dt=&mkt=de-DE&cb=Microsoft_Live_Messenger_PresenceButton_onPresence"></script>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 XHTML 中,& 符号始终启动一个实体。 因此,您需要将所有 & 符号替换为
&
以获得有效的 XML。由于 XHTML1.0 是在 DTD 中指定的,并且 DTD 无法处理名称空间,因此该代码永远不会是技术上有效的 XHTML1.0 Transitional。 无论如何,任何理智的应用程序都会这样对待它。
In XHTML, the ampersand always initiates an entity. Therefore, you need to replace all ampersands with
&
to get valid XML.Since XHTML1.0 is specified in a DTD and DTDs can not handle namespaces, the code will never be technically valid XHTML1.0 Transitional. Anyway, any sane application will treat it as such.