Skip to content

Commit

Permalink
Define rules for content paths (#472)
Browse files Browse the repository at this point in the history
* Define rules for content paths

* Remove spurious quotes
  • Loading branch information
zimeon authored May 20, 2020
1 parent e919c83 commit 424cd14
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
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

0 comments on commit 424cd14

Please sign in to comment.