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

Bug fixes in Examples (PR #5 for issue #94) #112

Merged
merged 5 commits into from
Aug 17, 2023
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
13 changes: 10 additions & 3 deletions spec/data/json-vs-yaml.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
"@context":
- https://json-ld.org/contexts/dollar-convenience.jsonld
- "@base": https://json-ld.github.io/
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfs: http://www.w3.org/2000/01/rdf-schema#
prov: http://www.w3.org/ns/prov#

$id: JSONOrYAMLFeature
$reverse:
$type:
rdf:type:
- rdfs:label: UTF-8
$type: Encoding
json:
Expand All @@ -27,7 +34,7 @@ $reverse:
prov:wasDerivedFrom: YAML#52-character-encodings

- rdfs:label: "<code>{}</code> object"
$type:
rdf:type:
$id: native-data-types
rdfs:label: Native data types
json:
Expand Down Expand Up @@ -85,7 +92,7 @@ $reverse:
prov:wasDerivedFrom: YAML#10211-null

- rdfs:label: Custom types
$type:
rdf:type:
$id: features
rdfs:label: Features
json: no
Expand Down
7 changes: 7 additions & 0 deletions spec/data/namespace-prefixes.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
"@context":
- https://json-ld.org/contexts/dollar-convenience.jsonld
- "@base": https://json-ld.github.io/
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#

$id: NamespacePrefix
$reverse:
rdf:type:
Expand All @@ -7,6 +12,8 @@ $reverse:
iri: "https://www.w3.org/ns/i18n#"
- prefix: rdf
iri: "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- prefix: rdfs
iri: "http://www.w3.org/2000/01/rdf-schema#"
- prefix: xsd
iri: "http://www.w3.org/2001/XMLSchema#"
- prefix: schema
Expand Down
119 changes: 60 additions & 59 deletions spec/data/spec.yaml
Original file line number Diff line number Diff line change
@@ -1,75 +1,76 @@
"@context":
"@base": https://json-ld.github.io/yaml-ld/spec/
rdfs: http://www.w3.org/2000/01/rdf-schema#
schema: https://schema.org/
- https://json-ld.org/contexts/dollar-convenience.jsonld
- "@base": https://json-ld.github.io/yaml-ld/spec/
rdfs: http://www.w3.org/2000/01/rdf-schema#
schema: https://schema.org/

$id: "@id"
$type: "@type"
rdfs:range:
"@type": "@id"

$id: https://json-ld.github.io/yaml-ld/spec/
schema:author:
- name: Vladimir Alexiev
$id: https://github.com/VladimirAlexiev
$type: Person
$included:
- $id: schema:author
rdfs:range: schema:Person

- name: Pierre-Antoine Champin
$id: https://github.com/pchampin
$type: schema:Person
- $id: https://json-ld.github.io/yaml-ld/spec/
schema:author:
- name: Vladimir Alexiev
$id: https://github.com/VladimirAlexiev

- name: Gregg Kellogg
$id: https://github.com/gkellogg
$type: schema:Person
- name: Pierre-Antoine Champin
$id: https://github.com/pchampin

- name: Roberto Polli
$id: https://github.com/ioggstream
$type: schema:Person
- name: Gregg Kellogg
$id: https://github.com/gkellogg

- name: Anatoly Scherbakov
country: am
$id: https://github.com/anatoly-scherbakov
$type: schema:Person
- name: Roberto Polli
$id: https://github.com/ioggstream

- name: Ted Thibodeau Jr
$id: https://github.com/TallTed
$type: schema:Person
- name: Anatoly Scherbakov
country: am
$id: https://github.com/anatoly-scherbakov

- name: Benjamin Young
$id: https://github.com/BigBlueHat
$type: schema:Person
- name: Ted Thibodeau Jr
$id: https://github.com/TallTed

license: …
- name: Benjamin Young
$id: https://github.com/BigBlueHat

license: W3C License

schema:hasPart:
- rdfs:label: Introduction
schema:hasPart:
- rdfs:label: How to read this document
- rdfs:label: Terminology
- rdfs:label: Namespace prefixes
- rdfs:label: Conformance
- rdfs:label: Basic concepts
schema:hasPart:
- rdfs:label: JSON vs YAML comparison
- rdfs:label: Core requirements
$type: NormativeSection
schema:hasPart:
- rdfs:label: Encoding
- rdfs:label: Comments
- rdfs:label: Anchors and aliases
- rdfs:label: Streams
- rdfs:label: Abstract
- rdfs:label: Status of This Document
- rdfs:label: Introduction
schema:hasPart:
- rdfs:label: How to read this document
- rdfs:label: Terminology
- rdfs:label: Namespace prefixes
- rdfs:label: Conformance
- rdfs:label: Basic concepts
schema:hasPart:
- rdfs:label: JSON vs YAML comparison
- rdfs:label: Core requirements
$type: NormativeSection
schema:hasPart:
- rdfs:label: YAML features supported by YAML-LD
- rdfs:label: Encoding
- rdfs:label: Comments
- rdfs:label: Anchors and aliases
- rdfs:label: Streams

- rdfs:label: Security Considerations
- rdfs:label: Interoperability Considerations
- rdfs:label: Security Considerations
- rdfs:label: Interoperability Considerations

- rdfs:label: IANA Considerations
$type: NormativeSection
schema:hasPart:
- rdfs:label: application/ld+yaml
- rdfs:label: Fragment identifiers
- rdfs:label: Examples
- rdfs:label: IANA Considerations
$type: NormativeSection
schema:hasPart:
- rdfs:label: application/ld+yaml
- rdfs:label: Fragment identifiers
- rdfs:label: Examples

- rdfs:label: Best Practices
- rdfs:label: Why are comments treated as whitespace?
- rdfs:label: Streams
- rdfs:label: Best Practices
- rdfs:label: Why are comments treated as whitespace?
- rdfs:label: Streams

- rdfs:label: Extended YAML-LD Profile
- rdfs:label: References
- rdfs:label: Extended YAML-LD Profile
- rdfs:label: References
26 changes: 13 additions & 13 deletions spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ <h2>Introduction</h2>

<div class="ednote">
See YAML-LD description of this spec at
<a href="https://github.com/json-ld/yaml-ld/blob/main/spec/spec.yaml">
<a href="data/spec.yaml" target="_blank">
<code>spec.yaml</code>
</a>.
</div>
Expand Down Expand Up @@ -540,7 +540,7 @@ <h2>Namespace Prefixes</h2>

<div class="ednote">
See YAML-LD version of this table at
<a href="https://github.com/json-ld/yaml-ld/blob/main/spec/namespace-prefixes.yaml">
<a href="data/namespace-prefixes.yaml" target="_blank">
<code>namespace-prefixes.yaml</code>
</a>.
</div>
Expand Down Expand Up @@ -690,7 +690,7 @@ <h3>JSON vs YAML comparison</h3>

<div class="ednote">
See YAML-LD version of this table at
<a href="https://github.com/json-ld/yaml-ld/blob/main/spec/json-vs-yaml.yaml">
<a href="data/json-vs-yaml.yaml" target="_blank">
<code>json-vs-yaml.yaml</code>
</a>.
</div>
Expand Down Expand Up @@ -1149,14 +1149,14 @@ <h2>Best Practices</h2>
</li>
</ul>

<div class="practice">
<p class="practicedesc">
<span id="bp-convenience-context" class="practicelab">Use a <dfn>Convenience Context</dfn></span>
<p>
YAML-LD users may use a JSON-LD context provided as part of this specification, or a similar custom context,
to improve the authoring experience and readability.
</p>
</div>
<div class="practice">
<p class="practicedesc">
<span id="bp-convenience-context" class="practicelab">Use a <dfn>Convenience Context</dfn></span>
<p>
YAML-LD users may use a JSON-LD context provided as part of this specification, or a similar custom context,
to improve the authoring experience and readability.
</p>
</div>

<p>
Unfortunately, <code>@context</code> keyword cannot be aliased as per JSON-LD specification and will have
Expand All @@ -1172,8 +1172,8 @@ <h2>Best Practices</h2>
title="Example YAML-LD document with Convenience Context">
<!--
"@context":
- "@import": https://schema.org
- "@import": https://raw.githubusercontent.com/json-ld/convenience-context/main/context.jsonld
- https://json-ld.org/contexts/dollar-convenience.jsonld
- https://schema.org

$id: https://w3.org/yaml-ld/
$type: WebContent
Expand Down