From de3ee376273848f141bf6ad35468572c60b84d79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Sat, 1 Aug 2026 14:55:17 +0200 Subject: [PATCH 1/4] adds chained identity transformation with Selene tracelib This is related to scdh/seed-xc#55. --- distribution/seed/assembly.xml | 7 +++ distribution/seed/id.xsl | 27 +++++++++++ pom.xml | 82 +++++++++++++++++++++++++++++++++- 3 files changed, 114 insertions(+), 2 deletions(-) create mode 100644 distribution/seed/id.xsl diff --git a/distribution/seed/assembly.xml b/distribution/seed/assembly.xml index 47f254f..983b6f3 100644 --- a/distribution/seed/assembly.xml +++ b/distribution/seed/assembly.xml @@ -38,6 +38,13 @@ wiki/** + + ${project.basedir} + /${project.artifactId} + + distribution/seed/id.xsl + + ${project.basedir} /${project.artifactId} diff --git a/distribution/seed/id.xsl b/distribution/seed/id.xsl new file mode 100644 index 0000000..d86b937 --- /dev/null +++ b/distribution/seed/id.xsl @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pom.xml b/pom.xml index 2ce7ed5..6520700 100644 --- a/pom.xml +++ b/pom.xml @@ -538,6 +538,83 @@ + + + + ${project.basedir} + + + distribution/seed/id.xsl + + + + saxon-config-uri + ${project.basedir}/saxon.he.xml + + + id-prefix + ${project.artifactId} + + + media-type + application/tei+xml + + + + type + SeleneSelectorMapper + + + ${seed-config-xsl.url} + + + .chain.json + + + + + + ${project.basedir} + + distribution/seed/id.xsl + + + + document-config-uri + ${seed-json-config.dir}/xsl/document.seed.json + + + chained-config-uri + ${seed-json-config.dir}/distribution/seed/id.chain.json + + + media-type-package + https://scdh.github.io/dts-transformations/xsl/id.xsl + + + media-type-package-version + 1.0.0 + + + media-type-component + mode + + + media-type-processor + tei + + + ${seed-chain-xsl.url} + + + .seed.json + + + + ${project.basedir} @@ -547,7 +624,7 @@ json-files-csv - file:${project.build.directory}/generated-resources/xml/xslt/pom.xsl.json,${project.basedir}/distribution/seed/collection.seed.json + file:${project.build.directory}/generated-resources/xml/xslt/pom.xsl.json,${project.basedir}/distribution/seed/collection.seed.json,${project.build.directory}/generated-resources/xml/xslt/distribution/seed/id.seed.json ${seed-merge-xsl.url} @@ -558,6 +635,7 @@ + ${project.basedir} @@ -633,7 +711,7 @@ json-files-csv - file:${project.build.directory}/generated-resources/xml/xslt/pom.xsl.json,${project.basedir}/distribution/seed/collection.seed.json,file:${project.build.directory}/generated-resources/xml/xslt/test/media-type/tei2txt.seed.json + file:${project.build.directory}/generated-resources/xml/xslt/pom.xsl.json,${project.basedir}/distribution/seed/collection.seed.json,file:${project.build.directory}/generated-resources/xml/xslt/test/media-type/tei2txt.seed.json,file:${project.build.directory}/generated-resources/xml/xslt/distribution/seed/id.seed.json ${seed-merge-xsl.url} From 57b2ef84b4caa34f7f209b35558da6102e264348 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Sun, 2 Aug 2026 09:45:31 +0200 Subject: [PATCH 2/4] always use media type package if provided This is related to #32. --- test/post-proc-apply.xspec | 8 +++++--- test/post-proc-call.xsl | 2 +- test/post-proc-call.xspec | 8 +++++--- test/post-proc-fun.xsl | 2 +- test/post-proc-fun.xspec | 8 +++++--- xsl/document.xsl | 17 +++++------------ 6 files changed, 22 insertions(+), 23 deletions(-) diff --git a/test/post-proc-apply.xspec b/test/post-proc-apply.xspec index cd9a568..360aad8 100644 --- a/test/post-proc-apply.xspec +++ b/test/post-proc-apply.xspec @@ -15,9 +15,11 @@ - - - + + + + - + diff --git a/test/post-proc-call.xspec b/test/post-proc-call.xspec index 90d46a5..1178fd5 100644 --- a/test/post-proc-call.xspec +++ b/test/post-proc-call.xspec @@ -15,9 +15,11 @@ - - - + + + + - + diff --git a/test/post-proc-fun.xspec b/test/post-proc-fun.xspec index 9cd0647..26b4ed6 100644 --- a/test/post-proc-fun.xspec +++ b/test/post-proc-fun.xspec @@ -17,9 +17,11 @@ - - - + + + + - - - - - - - - + - + @@ -173,7 +166,7 @@ no matter what the $mediaType parameter is set to. - + @@ -181,7 +174,7 @@ no matter what the $mediaType parameter is set to. - + @@ -194,7 +187,7 @@ no matter what the $mediaType parameter is set to. 400 From 57eedd3758580b82ea8d9795e9caa65be912f66b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Sun, 2 Aug 2026 10:13:03 +0200 Subject: [PATCH 3/4] pass all DTS parameters to media type processors This closes #33. --- test/post-proc-apply.xsl | 18 ++++++++++++++++++ test/post-proc-call.xsl | 4 ++++ test/post-proc-fun.xsl | 4 ++++ test/post-proc-fun.xspec | 2 +- xsl/document.xsl | 34 +++++++++++++++++++++++++++++----- 5 files changed, 56 insertions(+), 6 deletions(-) diff --git a/test/post-proc-apply.xsl b/test/post-proc-apply.xsl index 6f8dd58..58677b9 100644 --- a/test/post-proc-apply.xsl +++ b/test/post-proc-apply.xsl @@ -1,4 +1,22 @@ + + + + diff --git a/test/post-proc-fun.xsl b/test/post-proc-fun.xsl index 4f33f6d..0be3b8b 100644 --- a/test/post-proc-fun.xsl +++ b/test/post-proc-fun.xsl @@ -11,6 +11,10 @@ + + + + diff --git a/test/post-proc-fun.xspec b/test/post-proc-fun.xspec index 26b4ed6..40dafb2 100644 --- a/test/post-proc-fun.xspec +++ b/test/post-proc-fun.xspec @@ -12,7 +12,7 @@ - + diff --git a/xsl/document.xsl b/xsl/document.xsl index f3ac3d3..1d98985 100644 --- a/xsl/document.xsl +++ b/xsl/document.xsl @@ -130,6 +130,10 @@ no matter what the $mediaType parameter is set to. + + + + @@ -137,6 +141,10 @@ no matter what the $mediaType parameter is set to. + + + + @@ -144,6 +152,10 @@ no matter what the $mediaType parameter is set to. + + + + @@ -160,6 +172,10 @@ no matter what the $mediaType parameter is set to. + + + + @@ -168,6 +184,10 @@ no matter what the $mediaType parameter is set to. + + + + @@ -176,6 +196,10 @@ no matter what the $mediaType parameter is set to. + + + + @@ -187,17 +211,17 @@ no matter what the $mediaType parameter is set to. 400 + as="function (node()*, xs:string?, xs:string?, xs:string?, xs:string?, xs:string?, xs:string?, document-node()) as node()*" + select="replace($media-type-processor, '#[0-9]+$', '') => xs:QName() => function-lookup(8)"/> - + - + - + From 3edbe00c5e1feb2240e323b33d4a35205b200d2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Sun, 2 Aug 2026 10:47:30 +0200 Subject: [PATCH 4/4] fixes package generation in the pipeline --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6520700..f24b4d6 100644 --- a/pom.xml +++ b/pom.xml @@ -550,7 +550,7 @@ saxon-config-uri - ${project.basedir}/saxon.he.xml + ${project.basedir}/saxon.xml id-prefix