From 6a210653de533432d8f5e0420c0bebbfe79ae25f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Wed, 29 Jul 2026 10:25:19 +0200 Subject: [PATCH 01/13] adds contexts for DTS v1.0 This is related to #27. --- context/modules/v1.0.json | 164 ++++++++++++++++++++++++++++++++++++++ context/v1.0.json | 69 ++++++++++++++++ 2 files changed, 233 insertions(+) create mode 100644 context/modules/v1.0.json create mode 100644 context/v1.0.json 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 From 86ebd24b58b5c6776635a290e92a0eb5b93dfdb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Wed, 29 Jul 2026 11:10:17 +0200 Subject: [PATCH 02/13] adds v1.0 contexts to context map, related to #31 --- distribution/seed/context-map.json | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) 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" } From 2340b9e0dc1633a9df2272c2523015eb8ebb671a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Wed, 29 Jul 2026 11:11:54 +0200 Subject: [PATCH 03/13] migrates to v1.0 namespace for framing in collection endpoint transformations This is closes #31. This is related to #29. --- distribution/seed/collection.seed.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distribution/seed/collection.seed.json b/distribution/seed/collection.seed.json index e29dc91..d728eed 100644 --- a/distribution/seed/collection.seed.json +++ b/distribution/seed/collection.seed.json @@ -37,7 +37,7 @@ "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", { "extensions": "@nest", "requested": { @@ -90,7 +90,7 @@ "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", { "extensions": "@nest", "requested": { From aa66655a8a7f5fd5a1b05defa498961776075abe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Wed, 29 Jul 2026 11:22:01 +0200 Subject: [PATCH 04/13] migrates SPARQL for collection endpoint to DTS v1.0 Closes #29. --- sparql/children.rq | 2 +- sparql/frame.json | 2 +- sparql/parents.rq | 2 +- sparql/wadm-with-ref.rq | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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: From b2946e4efd2b70a593d3a6c70c807eebac24316c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Wed, 29 Jul 2026 12:24:14 +0200 Subject: [PATCH 05/13] tries to migrate XSLT to the DTS v1.0 namespace This is related to #30. --- context/{1.0rcx.json => v1.0rcx.json} | 2 +- context/{1.0test.json => v1.0test.json} | 2 +- xsl/document.xsl | 1 + xsl/dts.xsl | 34 ++++++++++++++++++++----- xsl/dts.xspec | 18 ++++++++++--- 5 files changed, 45 insertions(+), 12 deletions(-) rename context/{1.0rcx.json => v1.0rcx.json} (97%) rename context/{1.0test.json => v1.0test.json} (97%) 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/xsl/document.xsl b/xsl/document.xsl index 7d5a50c..6e4c076 100644 --- a/xsl/document.xsl +++ b/xsl/document.xsl @@ -111,6 +111,7 @@ no matter what the $mediaType parameter is set to. + diff --git a/xsl/dts.xsl b/xsl/dts.xsl index 63d2a99..cd5246a 100644 --- a/xsl/dts.xsl +++ b/xsl/dts.xsl @@ -4,10 +4,10 @@ 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()"/> @@ -16,12 +16,34 @@ + + + + + + + + + + + + + + + + + + + + + + + test="$uses-local-context and $context-url eq 'https://distributed-text-services.github.io/specifications/context/v1.0.json'"> @@ -30,12 +52,12 @@ diff --git a/xsl/dts.xspec b/xsl/dts.xspec index f87736b..9a41866 100644 --- a/xsl/dts.xspec +++ b/xsl/dts.xspec @@ -18,7 +18,7 @@ test="map:get(., '@context') => map:contains('dts')"/> - + @@ -28,6 +28,16 @@ + + + + + + + + + @@ -51,7 +61,7 @@ - + @@ -61,10 +71,10 @@ - + + test="string-length(.) < string-length('https://dtsapi.org/v1.0test#endMember')"/> From bf95e0f773c9c57d97819cedfeaac34805022381 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Wed, 29 Jul 2026 12:33:47 +0200 Subject: [PATCH 06/13] make dublincore extra node the default JSON-LD context/frame This is related to #26. It closes #24. --- distribution/seed/collection.seed.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distribution/seed/collection.seed.json b/distribution/seed/collection.seed.json index d728eed..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/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/v1.0.json", + "https://raw.githubusercontent.com/SCDH/dts-transformations/refs/tags/${revision}${changelist}/context/modules/dct-obj.json", { "extensions": "@nest", "requested": { From 860c122cb4642e092718e7518e06e332bc5b1b5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Tue, 29 Sep 2026 12:27:29 +0200 Subject: [PATCH 07/13] formatting --- xsl/dts.xsl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xsl/dts.xsl b/xsl/dts.xsl index cd5246a..4d8e54e 100644 --- a/xsl/dts.xsl +++ b/xsl/dts.xsl @@ -19,10 +19,10 @@ - + - + @@ -30,10 +30,10 @@ - + - + From c8feffb892c558409286ec2ccfeb47e1143cd42b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Tue, 29 Sep 2026 12:34:08 +0200 Subject: [PATCH 08/13] chooses better function name This is related to #30. --- xsl/dts.xsl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xsl/dts.xsl b/xsl/dts.xsl index 4d8e54e..bb4db62 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,7 +17,7 @@ - + @@ -52,7 +53,7 @@ From 409214904adb603d0b464a3abfe50f5d15f2ecdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Tue, 29 Sep 2026 12:38:28 +0200 Subject: [PATCH 09/13] fixes test input --- xsl/dts.xspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xsl/dts.xspec b/xsl/dts.xspec index 9a41866..d77a983 100644 --- a/xsl/dts.xspec +++ b/xsl/dts.xspec @@ -31,7 +31,7 @@ - + From b0a25279c22c16787afc6c157f422d317598ec85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Tue, 29 Sep 2026 12:40:08 +0200 Subject: [PATCH 10/13] adds test for compacting similar in v1.0 This is related to #30. --- xsl/dts.xspec | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/xsl/dts.xspec b/xsl/dts.xspec index d77a983..b840391 100644 --- a/xsl/dts.xspec +++ b/xsl/dts.xspec @@ -38,7 +38,7 @@ - + @@ -48,7 +48,17 @@ - + + + + + + + + + + @@ -58,6 +68,16 @@ + + + + + + + + + From 3bcc5eba4e9a7ad6f024efdc7c073fbd9cc0061c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Tue, 29 Sep 2026 13:12:04 +0200 Subject: [PATCH 11/13] adds tests for dts:context-basename in isolation This is related to #30. --- xsl/dts.xspec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xsl/dts.xspec b/xsl/dts.xspec index b840391..33602f0 100644 --- a/xsl/dts.xspec +++ b/xsl/dts.xspec @@ -78,7 +78,13 @@ - + + + + + + + From aaccd895d8df5e311d4ef2e41822becef47a3c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Tue, 29 Sep 2026 13:12:34 +0200 Subject: [PATCH 12/13] makes all tests in dts.xspec green again This is related to #30. --- xsl/dts.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xsl/dts.xsl b/xsl/dts.xsl index bb4db62..bde1c3b 100644 --- a/xsl/dts.xsl +++ b/xsl/dts.xsl @@ -51,7 +51,7 @@ + test="concat('../context/', dts:context-basename()) => resolve-uri(static-base-uri()) => unparsed-text-available()"> From e3b3fc80fdf813e9c6fb3555b3621e45c5205015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Tue, 29 Sep 2026 13:19:49 +0200 Subject: [PATCH 13/13] updates test case to v1.0 version namespace This is related to #30. --- test/john.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 @@ - - + +