From 43ec088367a27d3263dd45148067175d453b94c5 Mon Sep 17 00:00:00 2001 From: Fuqiao Xue Date: Tue, 20 May 2025 12:45:28 +0800 Subject: [PATCH] Include a reference to the defintion of xml:lang Fix #150. --- questions/qa-when-xmllang.en.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/questions/qa-when-xmllang.en.html b/questions/qa-when-xmllang.en.html index 8f4e4b61..a49751bc 100644 --- a/questions/qa-when-xmllang.en.html +++ b/questions/qa-when-xmllang.en.html @@ -20,8 +20,8 @@ f.path = '../' // what you need to prepend to a URL to get to the /International directory // AUTHORS AND TRANSLATORS should fill in these assignments: -f.thisVersion = { date:'2016-02-11', time:'09:40'} // date and time of latest edits to this document/translation -f.contributors = '' // people providing useful contributions or feedback during review or at other times +f.thisVersion = { date:'2025-05-20', time:'09:40'} // date and time of latest edits to this document/translation +f.contributors = 'Steven Pemberton' // people providing useful contributions or feedback during review or at other times // also make sure that the lang attribute on the html tag is correct! f.sources = '' // describes sources of information @@ -63,7 +63,7 @@

Question

Sometimes documents contain or include different types of natural language content. Other times they need to store a natural language value as data or meta-data about something external to the document. Because these different applications use similar formats, schema - designers are sometimes confused about when they should use xml:lang and when to define their own language-related element or attribute.

+ designers are sometimes confused about when they should use xml:lang and when to define their own language-related element or attribute.

For example, in XHTML 1.0, there is an hreflang attribute and also an xml:lang (or lang attribute, in the case of HTML) for the content of the a element:

<a xml:lang="en" href="xyz" hreflang="de">Click for German</a>

@@ -188,6 +188,9 @@

Further reading

  • BCP 47, Tags for the Identifying Languages Specifies how to use language tags in xml:lang values.

  • +
  • +

    XML 1.0 Specification, Section 2.12 The defining document for the xml:lang attribute.

    +
  • Language tags in HTML and XML Describes how to use language tags.