diff --git a/context/modules/v1.0.json b/context/modules/v1.0.json new file mode 100644 index 0000000..bf6b344 --- /dev/null +++ b/context/modules/v1.0.json @@ -0,0 +1,164 @@ +{ + "@context": [ + { + "dts": "https://dtsapi.org/v1.0#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "@protected": true, + "default": "@none", + "CitableUnit": { + "@id": "dts:CitableUnit", + "@protected": false + }, + "CitationTree": { + "@id": "dts:CitationTree", + "@protected": true + }, + "CiteStructure": { + "@id": "dts:CiteStructure", + "@protected": true + }, + "Collection": { + "@id": "dts:Collection", + "@protected": false + }, + "EntryPoint": { + "@id": "dts:EntryPoint", + "@protected": true + }, + "Navigation": { + "@id": "dts:Navigation", + "@protected": true + }, + "Pagination": { + "@id": "dts:Pagination", + "@protected": true + }, + "Resource": { + "@id": "dts:Resource", + "@protected": false + }, + "citationTrees": { + "@id": "dts:citationTrees", + "@container": "@set", + "@protected": true + }, + "citeStructure": { + "@id": "dts:citeStructure", + "@container": "@set", + "@protected": true + }, + "desc": { + "@id": "dts:description", + "@protected": false, + "@container": "@language" + }, + "end": { + "@id": "dts:end", + "@protected": true + }, + "extensions": { + "@id": "@nest", + "@protected": false + }, + "first": { + "@id": "dts:first", + "@protected": true + }, + "last": { + "@id": "dts:last", + "@protected": true + }, + "member": { + "@id": "dts:member", + "@container": "@set", + "@protected": false + }, + "next": { + "@id": "dts:next", + "@protected": true + }, + "previous": { + "@id": "dts:previous", + "@protected": true + }, + "ref": { + "@id": "dts:ref", + "@protected": true + }, + "resource": { + "@id": "dts:resource", + "@protected": false, + "@type": "@id" + }, + "start": { + "@id": "dts:start", + "@protected": true + }, + "label": { + "@id": "rdfs:label", + "@protected": false, + "@container": "@language" + }, + "view": { + "@id": "dts:view", + "@protected": false + }, + "citeType": { + "@id": "dts:citeType", + "@protected": true + }, + "collection": { + "@id": "dts:collection", + "@protected": false + }, + "document": { + "@id": "dts:document", + "@protected": false + }, + "download": { + "@id": "dts:download", + "@protected": false + }, + "dtsVersion": { + "@id": "dts:dtsVersion", + "@protected": true + }, + "identifier": { + "@id": "dts:identifier", + "@protected": false + }, + "level": { + "@id": "dts:level", + "@type": "xsd:integer", + "@protected": true + }, + "mediaTypes": { + "@id": "dts:mediaTypes", + "@protected": true, + "@container": "@set" + }, + "navigation": { + "@id": "dts:navigation", + "@protected": false + }, + "parent": { + "@id": "dts:parent", + "@protected": true + }, + "title": { + "@id": "dts:title" + }, + "totalChildren": { + "@id": "dts:totalChildren", + "@type": "xsd:integer", + "@protected": true + }, + "totalParents": { + "@id": "dts:totalParents", + "@type": "xsd:integer", + "@protected": true + } + } + ] +} diff --git a/context/v1.0.json b/context/v1.0.json new file mode 100644 index 0000000..e458aba --- /dev/null +++ b/context/v1.0.json @@ -0,0 +1,69 @@ +{ + "@context": { + "dts": "https://dtsapi.org/v1.0#", + "dct": "http://purl.org/dc/terms/", + + "CitableUnit": "dts:CitableUnit", + "CitationTree": "dts:CitationTree", + "CiteStructure": "dts:CiteStructure", + "Collection": "dts:Collection", + "EntryPoint": "dts:EntryPoint", + "MetadataObject": "dts:MetadataObject", + "Navigation": "dts:Navigation", + "Pagination": "dts:Pagination", + "Resource": "dts:Resource", + + "citationTrees": "dts:citationTrees", + "citeStructure":"dts:citeStructure", + "description": "dts:description", + + "lang": "@language", + "value": "@value", + "dublinCore": { + "@id": "@nest", + "@context": { + "@vocab": "http://purl.org/dc/terms/", + "description": { + "@id": "dct:description" + }, + "identifier": { + "@id": "dct:identifier" + }, + "title": { + "@id": "dct:title" + } + } + }, + "end": "dts:end", + "extensions": { + "@id": "@nest", + "@context": { + "@vocab": null + } + }, + "first": "dts:first", + "last": "dts:last", + "member": "dts:member", + "next": "dts:next", + "previous": "dts:previous", + "ref": "dts:ref", + "resource": "dts:resource", + "start": "dts:start", + "title": "dts:title", + "view": "dts:view", + + "citeType": "dts:citeType", + "collection": "dts:collection", + "document": "dts:document", + "download": "dts:download", + "dtsVersion": "dts:dtsVersion", + "identifier": "dts:identifier", + "level": "dts:level", + "mediaTypes": "dts:mediaTypes", + "navigation": "dts:navigation", + "parent": "dts:parent", + "totalChildren": "dts:totalChildren", + "totalParents": "dts:totalParents" + + } +} \ No newline at end of file diff --git a/context/1.0rcx.json b/context/v1.0rcx.json similarity index 97% rename from context/1.0rcx.json rename to context/v1.0rcx.json index a95aa22..61e8d9b 100644 --- a/context/1.0rcx.json +++ b/context/v1.0rcx.json @@ -1,6 +1,6 @@ { "@context": { - "dts": "https://w3id.org/dts/api#", + "dts": "https://dtsapi.org/v1.0rcx#", "dct": "http://purl.org/dc/terms/", "CitableUnit": "dts:CitableUnit", diff --git a/context/1.0test.json b/context/v1.0test.json similarity index 97% rename from context/1.0test.json rename to context/v1.0test.json index e5715e4..b0029e3 100644 --- a/context/1.0test.json +++ b/context/v1.0test.json @@ -1,6 +1,6 @@ { "@context": { - "dts": "https://w3id.org/dts/api#", + "dts": "https://dtsapi.org/v1.0test#", "dct": "http://purl.org/dc/terms/", "CitableUnit": "dts:CitableUnit", diff --git a/distribution/seed/collection.seed.json b/distribution/seed/collection.seed.json index e29dc91..6927371 100644 --- a/distribution/seed/collection.seed.json +++ b/distribution/seed/collection.seed.json @@ -36,8 +36,8 @@ "context": { "document": { "@context": [ - "https://raw.githubusercontent.com/SCDH/dts-transformations/refs/tags/${revision}${changelist}/context/modules/dct-nest.json", - "https://raw.githubusercontent.com/SCDH/dts-transformations/refs/tags/${revision}${changelist}/context/modules/1.0rc1.json", + "https://raw.githubusercontent.com/SCDH/dts-transformations/refs/tags/${revision}${changelist}/context/modules/v1.0.json", + "https://raw.githubusercontent.com/SCDH/dts-transformations/refs/tags/${revision}${changelist}/context/modules/dct-obj.json", { "extensions": "@nest", "requested": { @@ -89,8 +89,8 @@ "context": { "document": { "@context": [ - "https://raw.githubusercontent.com/SCDH/dts-transformations/refs/tags/${revision}${changelist}/context/modules/dct-nest.json", - "https://raw.githubusercontent.com/SCDH/dts-transformations/refs/tags/${revision}${changelist}/context/modules/1.0rc1.json", + "https://raw.githubusercontent.com/SCDH/dts-transformations/refs/tags/${revision}${changelist}/context/modules/v1.0.json", + "https://raw.githubusercontent.com/SCDH/dts-transformations/refs/tags/${revision}${changelist}/context/modules/dct-obj.json", { "extensions": "@nest", "requested": { diff --git a/distribution/seed/context-map.json b/distribution/seed/context-map.json index 8379ace..ecee831 100644 --- a/distribution/seed/context-map.json +++ b/distribution/seed/context-map.json @@ -21,6 +21,32 @@ }, + "https://raw.githubusercontent.com/SCDH/dts-transformations/refs/tags/${revision}${changelist}/context/modules/v1.0.json": { + "path": "context/modules/v1.0.json" + }, + "https://raw.githubusercontent.com/SCDH/dts-transformations/refs/heads/main/context/modules/v1.0.json": { + "path": "context/modules/v1.0.json" + }, + "https://scdh.github.io/dts-transformations/latest/context/modules/v1.0.json": { + "path": "context/modules/v1.0.json" + }, + + + "https://raw.githubusercontent.com/SCDH/dts-transformations/refs/tags/${revision}${changelist}/context/v1.0.json": { + "path": "context/v1.0.json" + }, + "https://raw.githubusercontent.com/SCDH/dts-transformations/refs/heads/main/context/v1.0.json": { + "path": "context/v1.0.json" + }, + "https://scdh.github.io/dts-transformations/latest/context/v1.0.json": { + "path": "context/v1.0.json" + }, + + "https://dtsapi.org/specifications/context/v1.0.json": { + "path": "context/v1.0.json" + }, + + "https://raw.githubusercontent.com/SCDH/dts-transformations/refs/tags/${revision}${changelist}/context/modules/1.0rc1.json": { "path": "context/modules/1.0rc1.json" }, @@ -42,7 +68,6 @@ "path": "context/1.0rc1.json" }, - "https://dtsapi.org/specifications/context/1.0rc1.json": { "path": "context/1.0rc1.json" } diff --git a/sparql/children.rq b/sparql/children.rq index 40a86df..341b46f 100644 --- a/sparql/children.rq +++ b/sparql/children.rq @@ -7,7 +7,7 @@ # USAGE: see test/collection/README.md -PREFIX dts: +PREFIX dts: PREFIX dct: PREFIX rdf: PREFIX seed: diff --git a/sparql/frame.json b/sparql/frame.json index 3c0b8c2..ccd9033 100644 --- a/sparql/frame.json +++ b/sparql/frame.json @@ -1,7 +1,7 @@ { "@context": [ "https://raw.githubusercontent.com/SCDH/dts-transformations/refs/heads/main/context/modules/dct-nest.json", - "https://raw.githubusercontent.com/SCDH/dts-transformations/refs/heads/main/context/modules/1.0rc1.json", + "https://raw.githubusercontent.com/SCDH/dts-transformations/refs/heads/main/context/modules/v1.0.json", { "extensions": "@nest", "requested": { "@id": "dts:requested", "@nest": "extensions", "@type": "http://www.w3.org/2001/XMLSchema#boolean" } diff --git a/sparql/parents.rq b/sparql/parents.rq index 868ea3c..ad11a3d 100644 --- a/sparql/parents.rq +++ b/sparql/parents.rq @@ -7,7 +7,7 @@ # USAGE: see test/collection/README.md -PREFIX dts: +PREFIX dts: PREFIX dct: PREFIX rdf: PREFIX seed: diff --git a/sparql/wadm-with-ref.rq b/sparql/wadm-with-ref.rq index fd05c50..2d9f6dd 100644 --- a/sparql/wadm-with-ref.rq +++ b/sparql/wadm-with-ref.rq @@ -9,7 +9,7 @@ # ?PARAMREF - the identifier member passed to the document enpoint as ref parameter # ?PARAMURI - the document query URL -PREFIX dts: +PREFIX dts: PREFIX oa: PREFIX dcterms: PREFIX rdf: diff --git a/test/john.xml b/test/john.xml index 592b6d5..dd2b0e3 100644 --- a/test/john.xml +++ b/test/john.xml @@ -26,11 +26,11 @@ - + - + - + @@ -66,8 +66,8 @@ - - + + + diff --git a/xsl/dts.xsl b/xsl/dts.xsl index 63d2a99..bde1c3b 100644 --- a/xsl/dts.xsl +++ b/xsl/dts.xsl @@ -4,10 +4,11 @@ xmlns:dts="https://distributed-text-services.github.io/specifications/" exclude-result-prefixes="#all" xpath-default-namespace="http://www.tei-c.org/ns/1.0" version="3.0"> - + + + select="'https://distributed-text-services.github.io/specifications/context/' || dts:context-basename()"/> @@ -16,26 +17,48 @@ + + + + + + + + + + + + + + + + + + + + + + + test="$uses-local-context and $context-url eq 'https://distributed-text-services.github.io/specifications/context/v1.0.json'"> + test="concat('../context/', dts:context-basename()) => resolve-uri(static-base-uri()) => unparsed-text-available()"> diff --git a/xsl/dts.xspec b/xsl/dts.xspec index f87736b..33602f0 100644 --- a/xsl/dts.xspec +++ b/xsl/dts.xspec @@ -18,7 +18,7 @@ test="map:get(., '@context') => map:contains('dts')"/> - + @@ -28,7 +28,17 @@ - + + + + + + + + + + @@ -38,7 +48,17 @@ - + + + + + + + + + + @@ -48,10 +68,26 @@ - + + + + + + + + + + + + + + + + - + @@ -61,10 +97,10 @@ - + + test="string-length(.) < string-length('https://dtsapi.org/v1.0test#endMember')"/>