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

Define rules for content paths #472

Merged
merged 2 commits into from
May 20, 2020
Merged
Show file tree
Hide file tree
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
14 changes: 13 additions & 1 deletion draft/spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -656,8 +656,20 @@ <h2>Manifest</h2>
Object that have content with the given digest. As JSON keys are case sensitive, while digests may
not be, there is an additional requirement that each digest value <span id="E096">MUST</span> occur
only once in the manifest regardless of case. Content paths within a manifest block
<span id="E042">MUST</span> be relative to the <a>OCFL Object Root</a>.
<span id="E042">MUST</span> be relative to the <a>OCFL Object Root</a>. The following restrictions
avoid ambiguity and provide path safety for clients processing the <code>manifest</code>.
</p>
<ul>
<li>The content path <span id="E098">MUST</span> be interpreted as a set of one or more
path elements joined by a <code>/</code> path separator.</li>
<li>Path elements <span id="E099">MUST NOT</span> be <code>.</code>, <code>..</code>,
or empty (<code>//</code>).</li>
<li>A content path <span id="E100">MUST NOT</span> begin or end with a forward slash
(<code>/</code>).</li>
<li>Within an inventory, content paths <span id="E101">MUST</span> be unique and
non-conflicting, so the content path for a file cannot appear as the initial part
of another content path.</li>
</ul>
<blockquote class="informative">
<p>
Non-normative note: If only one file is stored in the OCFL Object for each digest, fully
Expand Down
4 changes: 4 additions & 0 deletions validation/validation-codes.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@
| E095 | 'Within a version, logical paths must be unique and non-conflicting, so the logical path for a file cannot appear as the initial part of another logical path.' | https://ocfl.io/draft/spec/#E095
| E096 | 'As JSON keys are case sensitive, while digests may not be, there is an additional requirement that each digest value must occur only once in the manifest regardless of case.' | https://ocfl.io/draft/spec/#E096
| E097 | 'As JSON keys are case sensitive, while digests may not be, there is an additional requirement that each digest value must occur only once in the fixity block for any digest algorithm, regardless of case.' | https://ocfl.io/draft/spec/#E097
| E098 | 'The content path must be interpreted as a set of one or more path elements joined by a / path separator.' | https://ocfl.io/draft/spec/#E098
| E099 | '[content] path elements must not be ., .., or empty (//).' | https://ocfl.io/draft/spec/#E099
| E100 | 'A content path must not begin or end with a forward slash (/).' | https://ocfl.io/draft/spec/#E100
| E101 | 'Within an inventory, content paths must be unique and non-conflicting, so the content path for a file cannot appear as the initial part of another content path.' | https://ocfl.io/draft/spec/#E101

## Warnings (corresponding with SHOULD in specification)

Expand Down