Hi group a question about namespace attributes in html/xhtml. I'm looking at methods of conveying information to client side scripts in a neat manner within an HTML document and trying to be valid at the same time. My methods works but the validator complains about namespaced attributes.
Method 1: Namespace attributes - works but doesn't validate here's a document snippet <html xmlns="http://www.w3.org/1999/xhtml" xmlns:d="http://example.com/data" xml:lang="en" lang="en"> <!-- markup --> <div class="countries"> <div d:country="australia" d:code="au" d:capital="canberra">...</div> </div> <!-- more markup --> -- another example I found via google is available here (check the validator results) -> http://www.1729.com/examples/htmlannotation/HtmlAnnotationUsingNamespaceAttributes.html Method 2: multiple class names This is a bit more long winded but validates... a snippet ... <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <div class="countries"> <div class="country:australia code:au capital:canberra"> foo </div> </div> I'd really like to use Method 1 as it's the cleanest and doesn't involve unnecessary Javascript. The specs seem to allude to the fact that you can do this but the validator says no. Does anyone have some ideas about making it validate? Thanks James ******************************************************************* List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *******************************************************************
