Skip to content

Commit

Permalink
Merge pull request #332 from w3c/remove-@
Browse files Browse the repository at this point in the history
Remove `@` from keywords
  • Loading branch information
iherman committed Sep 13, 2018
2 parents b329f60 + 9d2e6e4 commit 4fce630
Show file tree
Hide file tree
Showing 28 changed files with 238 additions and 243 deletions.
32 changes: 16 additions & 16 deletions common/js/wp.js
Expand Up @@ -74,35 +74,35 @@ function create_wp(config) {
// =====================================================================
let manifest = {
"@context" : ["https://schema.org", "https://www.w3.org/ns/wp-context"],
"@type" : "CreativeWork",
"type" : "TechArticle",
"accessMode" : ["textual", "visual"],
"accessModeSufficient" : ["textual"],

"resources" : [{
"@type" : "PublicationLink",
"type" : "PublicationLink",
"url" : "https://www.w3.org/StyleSheets/TR/2016/logos/W3C",
"encodingFormat" : "image/svg+xml",
"description" : "W3C Logo"
},{
"@type" : "PublicationLink",
"type" : "PublicationLink",
"url" : "https://www.w3.org/StyleSheets/TR/2016/base.css",
"rel" : "stylesheet",
"encodingFormat" : "tex/css",
"description" : "Generic CSS file for W3C TR documents"
}],

"links" : [{
"@type" : "PublicationLink",
"type" : "PublicationLink",
"url" : "https://www.w3.org/Consortium/Legal/privacy-statement-20140324",
"encodingFormat" : "text/html",
"rel" : "privacy-policy"
},{
"@type" : "PublicationLink",
"type" : "PublicationLink",
"url" : "https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document",
"encodingFormat" : "text/html",
"rel" : "license describedby"
},{
"@type" : "PublicationLink",
"type" : "PublicationLink",
"url" : "http://www.w3.org/Consortium/Legal/ipr-notice#Copyright",
"encodingFormat" : "text/html",
"rel" : "copyright"
Expand All @@ -126,12 +126,12 @@ function create_wp(config) {
if(config[key] !== undefined) {
// Create an array for all the Persons in the same category...
manifest[person_keys_mapping[key]] = config[key].map( (person) => {
retval = { "@type": "Person" };
retval = { "type" : "Person" };
retval.name = person.name;
if( person.url !== undefined ) {
retval.id = person.url
}
retval.affiliation = { "@type" : "Organization", "name" : person.company }
retval.affiliation = { "type" : "Organization", "name" : person.company }
if( person.companyURL !== undefined ) {
retval.affiliation.url = person.companyURL
}
Expand Down Expand Up @@ -186,7 +186,7 @@ function create_wp(config) {

if( styleFile !== undefined ) {
manifest.resources.push({
"@type" : "PublicationLink",
"type" : "PublicationLink",
"url" : `https://www.w3.org/StyleSheets/TR/2016/${styleFile}`,
"rel" : "stylesheet",
"encodingFormat" : "tex/css",
Expand All @@ -196,7 +196,7 @@ function create_wp(config) {

if( logoFile !== undefined ) {
manifest.resources.push({
"@type" : "PublicationLink",
"type" : "PublicationLink",
"url" : `https://www.w3.org/StyleSheets/TR/2016/logos/${logoFile}`,
"encodingFormat" : `${logoFormat}`,
"description" : "Sidebar logo reflecting the status of the document"
Expand All @@ -205,7 +205,7 @@ function create_wp(config) {

if( watermark !== undefined ) {
manifest.resources.push({
"@type" : "PublicationLink",
"type" : "PublicationLink",
"url" : `https://www.w3.org/StyleSheets/TR/2016/logos/${watermark}`,
"encodingFormat" : "image/png",
"description" : "Background watermark reflecting the status of the document"
Expand All @@ -215,7 +215,7 @@ function create_wp(config) {
// If the ORCID extension is used, the ORCID logo should also be added to the list of resources
if( document.querySelector("span.orcid") ) {
manifest.resources.push({
"@type" : "PublicationLink",
"type" : "PublicationLink",
"url" : "https://orcid.org/sites/default/files/images/orcid_16x16.gif",
"encodingFormat" : "image/gif",
"description" : "ORCID logo"
Expand All @@ -235,7 +235,7 @@ function create_wp(config) {
let href= element.getAttribute("data");
if( href && is_relative(href) ) {
let retval = {
"@type" : "PublicationLink",
"type" : "PublicationLink",
"url" : `${href}`,
}
let type = element.getAttribute("type");
Expand All @@ -249,7 +249,7 @@ function create_wp(config) {
let href= element.getAttribute("src");
if( href && is_relative(href) ) {
let retval = {
"@type" : "PublicationLink",
"type" : "PublicationLink",
"url" : `${href}`
}
let type = image_type(href);
Expand All @@ -267,7 +267,7 @@ function create_wp(config) {
let href= element.getAttribute("href");
if( href && is_relative(href) ) {
let retval = {
"@type" : "PublicationLink",
"type" : "PublicationLink",
"url" : `${href}`
}
let type = element.getAttribute("type");
Expand All @@ -286,7 +286,7 @@ function create_wp(config) {
let href= element.getAttribute("src");
if( href && is_relative(href) ) {
let retval = {
"@type" : "PublicationLink",
"type" : "PublicationLink",
"url" : `${href}`
}
if( href.endsWith(".js") ) {
Expand Down
56 changes: 28 additions & 28 deletions experiments/audiobook/flatland-canonical.json
@@ -1,20 +1,20 @@
{
"@context": ["https://schema.org", "https://www.w3.org/ns/wp-context"],
"@type": ["Audiobook"],
"@id": "https://librivox.org/flatland-a-romance-of-many-dimensions-by-edwin-abbott-abbott/",
"type": ["Audiobook"],
"id": "https://librivox.org/flatland-a-romance-of-many-dimensions-by-edwin-abbott-abbott/",
"url": "https://w3c.github.io/wpub/experiments/audiobook/",
"name": [
{
"@value": "Flatland: A Romance of Many Dimensions",
"@language": "en"
"value": "Flatland: A Romance of Many Dimensions",
"language": "en"
}
],
"author": [
{
"name": [
{
"@value": "Edwin Abbott Abbott",
"@language": "en"
"value": "Edwin Abbott Abbott",
"language": "en"
}
],
"type": "Person"
Expand All @@ -24,8 +24,8 @@
{
"name": [
{
"@value": "Ruth Golding",
"@language": "en"
"value": "Ruth Golding",
"language": "en"
}
],
"type": "Person"
Expand All @@ -35,8 +35,8 @@
{
"name": [
{
"@value": "Librivox",
"@language": "en"
"value": "Librivox",
"language": "en"
}
],
"type": "Organization"
Expand Down Expand Up @@ -65,8 +65,8 @@
"encodingFormat": "audio/mpeg",
"name": [
{
"@value": "Part 1, Sections 1 - 3",
"@language": "en"
"value": "Part 1, Sections 1 - 3",
"language": "en"
}
]
},
Expand All @@ -75,8 +75,8 @@
"encodingFormat": "audio/mpeg",
"name": [
{
"@value": "Part 1, Sections 4 - 5",
"@language": "en"
"value": "Part 1, Sections 4 - 5",
"language": "en"
}
]
},
Expand All @@ -85,8 +85,8 @@
"encodingFormat": "audio/mpeg",
"name": [
{
"@value": "Part 1, Sections 6 - 7",
"@language": "en"
"value": "Part 1, Sections 6 - 7",
"language": "en"
}
]
},
Expand All @@ -95,8 +95,8 @@
"encodingFormat": "audio/mpeg",
"name": [
{
"@value": "Part 1, Sections 8 - 10",
"@language": "en"
"value": "Part 1, Sections 8 - 10",
"language": "en"
}
]
},
Expand All @@ -105,8 +105,8 @@
"encodingFormat": "audio/mpeg",
"name": [
{
"@value": "Part 1, Sections 11 - 12",
"@language": "en"
"value": "Part 1, Sections 11 - 12",
"language": "en"
}
]
},
Expand All @@ -115,8 +115,8 @@
"encodingFormat": "audio/mpeg",
"name": [
{
"@value": "Part 2, Sections 13 - 14",
"@language": "en"
"value": "Part 2, Sections 13 - 14",
"language": "en"
}
]
},
Expand All @@ -125,8 +125,8 @@
"encodingFormat": "audio/mpeg",
"name": [
{
"@value": "Part 2, Sections 15 - 17",
"@language": "en"
"value": "Part 2, Sections 15 - 17",
"language": "en"
}
]
},
Expand All @@ -135,8 +135,8 @@
"encodingFormat": "audio/mpeg",
"name": [
{
"@value": "Part 2, Sections 18 - 20",
"@language": "en"
"value": "Part 2, Sections 18 - 20",
"language": "en"
}
]
},
Expand All @@ -145,8 +145,8 @@
"encodingFormat": "audio/mpeg",
"name": [
{
"@value": "Part 2, Sections 21 - 22",
"@language": "en"
"value": "Part 2, Sections 21 - 22",
"language": "en"
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions experiments/audiobook/flatland.json
@@ -1,7 +1,7 @@
{
"@context": ["https://schema.org", "https://www.w3.org/ns/wp-context"],
"@type": "Audiobook",
"@id": "https://librivox.org/flatland-a-romance-of-many-dimensions-by-edwin-abbott-abbott/",
"type": "Audiobook",
"id": "https://librivox.org/flatland-a-romance-of-many-dimensions-by-edwin-abbott-abbott/",
"url": "https://w3c.github.io/wpub/experiments/audiobook/",
"name": "Flatland: A Romance of Many Dimensions",
"author": "Edwin Abbott Abbott",
Expand Down
4 changes: 2 additions & 2 deletions experiments/html-schema-org-json-ld/index.html
Expand Up @@ -5,9 +5,9 @@
<script type="application/ld+json" id="manifest">
{
"@context": "https://schema.org/",
"@id": "https://publisher.example.org/mobydick/",
"id": "https://publisher.example.org/mobydick/",

"@type": "https://schema.org/Book",
"type": "https://schema.org/Book",
"name": "Moby-Dick",
"author": "Herman Melville",
"image": "images/cover.jpg"
Expand Down
4 changes: 2 additions & 2 deletions experiments/manifest_script/mobydick.html
Expand Up @@ -5,10 +5,10 @@
<link href="#manifest" rel="wpub-manifest" />
<script type="application/ld+json" id="manifest">
"@context": "http://www.w3.org/ns/wpub.jsonld",
"@id": "https://publisher.example.org/mobydick",
"id": "https://publisher.example.org/mobydick",

"metadata": {
"@type": "https://schema.org/Book",
"type": "https://schema.org/Book",
"title": "Moby-Dick",
"author": "Herman Melville",
"language": "en",
Expand Down
14 changes: 7 additions & 7 deletions experiments/separate_manifest/mobydick-simple.jsonld
@@ -1,6 +1,6 @@
{
"@context": ["https://schema.org", "https://www.w3.org/ns/wp-context"],
"@type": "Book",
"type": "Book",
"url": "https://publisher.example.org/mobydick",
"author": "Herman Melville",
"dateModified": "2018-02-10T17:00:00Z",
Expand All @@ -21,28 +21,28 @@
"resources": [
"css/mobydick.css",
{
"@type": "PublicationLink",
"type": "PublicationLink",
"rel": "https://www.w3.org/ns/wp#cover-page",
"url": "images/cover.jpg",
"encodingFormat": "image/jpeg"
},{
"@type": "PublicationLink",
"type": "PublicationLink",
"url": "html/toc.html",
"rel": "contents"
},{
"@type": "PublicationLink",
"type": "PublicationLink",
"url": "fonts/STIXGeneral.otf",
"encodingFormat": "application/vnd.ms-opentype"
},{
"@type": "PublicationLink",
"type": "PublicationLink",
"url": "fonts/STIXGeneralBol.otf",
"encodingFormat": "application/vnd.ms-opentype"
},{
"@type": "PublicationLink",
"type": "PublicationLink",
"url": "fonts/STIXGeneralBolIta.otf",
"encodingFormat": "application/vnd.ms-opentype"
},{
"@type": "PublicationLink",
"type": "PublicationLink",
"url": "fonts/STIXGeneralItalic.otf",
"encodingFormat": "application/vnd.ms-opentype"
}
Expand Down

0 comments on commit 4fce630

Please sign in to comment.