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

Spec progress #78

Merged
merged 31 commits into from
Sep 13, 2022
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
2e462a7
Spec progress
gkellogg Aug 21, 2022
0214e88
Apply suggestions from code review
gkellogg Aug 22, 2022
75355aa
Simplify and provide an example for serializing the extended internal…
gkellogg Aug 22, 2022
1f137d4
Fix spec references and some document structure issues.
gkellogg Aug 22, 2022
ff1d722
Flesh out the API section.
gkellogg Aug 23, 2022
edf3583
Update examples in Basic Concepts to be simpler JSON-LD, along the li…
gkellogg Aug 24, 2022
35bd899
Add "code" CSS style manually, for some reason ReSpec isn't using it.
gkellogg Aug 24, 2022
d970d96
Improve conversion step descriptions.
gkellogg Aug 24, 2022
d3d402f
Markup errors.
gkellogg Aug 24, 2022
de22b88
Further simplify the to-YAML algorithm and use the `|var|` shorthand …
gkellogg Aug 25, 2022
3b689bf
Expand on YAML-LD profiles.
gkellogg Aug 25, 2022
336e021
Fix bad ref.
gkellogg Aug 25, 2022
532d3df
Apply suggestions from code review
gkellogg Aug 26, 2022
4af20d3
Apply suggestions from code review
gkellogg Aug 26, 2022
27be7af
Update spec/index.html
gkellogg Aug 26, 2022
53837c8
Updates to recommended YAML serialization suggested by @pchampin.
gkellogg Aug 28, 2022
9154923
Update spec/index.html
gkellogg Aug 28, 2022
202db77
#73 Add `How to read this document` section
anatoly-scherbakov Aug 27, 2022
49378ce
Update spec/index.html
anatoly-scherbakov Aug 28, 2022
569158f
Update spec/index.html
anatoly-scherbakov Aug 28, 2022
f9b5646
Update spec/index.html
anatoly-scherbakov Aug 28, 2022
8534bd5
Update spec/index.html
anatoly-scherbakov Aug 28, 2022
d9f4fc1
Update spec/index.html
anatoly-scherbakov Aug 29, 2022
e88f19f
Update spec/index.html
anatoly-scherbakov Aug 29, 2022
1ea7336
Update spec/index.html
anatoly-scherbakov Aug 29, 2022
d5c0c03
Update spec/index.html
anatoly-scherbakov Aug 29, 2022
5bbf60f
Update markup to make it valid HTML: A `<p>` can not include `<ul>`, …
gkellogg Aug 29, 2022
a8e4a29
Update spec/index.html
gkellogg Aug 29, 2022
60a0b11
Updat4 WebIDL for JsonLdOptions to make it a "partial dictionary", wh…
gkellogg Aug 29, 2022
b675cb1
Apply suggestions from code review
gkellogg Sep 6, 2022
2964629
Fix API step citation.
gkellogg Sep 7, 2022
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
59 changes: 36 additions & 23 deletions spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ <h2>Encoding</h2>
<h2>Comments</h2>
<p>
Comments in <a>YAML-LD documents</a> are treated as white space.
This behavior is consistent with other Linked Data serializations like [[TURTLE]].
This behavior is consistent with other Linked Data serializations like [[?TURTLE]].
See Interoperability considerations of [[I-D.ietf-httpapi-yaml-mediatypes]]
for more details.
</p>
Expand Down Expand Up @@ -1025,36 +1025,28 @@ <h2>Conversion to YAML</h2>
to YAML begins by preparing an empty <a>representation graph</a>
which will be rooted with either a
<a>YAML mapping</a> or <a>YAML sequence</a>.
</p>
<p>
Although outside of the scope of this specification,
processors MAY use
<a>YAML directives</a>, including <a>TAG directives</a>, and
<a data-cite="YAML#document-markers">Document markers</a>,
as appropriate for best results.
Specifically, if the {{JsonLdOptions/extendedYAML}} API flag is `true`,
the document SHOULD use the `%YAML` directive with
version set to at least `1.2`
and a `%TAG` directive appropriate for each
`RDF literal`.
version set to at least `1.2`.
To improve readability and reduce document size,
the document MAY use a `%TAG` directive appropriate for
<a>RDF literals</a> contained within the representation.
</p>

<div class="issue markdown" data-number="6">
<p>A concrete proposal in that direction would be to use a tag at the
top-level of any "idiomatic" YAML-LD document, applying to the whole
object/array that makes the document.</p>

<p>It might also include a version
to identify the specification that it relates to, allowing
for version announcement that could be used for future-proofing.</p>

<p>E.g.</p>

<pre>
!yaml-ld
$context: http://schema.org/
$type: Person
name: Pierre-Antoine Champin
</pre>
</div>
<p class="note">
The use of `%TAG` directives in YAML-LD is similar to the use
of the `PREFIX` directive in [[?Turtle]]
or the general use of terms as prefixes to create
<a data-cite="JSON-LD11#dfn-compact-iri">Compact IRIs</a> in [[JSON-LD11]]:
they not change the meaning of the encoded scalars.
</p>

<pre class="example yaml"
data-transform="updateExample"
Expand All @@ -1081,6 +1073,27 @@ <h2>Conversion to YAML</h2>
hopefully become unnecessary as implementations are updated.
</p>

<div class="issue markdown" data-number="6">
<p>A concrete proposal in that direction would be to use a tag at the
top-level of any "idiomatic" YAML-LD document, applying to the whole
object/array that makes the document.</p>

<p>It might also include a version
to identify the specification that it relates to, allowing
for version announcement that could be used for future-proofing.</p>

<p>E.g.</p>
gkellogg marked this conversation as resolved.
Show resolved Hide resolved

<pre>
!yaml-ld
$context: http://schema.org/
$type: Person
name: Pierre-Antoine Champin
</pre>
</div>

<p>See <a href="#example-serialized-representation-of-the-extended-internal-representation"></a> for an example of serializing the extended internal representation.</p>

<section id="convert-ir" class="algorithm">
<h3>Converting From the Internal Representation</h3>

Expand Down Expand Up @@ -1694,7 +1707,7 @@ <h3>FAQ</h3>
Moreover
[[JSON]] (and hence [[JSON-LD11]]) does not support comments,
and other Linked Data serialization formats
that support comments (such as [[TURTLE]])
that support comments (such as [[?TURTLE]])
do not provide a means to preserve them
when processing and serializing the document
in other formats.
Expand Down