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

Adding resource-fragment flag to link #1527

Merged
Merged
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
9 changes: 9 additions & 0 deletions src/metaschema/oscal_metadata_metaschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,10 @@
<p>The <code>media-type</code> provides a hint about the content model of the referenced resource. A valid entry from the <a href="https://www.iana.org/assignments/media-types/media-types.xhtml">IANA Media Types registry</a> SHOULD be used.</p>
</remarks>
</flag>
<define-flag name="resource-fragment" as-type="string">
<formal-name>Resource Fragment</formal-name>
<description>In case where the <code>href</code> points to a <code>back-matter/resource</code>, this value will indicate the URI <a href="https://www.rfc-editor.org/rfc/rfc3986#section-3.5">fragment</a> to append to any <code>rlink</code> associated with the resource. This value MUST be <a href="https://www.rfc-editor.org/rfc/rfc3986#section-2.1">URI encoded</a>.</description>
</define-flag>
<model>
<define-field name="text" as-type="markup-line">
<formal-name>Link Text</formal-name>
Expand All @@ -794,6 +798,11 @@
<key-field target="@href" pattern="#(.*)"/>
</index-has-key>
<matches target=".[@rel=('reference') and not(starts-with(@href,'#'))]/@href" datatype="uri"/>
<matches target="@resource-fragment" regex="(?:[0-9a-zA-Z-._~/?!$&amp;'()*+,;=:@]|%[0-9A-F][0-9A-F])+">
<remarks>
<p>This pattern is based on the fragment Augmented Backus-Naur form (ABNF) syntax provided in [RFC3986 section 3.5](https://www.rfc-editor.org/rfc/rfc3986#section-3.5). Uppercase alpha hex digits are required, which is the preferred normalized form defined in RFC3986.</p>
</remarks>
</matches>
</constraint>
<remarks>
<p>To provide a cryptographic hash for a remote target resource, a local reference to a back matter <code>resource</code> is needed. The resource allows one or more hash values to be provided using the <code>rlink/hash</code> object.</p>
Expand Down