|
11 | 11 | "rationale": ".algorithm", |
12 | 12 | "steps": [ |
13 | 13 | { |
14 | | - "html": "<p>Let <var>baseURL</var>, <var>expandedURL</var>, <var>propertyPrefix</var>, and\n\t\t\t\t\t\t\t<var>propertyReference</var> be empty <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#string\" id=\"ref-for-index-term-string-3\">strings</a>.</p>\n\t\t\t\t\t<details class=\"explanation\">\n\t\t\t\t\t\t<summary>Explanation</summary>\n\t\t\t\t\t\t<p>In this algorithm:</p>\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t<li><var>baseURL</var> will hold the base URL associated with the value, whether this URL is\n\t\t\t\t\t\t\t\tassigned by the EPUB creator, corresponds to a default vocabulary, or comes from a\n\t\t\t\t\t\t\t\treserved prefix.</li>\n\t\t\t\t\t\t\t<li><var>expandedURL</var> will hold the final URL that results from the concatenation of\n\t\t\t\t\t\t\t\tthe base URL and property reference.</li>\n\t\t\t\t\t\t\t<li><var>propertyPrefix</var> will hold the property's <a href=\"https://w3c.github.io/epub-specs/epub34/authoring/#property.ebnf.prefix\" id=\"ref-for-index-term-prefix-1\">prefix</a> [<cite><a class=\"bibref\" data-link-type=\"biblio\" href=\"https://www.w3.org/TR/epub-rs-34/#bib-epub-34\" title=\"EPUB 3.4\">epub-34</a></cite>] (i.e., the value\n\t\t\t\t\t\t\t\tbefore the colon). Properties from a default vocabulary will not have a prefix, but all\n\t\t\t\t\t\t\t\tothers will.</li>\n\t\t\t\t\t\t\t<li><var>propertyReference</var> will hold the property's <a href=\"https://w3c.github.io/epub-specs/epub34/authoring/#property.ebnf.reference\" id=\"ref-for-index-term-reference-1\">reference</a> [<cite><a class=\"bibref\" data-link-type=\"biblio\" href=\"https://www.w3.org/TR/epub-rs-34/#bib-epub-34\" title=\"EPUB 3.4\">epub-34</a></cite>] (i.e., the\n\t\t\t\t\t\t\t\tvalue after the prefix). All valid properties require a reference.</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</details>" |
| 14 | + "html": "<p>Let <var>baseURL</var>, <var>expandedURL</var>, <var>propertyPrefix</var>, and\n\t\t\t\t\t\t\t<var>propertyReference</var> be empty <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#string\" id=\"ref-for-index-term-string-3\">strings</a>.</p>\n\t\t\t\t\t<details class=\"explanation\">\n\t\t\t\t\t\t<summary>Explanation</summary>\n\t\t\t\t\t\t<p>In this algorithm:</p>\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t<li><var>baseURL</var> will hold the base URL associated with the value, whether this URL is\n\t\t\t\t\t\t\t\tassigned by the EPUB creator, corresponds to a default vocabulary, or comes from a\n\t\t\t\t\t\t\t\treserved prefix.</li>\n\t\t\t\t\t\t\t<li><var>expandedURL</var> will hold the final URL that results from the concatenation of\n\t\t\t\t\t\t\t\tthe base URL and property reference.</li>\n\t\t\t\t\t\t\t<li><var>propertyPrefix</var> will hold the property's <a href=\"https://www.w3.org/TR/epub-34/#property.ebnf.prefix\" id=\"ref-for-index-term-prefix-1\">prefix</a> [<cite><a class=\"bibref\" data-link-type=\"biblio\" href=\"https://www.w3.org/TR/epub-rs-34/#bib-epub-34\" title=\"EPUB 3.4\">epub-34</a></cite>] (i.e., the value\n\t\t\t\t\t\t\t\tbefore the colon). Properties from a default vocabulary will not have a prefix, but all\n\t\t\t\t\t\t\t\tothers will.</li>\n\t\t\t\t\t\t\t<li><var>propertyReference</var> will hold the property's <a href=\"https://www.w3.org/TR/epub-34/#property.ebnf.reference\" id=\"ref-for-index-term-reference-1\">reference</a> [<cite><a class=\"bibref\" data-link-type=\"biblio\" href=\"https://www.w3.org/TR/epub-rs-34/#bib-epub-34\" title=\"EPUB 3.4\">epub-34</a></cite>] (i.e., the\n\t\t\t\t\t\t\t\tvalue after the prefix). All valid properties require a reference.</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</details>" |
15 | 15 | }, |
16 | 16 | { |
17 | 17 | "html": "Obtain the values of <var>propertyPrefix</var> and <var>propertyReference</var> as follows:", |
|
37 | 37 | "rationale": "if", |
38 | 38 | "steps": [ |
39 | 39 | { |
40 | | - "html": "If <var>attr</var> is <code><a data-link-type=\"element-attr\" href=\"https://w3c.github.io/epub-specs/epub34/authoring/#dfn-epub-type\" id=\"ref-for-index-term-epub-type-attribute-5\">epub:type</a></code> [<cite><a class=\"bibref\" data-link-type=\"biblio\" href=\"https://www.w3.org/TR/epub-rs-34/#bib-epub-34\" title=\"EPUB 3.4\">epub-34</a></cite>], set <var>baseURL</var> to\n\t\t\t\t\t\t\t\t\t\t<br><code>http://idpf.org/epub/vocab/structure/#</code>" |
| 40 | + "html": "If <var>attr</var> is <code><a data-link-type=\"element-attr\" href=\"https://www.w3.org/TR/epub-34/#dfn-epub-type\" id=\"ref-for-index-term-epub-type-attribute-5\">epub:type</a></code> [<cite><a class=\"bibref\" data-link-type=\"biblio\" href=\"https://www.w3.org/TR/epub-rs-34/#bib-epub-34\" title=\"EPUB 3.4\">epub-34</a></cite>], set <var>baseURL</var> to\n\t\t\t\t\t\t\t\t\t\t<br><code>http://idpf.org/epub/vocab/structure/#</code>" |
41 | 41 | }, |
42 | 42 | { |
43 | | - "html": "Otherwise, if <var>elem</var> is the package document <code><a data-link-type=\"element\" href=\"https://w3c.github.io/epub-specs/epub34/authoring/#dfn-meta\" id=\"ref-for-index-term-meta-element-6\">meta</a></code> element [<cite><a class=\"bibref\" data-link-type=\"biblio\" href=\"https://www.w3.org/TR/epub-rs-34/#bib-epub-34\" title=\"EPUB 3.4\">epub-34</a></cite>]\n\t\t\t\t\t\t\t\t\tand <var>attr</var> is <code>scheme</code>, the property value is invalid. Return <a href=\"https://infra.spec.whatwg.org/#nulls\" id=\"ref-for-index-term-null-4\">null</a>." |
| 43 | + "html": "Otherwise, if <var>elem</var> is the package document <code><a data-link-type=\"element\" href=\"https://www.w3.org/TR/epub-34/#dfn-meta\" id=\"ref-for-index-term-meta-element-6\">meta</a></code> element [<cite><a class=\"bibref\" data-link-type=\"biblio\" href=\"https://www.w3.org/TR/epub-rs-34/#bib-epub-34\" title=\"EPUB 3.4\">epub-34</a></cite>]\n\t\t\t\t\t\t\t\t\tand <var>attr</var> is <code>scheme</code>, the property value is invalid. Return <a href=\"https://infra.spec.whatwg.org/#nulls\" id=\"ref-for-index-term-null-4\">null</a>." |
44 | 44 | }, |
45 | 45 | { |
46 | | - "html": "Otherwise, if <var>elem</var> is the package document <code><a data-link-type=\"element\" href=\"https://w3c.github.io/epub-specs/epub34/authoring/#dfn-meta\" id=\"ref-for-index-term-meta-element-7\">meta</a></code> element [<cite><a class=\"bibref\" data-link-type=\"biblio\" href=\"https://www.w3.org/TR/epub-rs-34/#bib-epub-34\" title=\"EPUB 3.4\">epub-34</a></cite>],\n\t\t\t\t\t\t\t\t\tset <var>baseURL</var> to\n\t\t\t\t\t\t\t\t\t\t<br><code>http://idpf.org/epub/vocab/package/meta/#</code>" |
| 46 | + "html": "Otherwise, if <var>elem</var> is the package document <code><a data-link-type=\"element\" href=\"https://www.w3.org/TR/epub-34/#dfn-meta\" id=\"ref-for-index-term-meta-element-7\">meta</a></code> element [<cite><a class=\"bibref\" data-link-type=\"biblio\" href=\"https://www.w3.org/TR/epub-rs-34/#bib-epub-34\" title=\"EPUB 3.4\">epub-34</a></cite>],\n\t\t\t\t\t\t\t\t\tset <var>baseURL</var> to\n\t\t\t\t\t\t\t\t\t\t<br><code>http://idpf.org/epub/vocab/package/meta/#</code>" |
47 | 47 | }, |
48 | 48 | { |
49 | | - "html": "Otherwise, if <var>elem</var> is the package document <code><a data-link-type=\"element\" href=\"https://w3c.github.io/epub-specs/epub34/authoring/#dfn-link\" id=\"ref-for-index-term-link-element-2\">link</a></code> element [<cite><a class=\"bibref\" data-link-type=\"biblio\" href=\"https://www.w3.org/TR/epub-rs-34/#bib-epub-34\" title=\"EPUB 3.4\">epub-34</a></cite>],\n\t\t\t\t\t\t\t\t\tset <var>baseURL</var> to\n\t\t\t\t\t\t\t\t\t\t<br><code>http://idpf.org/epub/vocab/package/link/#</code>" |
| 49 | + "html": "Otherwise, if <var>elem</var> is the package document <code><a data-link-type=\"element\" href=\"https://www.w3.org/TR/epub-34/#dfn-link\" id=\"ref-for-index-term-link-element-2\">link</a></code> element [<cite><a class=\"bibref\" data-link-type=\"biblio\" href=\"https://www.w3.org/TR/epub-rs-34/#bib-epub-34\" title=\"EPUB 3.4\">epub-34</a></cite>],\n\t\t\t\t\t\t\t\t\tset <var>baseURL</var> to\n\t\t\t\t\t\t\t\t\t\t<br><code>http://idpf.org/epub/vocab/package/link/#</code>" |
50 | 50 | }, |
51 | 51 | { |
52 | | - "html": "Otherwise, if <var>elem</var> is the package document <code><a data-link-type=\"element\" href=\"https://w3c.github.io/epub-specs/epub34/authoring/#dfn-item\" id=\"ref-for-index-term-item-element-3\">item</a></code> element [<cite><a class=\"bibref\" data-link-type=\"biblio\" href=\"https://www.w3.org/TR/epub-rs-34/#bib-epub-34\" title=\"EPUB 3.4\">epub-34</a></cite>],\n\t\t\t\t\t\t\t\t\tset <var>baseURL</var> to\n\t\t\t\t\t\t\t\t\t\t<br><code>http://idpf.org/epub/vocab/package/item/#</code>" |
| 52 | + "html": "Otherwise, if <var>elem</var> is the package document <code><a data-link-type=\"element\" href=\"https://www.w3.org/TR/epub-34/#dfn-item\" id=\"ref-for-index-term-item-element-3\">item</a></code> element [<cite><a class=\"bibref\" data-link-type=\"biblio\" href=\"https://www.w3.org/TR/epub-rs-34/#bib-epub-34\" title=\"EPUB 3.4\">epub-34</a></cite>],\n\t\t\t\t\t\t\t\t\tset <var>baseURL</var> to\n\t\t\t\t\t\t\t\t\t\t<br><code>http://idpf.org/epub/vocab/package/item/#</code>" |
53 | 53 | }, |
54 | 54 | { |
55 | | - "html": "Otherwise, if <var>elem</var> is the package document <code><a data-link-type=\"element\" href=\"https://w3c.github.io/epub-specs/epub34/authoring/#dfn-itemref\" id=\"ref-for-index-term-itemref-element-5\">itemref</a></code> element\n\t\t\t\t\t\t\t\t\t[<cite><a class=\"bibref\" data-link-type=\"biblio\" href=\"https://www.w3.org/TR/epub-rs-34/#bib-epub-34\" title=\"EPUB 3.4\">epub-34</a></cite>], set <var>baseURL</var> to\n\t\t\t\t\t\t\t\t\t\t<br><code>http://idpf.org/epub/vocab/package/itemref/#</code>" |
| 55 | + "html": "Otherwise, if <var>elem</var> is the package document <code><a data-link-type=\"element\" href=\"https://www.w3.org/TR/epub-34/#dfn-itemref\" id=\"ref-for-index-term-itemref-element-5\">itemref</a></code> element\n\t\t\t\t\t\t\t\t\t[<cite><a class=\"bibref\" data-link-type=\"biblio\" href=\"https://www.w3.org/TR/epub-rs-34/#bib-epub-34\" title=\"EPUB 3.4\">epub-34</a></cite>], set <var>baseURL</var> to\n\t\t\t\t\t\t\t\t\t\t<br><code>http://idpf.org/epub/vocab/package/itemref/#</code>" |
56 | 56 | } |
57 | 57 | ] |
58 | 58 | }, |
|
64 | 64 | "html": "<p>If a <code>prefix</code> attribute is declared on the document element of\n\t\t\t\t\t\t\t\t\t\t\t<var>doc</var>, and the attribute contains a prefix that matches\n\t\t\t\t\t\t\t\t\t\t\t<var>propertyPrefix</var>, set <var>baseURL</var> to the URL associated with\n\t\t\t\t\t\t\t\t\t\tthe prefix declaration.</p>" |
65 | 65 | }, |
66 | 66 | { |
67 | | - "html": "<p>Otherwise, if <var>propertyPrefix</var> matches a <a href=\"https://w3c.github.io/epub-specs/epub34/authoring/#sec-reserved-prefixes\" id=\"ref-for-index-term-reserved-prefix-1\">reserved prefix</a> [<cite><a class=\"bibref\" data-link-type=\"biblio\" href=\"https://www.w3.org/TR/epub-rs-34/#bib-epub-34\" title=\"EPUB 3.4\">epub-34</a></cite>]\n\t\t\t\t\t\t\t\t\t\tfor <var>doc</var>, set <var>baseURL</var> to the URL associated with the\n\t\t\t\t\t\t\t\t\t\treserved prefix.</p>" |
| 67 | + "html": "<p>Otherwise, if <var>propertyPrefix</var> matches a <a href=\"https://www.w3.org/TR/epub-34/#sec-reserved-prefixes\" id=\"ref-for-index-term-reserved-prefix-1\">reserved prefix</a> [<cite><a class=\"bibref\" data-link-type=\"biblio\" href=\"https://www.w3.org/TR/epub-rs-34/#bib-epub-34\" title=\"EPUB 3.4\">epub-34</a></cite>]\n\t\t\t\t\t\t\t\t\t\tfor <var>doc</var>, set <var>baseURL</var> to the URL associated with the\n\t\t\t\t\t\t\t\t\t\treserved prefix.</p>" |
68 | 68 | } |
69 | 69 | ] |
70 | 70 | } |
|
0 commit comments