Anne van Kesteren

WML 1.3 and xml:lang

As Opera has support for WML I thought I would read the specification for a bit. I started with the first one, Wireless Markup Language 1.3 (beware, PDF). Some people who developed the specification apparently wanted some pet features in, like supporting ­ and   in addition to the five predefined XML entities. Opera does not support that, fortunately. Special meaning is also defined for the $ character. Bah! You have to escape it as $$ if you actually want to use it. There is a lot more horror in there. Anyway, then I came at the xml:lang section. Despite that section 2.12 of the XML specification clearly defines how it works, the WML specification says (emphasis mine):

An element’s language must be established according to the following precedence (from highest lowest):

  1. Based on the xml:lang attribute specified for the element.
  2. Based on the xml:lang attribute specified by the closest parent element.
  3. Based on any language information included in the transport and document meta data (see sections 6.1 and 11.3.2 for more detail).
  4. Based on user agent default preferences.