- From: Chris Lilley <chris@w3.org>
- Date: Tue, 25 Apr 2006 16:25:10 +0200
- To: "Anne van Kesteren" <annevk@opera.com>
- Cc: www-svg@w3.org, "Bjoern Hoehrmann" <derhoermi@gmx.net>
On Tuesday, April 25, 2006, 3:08:08 PM, Anne wrote: AvK> On Tue, 25 Apr 2006 15:03:13 +0200, Chris Lilley <chris@w3.org> wrote: >> You can, probably the DTD is not able to check this because the DTD >> language is not powerful enough, but the XHTML spec warns against doing >> so and its contrary to the XML specification. AvK> Does the XML specification forbid XML based languages to invent their own AvK> language tagging mechanism? It says: In document processing, it is often useful to identify the natural or formal language in which the content is written. A special attribute named xml:lang MAY be inserted in documents to specify the language used in the contents and attribute values of any element in an XML document.[...] The intent declared with xml:lang is considered to apply to all attributes and content of the element where it is specified, unless overridden with an instance of xml:lang on another element within that content. In particular, the empty value of xml:lang is used on an element B to override a specification of xml:lang on an enclosing element A, without specifying another language. Within B, it is considered that there is no language information available, just as if xml:lang had not been specified on B or any of its ancestors. Note: Language information may also be provided by external transport protocols (e.g. HTTP or MIME). When available, this information may be used by XML applications, but the more local information provided by xml:lang should be considered to override it. So, it allows other methods,such as out of band information from the protocol, but xml:lang overrides this if present o the tree or on a subtree. The lang attribute in HTML was grandfathered into XHTML, but XHTML makes it clear that xml:lang should be used, that lang may alsobe used,and that xml:lang takes precedence. >> AvK> ... using the lang DOM attribute on any XHTML element would also >> result in >> AvK> "lang" being set if I remember correctly, but that's less relevant. >> Actually no, that one is more relevant. Do you have a specific spec >> pointer handy? AvK> AvK> http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109/html.html#ID-59132807 Thanks. So, this is an HTML-specific method on the HTMLElement interface from DOM Level 2 - is there an equivalent method for XML? -- Chris Lilley mailto:chris@w3.org Interaction Domain Leader Chair, W3C SVG Working Group W3C Graphics Activity Lead Co-Chair, W3C Hypertext CG
Received on Tuesday, 25 April 2006 14:25:20 UTC