Permalink
Browse files

clean up attributes that specify MIME types. add more stuff for rel=a…

…lternate.

git-svn-id: http://svn.whatwg.org/webapps@485 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
1 parent c003af3 commit 5dcf8df6000454eb38f0b6b60c67d8f82d69125e @Hixie Hixie committed Jan 19, 2007
Showing with 57 additions and 33 deletions.
  1. +28 −16 index
  2. +29 −17 source
View
44 index
@@ -6646,9 +6646,7 @@ class="main"> or <div class="content">. Why do we also need a body?
<code><a href="#link0">link</a></code> element has the same semantics as
the <a href="#hreflang3"
title=attr-hyperlink-hreflang><code>hreflang</code> attribute on hyperlink
- elements</a>.</p>
- <!-- XXX type attribute parsing and semantics should be factored out
- as much as possible into a microsyntax -->
+ elements</a>.
<p>The <dfn id=type title=attr-link-type><code>type</code></dfn> attribute
gives the MIME type of the linked resource. It is purely advisory. The
@@ -6998,11 +6996,10 @@ class="main"> or <div class="content">. Why do we also need a body?
<p>The <code><a href="#style0">style</a></code> element allows authors to
embed style information in their documents. The <code><a
href="#style0">style</a></code> element is one of several inputs to the <a
- href="#styling1">styling processing model</a>.</p>
- <!-- XXX again, extract type out as a microsyntax -->
+ href="#styling1">styling processing model</a>.
<p>If the <dfn id=type1 title=attr-style-type><code>type</code></dfn>
- attribute is given, it must contain a MIME type, optionally with
+ attribute is given, it must contain a valid MIME type, optionally with
parameters, that designates a styling language. <a
href="#refsRFC2046">[RFC2046]</a> If the attribute is absent, the type
defaults to <code>text/css</code>. <a href="#refsRFC2318">[RFC2138]</a></p>
@@ -11440,9 +11437,7 @@ brighter. A &lt;b>rat&lt;/b> scurries past the corner wall.&lt;/p></pre>
href="#fallback">fallback content</a>. If the user agent can't display the
specified resource, e.g. because the given type is not supported, then the
user agent must use a default handler for the content. (This default could
- be as simple as saying "Unsupported Format", of course.)</p>
- <!-- XXX we really should factor out the common parts of type
- handling; at least the parsing and handling of parameters -->
+ be as simple as saying "Unsupported Format", of course.)
<p>The <dfn id=type4 title=attr-embed-type><code>type</code></dfn>
attribute, if present, gives the MIME type of the linked resource. The
@@ -11453,9 +11448,9 @@ brighter. A &lt;b>rat&lt;/b> scurries past the corner wall.&lt;/p></pre>
being embedded is defined as follows:
<ol>
- <li>If the element has a <code title=attr-link-type><a
- href="#type">type</a></code> attribute, then the value of the <code
- title=attr-link-type><a href="#type">type</a></code> attribute is the
+ <li>If the element has a <code title=attr-embed-type><a
+ href="#type4">type</a></code> attribute, then the value of the <code
+ title=attr-embed-type><a href="#type4">type</a></code> attribute is the
<span>content's type</span>.
<li>Otherwise, if the specified resource has <a href="#content-type1"
@@ -14982,9 +14977,10 @@ interface <dfn id=imagedata>ImageData</dfn> {
executed"</a> flag.</p>
<li>
- <p class=big-issue>How to handle the <code title="">type</code> and <code
- title="">language</code> attributes should be defined here, probably
- with reference to the next section.</p>
+ <p class=big-issue>How to handle the <code title=attr-script-type><a
+ href="#type9">type</a></code> and <code
+ title=attr-script-language>language</code> attributes should be defined
+ here, probably with reference to the next section.</p>
<li>
<p>If the element has a <code title=attr-script-src><a
@@ -19211,14 +19207,30 @@ mpt says:
<p>If the <code title=rel-alternate><a
href="#alternate0">alternate</a></code> keyword is used with the <code
title=attr-hyperlink-hreflang><a href="#hreflang3">hreflang</a></code>
- attribute, it indicates that the referenced document is a translation.
+ attribute, and that attribute's value differs from the <a
+ href="#root-element">root element</a>'s <span>language</span>, it
+ indicates that the referenced document is a translation.
<p>If the <code title=rel-alternate><a
href="#alternate0">alternate</a></code> keyword is used with the <code
title=attr-hyperlink-type><a href="#type14">type</a></code> attribute, it
indicates that the referenced document is a reformulation of the current
document in the specified format.
+ <p>The <code title=attr-hyperlink-media><a href="#media5">media</a></code>,
+ <code title=attr-hyperlink-hreflang><a
+ href="#hreflang3">hreflang</a></code>, and <code
+ title=attr-hyperlink-type><a href="#type14">type</a></code> attributes can
+ be combined when specified with the <code title=rel-alternate><a
+ href="#alternate0">alternate</a></code> keyword.
+
+ <div class=example>
+ <p>For example, the following link is a French translation that uses the
+ PDF format:</p>
+
+ <pre>&lt;link rel=alternate type=application/pdf hreflang=fr href=manual-fr></pre>
+ </div>
+
<p>If the <code title=rel-alternate><a
href="#alternate0">alternate</a></code> keyword is used with the <code
title=attr-hyperlink-type><a href="#type14">type</a></code> attribute set
View
46 source
@@ -5469,8 +5469,6 @@ class="main"> or <div class="content">. Why do we also need a body?
the <span title="attr-hyperlink-hreflang"><code>hreflang</code>
attribute on hyperlink elements</span>.</p>
- <!-- XXX type attribute parsing and semantics should be factored out
- as much as possible into a microsyntax -->
<p>The <dfn title="attr-link-type"><code>type</code></dfn> attribute
gives the MIME type of the linked resource. It is purely advisory.
The value must be a valid MIME type, optionally with parameters. <a
@@ -5808,10 +5806,9 @@ class="main"> or <div class="content">. Why do we also need a body?
one of several inputs to the <span>styling processing
model</span>.</p>
- <!-- XXX again, extract type out as a microsyntax -->
<p>If the <dfn title="attr-style-type"><code>type</code></dfn>
- attribute is given, it must contain a MIME type, optionally with
- parameters, that designates a styling language. <a
+ attribute is given, it must contain a valid MIME type, optionally
+ with parameters, that designates a styling language. <a
href="#refsRFC2046">[RFC2046]</a> If the attribute is absent, the
type defaults to <code>text/css</code>. <a
href="#refsRFC2318">[RFC2138]</a></p>
@@ -9556,8 +9553,6 @@ brighter. A &lt;b>rat&lt;/b> scurries past the corner wall.&lt;/p></pre>
user agent must use a default handler for the content. (This default
could be as simple as saying "Unsupported Format", of course.)</p>
- <!-- XXX we really should factor out the common parts of type
- handling; at least the parsing and handling of parameters -->
<p>The <dfn title="attr-embed-type"><code>type</code></dfn>
attribute, if present, gives the MIME type of the linked resource.
The value must be a valid MIME type, optionally with parameters. <a
@@ -9568,10 +9563,10 @@ brighter. A &lt;b>rat&lt;/b> scurries past the corner wall.&lt;/p></pre>
<ol>
- <li>If the element has a <code title="attr-link-type">type</code>
+ <li>If the element has a <code title="attr-embed-type">type</code>
attribute, then the value of the <code
- title="attr-link-type">type</code> attribute is the <span>content's
- type</span>.</li>
+ title="attr-embed-type">type</code> attribute is the
+ <span>content's type</span>.</li>
<li>Otherwise, if the specified resource has <span
title="Content-Type">explicit Content-Type metadata</span>, then
@@ -13080,9 +13075,10 @@ interface <dfn>ImageData</dfn> {
<li>
- <p class="big-issue">How to handle the <code title="">type</code>
- and <code title="">language</code> attributes should be defined
- here, probably with reference to the next section.</p>
+ <p class="big-issue">How to handle the <code
+ title="attr-script-type">type</code> and <code
+ title="attr-script-language">language</code> attributes should be
+ defined here, probably with reference to the next section.</p>
</li>
@@ -17180,13 +17176,29 @@ mpt says:
<p>If the <code title="rel-alternate">alternate</code> keyword is
used with the <code title="attr-hyperlink-hreflang">hreflang</code>
- attribute, it indicates that the referenced document is a
- translation.</p>
+ attribute, and that attribute's value differs from the <span>root
+ element</span>'s <span>language</span>, it indicates that the
+ referenced document is a translation.</p>
<p>If the <code title="rel-alternate">alternate</code> keyword is
used with the <code title="attr-hyperlink-type">type</code>
- attribute, it indicates that the referenced document is a reformulation
- of the current document in the specified format.</p>
+ attribute, it indicates that the referenced document is a
+ reformulation of the current document in the specified format.</p>
+
+ <p>The <code title="attr-hyperlink-media">media</code>, <code
+ title="attr-hyperlink-hreflang">hreflang</code>, and <code
+ title="attr-hyperlink-type">type</code> attributes can be combined
+ when specified with the <code title="rel-alternate">alternate</code>
+ keyword.</p>
+
+ <div class="example">
+
+ <p>For example, the following link is a French translation that
+ uses the PDF format:</p>
+
+ <pre>&lt;link rel=alternate type=application/pdf hreflang=fr href=manual-fr></pre>
+
+ </div>
<p>If the <code title="rel-alternate">alternate</code> keyword is
used with the <code title="attr-hyperlink-type">type</code>

0 comments on commit 5dcf8df

Please sign in to comment.