Question

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/IMMe.aspx?invitee=e17530aa6eff7871@apps.messenger.live.com&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/e17530aa6eff7871@apps.messenger.live.com/presence?dt=&mkt=de-DE&cb=Microsoft_Live_Messenger_PresenceButton_onPresence"></script>
Was it helpful?

Solution

In XHTML, the ampersand always initiates an entity. Therefore, you need to replace all ampersands with &amp; 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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top