-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add formal vocabulary definitions. #105
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
544cb1a
Add vocabulary README.md.
msporny 29d83f8
Add template for vocabulary documentation.
msporny 3cb5818
Add vocabulary definition file.
msporny b0bfc43
Add Github pages build commands for vocabulary files.
msporny becd62c
Add and fix anchors from vocabulary document to specification.
msporny 0bcf241
Rename index.yml back to vocabulary.yml.
msporny 25b437c
Fix vocabulary based on feedback from @iherman.
msporny e514656
Update vocabulary prefix to one agreed to by VCWG.
msporny b54d651
Update vocabulary URL in template.
msporny File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Publish to Github Pages | ||
on: | ||
push: | ||
branches: [main] | ||
# Allows workflow to be triggered manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow one concurrent deployment | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout/@v3 | ||
- name: Setup Node 18 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- name: Generate vocabulary | ||
run: | | ||
npm install yml2vocab | ||
npm update yml2vocab | ||
./node_modules/.bin/yml2vocab -v vocab/vocabulary.yml -t vocab/template.html | ||
rm -rf node_modules | ||
- name: Setup Github Pages | ||
uses: actions/configure-pages@v2 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
# Upload entire repository | ||
path: '.' | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Generate RDFS vocabulary files | ||
|
||
The script in the directory generates RDFS vocabulary files in JSON and Turtle formats, plus a human readable HTML file containing the vocabulary in RDFa, based on a simple vocabulary definition in a YAML file. This is done using the [yml2vocab](https://github.com/w3c/yml2vocab); more details about the script can also be found in the [yml2vocab readme file](https://github.com/w3c/yml2vocab). | ||
|
||
The generation of the final files is done via a github action (see `/.github/workflows/generate-vocab-files.yml`). | ||
|
||
## Content of the directory | ||
|
||
- `README.md`: this file. | ||
- `vocabulary.yml`: the core vocabulary specification. _Any change on the vocabulary must be made by modifying this file;_ see the separate [description](https://github.com/w3c/yml2vocab) of the underlying YAML format. | ||
- `template.html`: an HTML template file used by the script; it is the skeleton of the final HTML format based on [ReSpec](https://respec.org/docs/). If the file is modified, care should be taken not to change the core structure and the various, possibly empty, HTML elements with `@id` values. The script fills those elements with content when generating the `vocabulary.html` file (and removes any sections that remain empty after processing). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,215 @@ | ||
<html lang="en"> | ||
<head> | ||
<meta charset='utf-8'/> | ||
<title></title> | ||
<script class="remove" src="https://www.w3.org/Tools/respec/respec-w3c"></script> | ||
<script> | ||
function remove_status_remark() { | ||
const sotd = document.getElementById("sotd"); | ||
const p = sotd.getElementsByTagName('p')[0]; | ||
sotd.removeChild(p); | ||
} | ||
// Note: The vocabulary URL must be adapted for the given environment!!!! | ||
function massageSVGLinks(utils, content, url) { | ||
const retval = content | ||
.replace('<svg', '<svg aria-details="#vocabulary-diagram-alt" ') | ||
.replace(/xlink:href/g, 'href') | ||
.replace(/href="https:\/\/www.w3.org\/ns\/credentials\/status#/g, 'href="#'); | ||
return retval; | ||
} | ||
|
||
</script> | ||
<script class="remove"> | ||
var respecConfig = { | ||
specStatus: "base", | ||
shortName: "ns/credentials/status", | ||
thisVersion: "https://www.w3.org/ns/credentials/status/", | ||
doJsonLd: true, | ||
editors: [{ | ||
name: "Ivan Herman", | ||
url: "https://www.w3.org/People/Ivan/", | ||
company: "W3C", | ||
w3cid: 7382, | ||
orcid: "0000-0003-0782-2704", | ||
companyURL: "https://www.w3.org", | ||
note: "v2.0" | ||
},{ | ||
name: "Manu Sporny", | ||
url: "http://manu.sporny.org/", | ||
company: "Digital Bazaar", | ||
companyURL: "http://digitalbazaar.com/", | ||
w3cid: 41758, | ||
note: "v1.0, v2.0" | ||
}], | ||
alternateFormats: [ | ||
{uri: "vocabulary.ttl", label: "Turtle"}, | ||
{uri: "vocabulary.jsonld", label: "JSON-LD"} | ||
], | ||
postProcess : [remove_status_remark], | ||
inlineCSS: true, | ||
doRDFa: false, | ||
noIDLIn: true, | ||
noLegacyStyle: false | ||
}; | ||
</script> | ||
<style type="text/css"> | ||
dl.terms dt { | ||
float: left; | ||
clear: left; | ||
width: 10vw; | ||
} | ||
|
||
dl.terms dd { | ||
margin-left: 15vw; | ||
} | ||
|
||
dl.terms dd:after { | ||
content: ''; | ||
display: block; | ||
clear: both; | ||
margin-bottom: 5px; | ||
} | ||
table.rdfs-definition td { | ||
vertical-align: top; | ||
margin-right: 2em; | ||
} | ||
.bold { | ||
font-weight: bold; | ||
} | ||
/* code { | ||
color: red; | ||
} */ | ||
|
||
.term_definitions section { | ||
border-bottom-style: solid ; | ||
border-bottom-width: 1px; | ||
border-bottom-color: darkgrey; | ||
} | ||
|
||
.annoy { | ||
background: hsla(40,100%,50%,0.95); | ||
color: black; | ||
padding: .75em 1em; | ||
border: red; | ||
border-style: solid none; | ||
box-shadow: 0 2px 8px black; | ||
text-align: center; | ||
} | ||
|
||
</style> | ||
</head> | ||
<body typeof="owl:Ontology"> | ||
<section id="abstract"> | ||
<p>This document describes the <span property="dc:title" id="title"></span>, i.e., | ||
the <span property="dc:description" id="description"></span>. | ||
</p> | ||
<p>Alternate versions of the vocabulary definition exist in | ||
<a rel="alternate" href="vocabulary.ttl">Turtle</a> and | ||
<a rel="alternate" href="vocabulary.jsonld">JSON-LD</a>. | ||
</p> | ||
<dl> | ||
<dt>Published:</dt><dd><time property="dc:date" id="time"></time></dd> | ||
<dt>Version Info:</dt> | ||
<dd>1.0</dd> | ||
<dt id="see_also">See Also: </dt> | ||
</dl> | ||
</section> | ||
<section id="sotd"> | ||
<p> | ||
This vocabulary has been defined by the | ||
<a href="https://www.w3.org/2017/vc/WG/"> | ||
W3C Verifiable Credentials Working Group</a> and provides the official RDFS | ||
vocabulary for | ||
<a href="https://www.w3.org/TR/vc-bitstring-status-list/"> | ||
Bitstring Status Lists</a>. Comments regarding this document are welcome. | ||
Please file issues directly on | ||
<a href="https://github.com/w3c/vc-bitstring-status-list/issues/">GitHub</a>, or | ||
send them to | ||
<a href="mailto:[email protected]">[email protected]</a> | ||
(<a href="mailto:[email protected]?subject=subscribe"> | ||
subscribe</a>, | ||
<a href="https://lists.w3.org/Archives/Public/public-vc-comments/"> | ||
archives</a>). | ||
</p> | ||
</section> | ||
<section> | ||
<h2>Specification of terms</h2> | ||
<p> | ||
In general, the terms — i.e., the properties and classes — used in | ||
the VCDM are formally specified in Recommendation Track documents published by | ||
the <a href="https://www.w3.org/groups/wg/vc">W3C Verifiable Credentials Working | ||
Group</a> or, for some deprecated or reserved terms, in Reports published by the | ||
<a href="https://www.w3.org/groups/cg/credentials">W3C Credentials Community | ||
Group</a>. In each case of such external definition, the term's description in | ||
this document contains a link to the relevant specification. Additionally, the | ||
`rdfs:definedBy` property in the RDFS representation(s) refers to the formal | ||
specification. | ||
</p> | ||
<p> | ||
In some cases, a local explanation is necessary to complement, or to replace, | ||
the definition found in an external specification. For instance, this is so when | ||
the term is needed to provide a consistent structure to the RDFS vocabulary, | ||
such as when the term defines a common supertype for class instances that are | ||
used as objects of specific properties. For such cases, | ||
the extra definition is included in the current | ||
document (and the `rdfs:comment` property is used to include them in the RDFS | ||
representations). | ||
</p> | ||
</section> | ||
<section> | ||
<h2>Namespaces</h2> | ||
<p>This specification makes use of the following namespaces:</p> | ||
<dl class="terms" id="namespaces"> | ||
</dl> | ||
</section> | ||
|
||
<section id="term_definitions"> | ||
<h1>Regular terms</h1> | ||
|
||
<section id="class_definitions" class="term_definitions"> | ||
<h2>Class definitions</h2> | ||
</section> | ||
|
||
<section id="property_definitions" class="term_definitions"> | ||
<h2>Property definitions</h2> | ||
</section> | ||
|
||
<section id="datatype_definitions" class="term_definitions"> | ||
<h2>Datatype definitions</h2> | ||
</section> | ||
|
||
<section id="individual_definitions" class="term_definitions"> | ||
<h2>Definitions for individuals</h2> | ||
</section> | ||
</section> | ||
|
||
<section id="deprecated_term_definitions"> | ||
<h1>Deprecated terms</h1> | ||
|
||
<p class="annoy"> | ||
All terms in this section are <em><strong>deprecated</strong></em>, and are only | ||
kept in this vocabulary for backward compatibility. | ||
</p> | ||
<p> | ||
New applications should not use them. | ||
</p> | ||
|
||
<section id="deprecated_class_definitions" class="term_definitions"> | ||
<h2>Deprecated classes</h2> | ||
</section> | ||
|
||
<section id="deprecated_property_definitions" class="term_definitions"> | ||
<h2>Deprecated properties</h2> | ||
</section> | ||
|
||
<section id="deprecated_property_definitions" class="term_definitions"> | ||
<h2>Deprecated properties</h2> | ||
</section> | ||
|
||
<section id="deprecated_individual_definitions" class="term_definitions"> | ||
<h2>Deprecated individuals</h2> | ||
</section> | ||
</section> | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I flagged this elsewhere -- but don't think
ttl
works as specified and we don't need it here. I won't object to it being added here, but we'll then just need to remove it later unless it can be shown that it works properly.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please raise an issue if you haven't done so already noting why TTL doesn't work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind, I found it: #73 (comment)