This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 24572 - What happens to xml-compatible attributes? @lang is equivalent in structure to xml:lang, with the only ecception that the latter is in XML namespace in XHTML documents. Does XML compatibility means no [...]
Summary: What happens to xml-compatible attributes? @lang is equivalent in structure t...
Status: RESOLVED WONTFIX
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-07 01:44 UTC by contributor
Modified: 2014-02-10 14:18 UTC (History)
4 users (show)

See Also:


Attachments

Description contributor 2014-02-07 01:44:08 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html
Multipage: http://www.whatwg.org/C#html-namespace
Complete: http://www.whatwg.org/c#html-namespace
Referrer: http://www.whatwg.org/specs/web-apps/current-work/multipage/

Comment:
What happens to xml-compatible attributes? @lang is equivalent in structure to
xml:lang, with the only ecception that the latter is in XML namespace in XHTML
documents. Does XML compatibility means no longer having to state both @lang
and @xml:lang in polyglot or xhtml-oriented documents?
(master.skywalker.88@gmail.com)

Posted from: 78.13.41.248
User agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36
Comment 1 Simon Pieters 2014-02-07 08:16:49 UTC
The definition of "XML-compatible attributes" is unrelated to lang/xml:lang.

The definition is used for data-* attributes so that e.g. data-%="" is not allowed (because it's not well-formed in XML) even though it would parse fine in text/html.
Comment 2 Andrea Rendine 2014-02-07 11:35:55 UTC
Then I misunderstood the constraints, because i thought that XML compatibility as defined in the text should exclude xml:lang and therefore this should be entirely avoided and substituted with @lang. Is it still compatible with the specs and allowed in polyglot documents?
Comment 3 Ian 'Hixie' Hickson 2014-02-07 17:30:34 UTC
I don't understand the question here. Can you elaborate?
Comment 4 Andrea Rendine 2014-02-07 18:50:34 UTC
"Attribute names are said to be XML-compatible if they match the Name production defined in XML, they contain no U+003A COLON characters (:), and their first three characters are not an ASCII case-insensitive match for the string "xml"."
So xml:lang is not xml-compatible, right? Even if it is used to define the native language for HTML document served as XHTML?
Comment 5 Ian 'Hixie' Hickson 2014-02-07 22:12:16 UTC
The attribute local name "xml:lang" is not XML compatible, right. You can't create such an attribute in XML content. (In XML, if you use the literal string "xml:lang", you end up with an attribute with the local name "lang" and the prefix "xml".) Does that answer your question or is there something wrong in the spec? I'm not sure I follow what's being asked here.
Comment 6 Andrea Rendine 2014-02-07 22:16:38 UTC
Now everything is clear, thank you very much because I think the xml:lang is an old issue for web developers concerned with XHTML. 
Therefore there is nothing wrong in the spec.
Comment 7 Simon Pieters 2014-02-10 14:18:50 UTC
(In reply to Andrea Rendine from comment #2)
> Then I misunderstood the constraints, because i thought that XML
> compatibility as defined in the text should exclude xml:lang

It does.

> and therefore
> this should be entirely avoided and substituted with @lang.

This doesn't follow. The spec doesn't require all attributes to be "XML compatible".

http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#the-lang-and-xml:lang-attributes allows no-namespace xml:lang in text/html.

> Is it still
> compatible with the specs and allowed in polyglot documents?

http://dev.w3.org/html5/html-polyglot/#language-attributes