- From: Yves Savourel <ysavourel@enlaso.com>
- Date: Mon, 28 Jan 2013 14:40:04 -0700
- To: <public-multilingualweb-lt-tests@w3.org>
Hi all, This is a bit off topic, but since several of us are using the validator.nu parser for HTML5, maybe someone has already run into this question: I'm trying to implement the xml:lang precedence over lang in XHTML but I have a strange xml:lang attribute in the parsed elements. I have this input: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head><title>title</title> </head> <body> <p lang='es' xml:lang='pt'>t1</p> </body></html> and when I try to look up the xmlLang attribute for p with getAttributeNodeNS(XML_NS_URI, "lang") I get null. I've looked at the parsed attributes and it looks like this: [lang="es", xmlU00003Alang="pt"] For some reason xml:lang is represented as 'xmlU00003Alang' (with a null namespace). So, sure, I can access it and work, but this looks really wrong to me. Any of you ran into the same issue and has a clue why this happens? cheers, -yves
Received on Monday, 28 January 2013 21:40:32 UTC