Skip to content
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

Clarify base iri of package document #1468

Merged
merged 7 commits into from
Apr 2, 2021
6 changes: 3 additions & 3 deletions epub33/core/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2713,9 +2713,9 @@ <h6>The <code>item</code> Element</h6>

<p>Each <code>item</code> element identifies a <a>Publication Resource</a> by the IRI
[[!RFC3987]] provided in its <code>href</code> attribute. The IRI MAY be absolute or
relative. In the case of relative IRIs, the IRI of the Package Document is used as the
base when resolving to absolute IRIs. The resulting absolute IRI MUST be unique within
the <code>manifest</code> scope.</p>
relative, but each IRI MUST be unique within the <code>manifest</code> scope after <a
href="https://www.w3.org/TR/epub-rs-33/#sec-package-relative-iris">resolution to an
absolute IRI</a> [[!EPUB-RS-33]].</p>

<p id="attrdef-item-media-type">The Publication Resource identified by an <code>item</code>
element MUST conform to the applicable specification(s) as inferred from the MIME media
Expand Down
14 changes: 14 additions & 0 deletions epub33/rs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,20 @@ <h4>Presentation Logic</h4>
layouts).</p>
</section>

<section id="sec-package-relative-iris">
<h4>Resolving Relative IRIs</h4>

<p>To obtain an absolute IRI reference from a relative IRI reference [[!RFC3987]] in the Package
Document, Reading Systems MUST use the Base IRI [[!RFC3986]] of the Package Document.</p>

<p>The Base IRI of the Package Document is the combination of the Base IRI of the <a>EPUB Container</a>
together with the path to Package Document (relative to the <a>Root Directory</a>) when an EPUB
Publication is zipped.</p>

<p>This specification does not require a specific IRI scheme for referencing the path to the Package
Document within the EPUB Container.</p>
</section>

<section id="dir">
<h4>Base Direction</h4>

Expand Down