Skip to content

Include a reference to the defintion of xml:lang #657

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions questions/qa-when-xmllang.en.html
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -63,7 +63,7 @@ <h2>Question</h2>

<p>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 <code class="kw" translate="no">xml:lang</code> and when to define their own language-related element or attribute.</p>
designers are sometimes confused about when they should use <a href="https://www.w3.org/TR/xml/#sec-lang-tag"><code class="kw" translate="no">xml:lang</code></a> and when to define their own language-related element or attribute.</p>
<p>For example, in XHTML 1.0, there is an <code class="kw" translate="no">hreflang</code> attribute and also an <code class="kw" translate="no">xml:lang</code> (or <code class="kw" translate="no">lang</code> attribute, in the case of HTML) for the content of the <code class="kw" translate="no">a</code> element:</p>
<div class="example">
<p><code class="language-html">&lt;a xml:lang="en" href="xyz" hreflang="de"&gt;Click for German&lt;/a&gt;</code></p>
Expand Down Expand Up @@ -188,6 +188,9 @@ <h2>Further reading</h2>
<li>
<p><a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt"><cite>BCP 47, Tags for the Identifying Languages</cite></a> Specifies how to use language tags in <code class="kw" translate="no">xml:lang</code> values.</p>
</li>
<li>
<p><a href="https://www.w3.org/TR/xml/#sec-lang-tag"><cite>XML 1.0 Specification, Section 2.12</cite></a> The defining document for the <code class="kw" translate="no">xml:lang</code> attribute.</p>
</li>
<li>
<p><a href="/International/articles/language-tags/">Language tags in HTML and XML</a> Describes how to use language tags.</p>
</li>
Expand Down