From 1fc0c61edf8f62553414a51eda4ef784f32adfd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Tue, 19 May 2026 11:00:07 +0200 Subject: [PATCH 01/28] adds XSLT for generating a SEED config for media type transformations This is related to #20. --- build.xml | 11 +++ distribution/seed/seed-config-chain.xsl | 109 ++++++++++++++++++++++ distribution/seed/seed-config-chain.xspec | 20 ++++ distribution/seed/seed-config.xsl | 67 ++++++++----- test/media-type/id.xsl | 11 +++ test/media-type/saxon.xml | 14 +++ 6 files changed, 209 insertions(+), 23 deletions(-) create mode 100644 distribution/seed/seed-config-chain.xsl create mode 100644 distribution/seed/seed-config-chain.xspec create mode 100644 test/media-type/id.xsl create mode 100644 test/media-type/saxon.xml diff --git a/build.xml b/build.xml index fb98b13..3626b8e 100644 --- a/build.xml +++ b/build.xml @@ -27,6 +27,8 @@ + + @@ -77,4 +79,13 @@ + + + + + + + + diff --git a/distribution/seed/seed-config-chain.xsl b/distribution/seed/seed-config-chain.xsl new file mode 100644 index 0000000..19b49cd --- /dev/null +++ b/distribution/seed/seed-config-chain.xsl @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/distribution/seed/seed-config-chain.xspec b/distribution/seed/seed-config-chain.xspec new file mode 100644 index 0000000..8409c90 --- /dev/null +++ b/distribution/seed/seed-config-chain.xspec @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + diff --git a/distribution/seed/seed-config.xsl b/distribution/seed/seed-config.xsl index 52212cf..3d0c2d2 100644 --- a/distribution/seed/seed-config.xsl +++ b/distribution/seed/seed-config.xsl @@ -48,8 +48,7 @@ target/bin/xslt.sh -xsl:distribution/seed/seed-config.xsl saxon-config-uri=https otherwise they are prefixed with $upload-uri. --> - + @@ -98,8 +97,7 @@ target/bin/xslt.sh -xsl:distribution/seed/seed-config.xsl saxon-config-uri=https - + @@ -114,31 +112,54 @@ target/bin/xslt.sh -xsl:distribution/seed/seed-config.xsl saxon-config-uri=https /> - - - + + - - - - - - - + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/media-type/id.xsl b/test/media-type/id.xsl new file mode 100644 index 0000000..71636df --- /dev/null +++ b/test/media-type/id.xsl @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/test/media-type/saxon.xml b/test/media-type/saxon.xml new file mode 100644 index 0000000..224d920 --- /dev/null +++ b/test/media-type/saxon.xml @@ -0,0 +1,14 @@ + + + From 51295056ffa66e4e2b488399a2bbcfc8e4fac51a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Fri, 22 May 2026 10:24:36 +0200 Subject: [PATCH 02/28] adds chained transformation correctly to libraries This is related to #20. --- distribution/seed/seed-config-chain.xsl | 48 +++++++++++--- distribution/seed/seed-config-chain.xspec | 22 ++++++- distribution/seed/seed-config.xsl | 78 +++++++++++++++++++---- test/media-type/id.xsl | 11 ++-- test/media-type/saxon.xml | 17 ++--- 5 files changed, 136 insertions(+), 40 deletions(-) diff --git a/distribution/seed/seed-config-chain.xsl b/distribution/seed/seed-config-chain.xsl index 19b49cd..3adeec9 100644 --- a/distribution/seed/seed-config-chain.xsl +++ b/distribution/seed/seed-config-chain.xsl @@ -31,9 +31,16 @@ target/bin/xslt.sh -xsl:distribution/seed/seed-config.xsl saxon-config-uri=https + + + + + + + - + @@ -53,6 +60,21 @@ target/bin/xslt.sh -xsl:distribution/seed/seed-config.xsl saxon-config-uri=https + + + + + + + + + + + + + document-node in default mode + + select="seed:get-transformation-id($relative-path, .)" tunnel="true"/> - - - + NT seed:libraries overwrite - + + + + + @@ -98,7 +124,11 @@ target/bin/xslt.sh -xsl:distribution/seed/seed-config.xsl saxon-config-uri=https - + + + + + diff --git a/distribution/seed/seed-config-chain.xspec b/distribution/seed/seed-config-chain.xspec index 8409c90..8e46efc 100644 --- a/distribution/seed/seed-config-chain.xspec +++ b/distribution/seed/seed-config-chain.xspec @@ -1,16 +1,32 @@ - + + - + + + + + + + document-node in default mode @@ -94,6 +95,7 @@ target/bin/xslt.sh -xsl:distribution/seed/seed-config.xsl saxon-config-uri=https + document-node in mode transformation @@ -141,6 +143,7 @@ target/bin/xslt.sh -xsl:distribution/seed/seed-config.xsl saxon-config-uri=https + NT seed:libraries @@ -169,8 +172,62 @@ target/bin/xslt.sh -xsl:distribution/seed/seed-config.xsl saxon-config-uri=https - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + selecting package + + + @@ -202,17 +259,14 @@ target/bin/xslt.sh -xsl:distribution/seed/seed-config.xsl saxon-config-uri=https - - - - - - - - - + - + + + + + + diff --git a/test/media-type/id.xsl b/test/media-type/id.xsl index 71636df..0c11838 100644 --- a/test/media-type/id.xsl +++ b/test/media-type/id.xsl @@ -1,11 +1,10 @@ - + - + - + diff --git a/test/media-type/saxon.xml b/test/media-type/saxon.xml index 224d920..7605a8d 100644 --- a/test/media-type/saxon.xml +++ b/test/media-type/saxon.xml @@ -1,14 +1,11 @@ - + + + + + + + From ee599124bf4bfd1de94096ee35789ead6a2d1876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Fri, 22 May 2026 11:51:08 +0200 Subject: [PATCH 03/28] supports the 4 compile time parameters required for media-type This is related to #20. --- distribution/seed/seed-config-chain.xsl | 49 +++++++++++++++++++++++ distribution/seed/seed-config-chain.xspec | 10 ++++- distribution/seed/seed-config.xsl | 8 ++++ 3 files changed, 66 insertions(+), 1 deletion(-) diff --git a/distribution/seed/seed-config-chain.xsl b/distribution/seed/seed-config-chain.xsl index 3adeec9..a51b027 100644 --- a/distribution/seed/seed-config-chain.xsl +++ b/distribution/seed/seed-config-chain.xsl @@ -37,6 +37,13 @@ target/bin/xslt.sh -xsl:distribution/seed/seed-config.xsl saxon-config-uri=https + + + + + + + @@ -134,6 +141,48 @@ target/bin/xslt.sh -xsl:distribution/seed/seed-config.xsl saxon-config-uri=https + + + + + + + + + + media-type-package + + + + + media-type-package-version + + + + + media-type-component + + + + + media-type-processor + + + + + + + + diff --git a/distribution/seed/seed-config-chain.xspec b/distribution/seed/seed-config-chain.xspec index 8e46efc..91e241f 100644 --- a/distribution/seed/seed-config-chain.xspec +++ b/distribution/seed/seed-config-chain.xspec @@ -29,7 +29,15 @@ + + + diff --git a/distribution/seed/seed-config.xsl b/distribution/seed/seed-config.xsl index 57df946..4a4b964 100644 --- a/distribution/seed/seed-config.xsl +++ b/distribution/seed/seed-config.xsl @@ -120,6 +120,8 @@ target/bin/xslt.sh -xsl:distribution/seed/seed-config.xsl saxon-config-uri=https + + @@ -162,6 +164,12 @@ target/bin/xslt.sh -xsl:distribution/seed/seed-config.xsl saxon-config-uri=https + + + + + + From e93763c249960f81c588f369825c7ddd28c45e4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Fri, 22 May 2026 11:52:13 +0200 Subject: [PATCH 04/28] fixes typo --- xsl/document.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xsl/document.xsl b/xsl/document.xsl index 819b16c..7d5a50c 100644 --- a/xsl/document.xsl +++ b/xsl/document.xsl @@ -13,7 +13,7 @@ target/bin/xslt.sh \ -it \ resource=test/matt.xml -All the entpoints parameters are supported through stylesheet parameters. +All the endpoints parameters are supported through stylesheet parameters. Post-processing for returning another mediaType than application/tei+xml can be customized by the static parameters $media-type-*. It is turned of by default. Set to $media-type-package From fae955a1b57aef38d96c6cd5fc7ea770a3d6e0fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Thu, 4 Jun 2026 14:12:14 +0200 Subject: [PATCH 05/28] makes test more robust against changes in library --- distribution/seed/seed-config-chain.xspec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/distribution/seed/seed-config-chain.xspec b/distribution/seed/seed-config-chain.xspec index 91e241f..dc07d1c 100644 --- a/distribution/seed/seed-config-chain.xspec +++ b/distribution/seed/seed-config-chain.xspec @@ -23,9 +23,9 @@ as="xs:integer" select="1"/> - + Date: Thu, 4 Jun 2026 14:13:10 +0200 Subject: [PATCH 06/28] adds sample chaining to plain text output as test case --- distribution/seed/seed-config-chain.xspec | 27 +++++++ test/media-type/saxon.xml | 2 + test/media-type/tei2txt.xsl | 90 +++++++++++++++++++++++ 3 files changed, 119 insertions(+) create mode 100644 test/media-type/tei2txt.xsl diff --git a/distribution/seed/seed-config-chain.xspec b/distribution/seed/seed-config-chain.xspec index dc07d1c..17f0208 100644 --- a/distribution/seed/seed-config-chain.xspec +++ b/distribution/seed/seed-config-chain.xspec @@ -41,4 +41,31 @@ /> + + + + + + + + + + + + + + + + + diff --git a/test/media-type/saxon.xml b/test/media-type/saxon.xml index 7605a8d..7e935f4 100644 --- a/test/media-type/saxon.xml +++ b/test/media-type/saxon.xml @@ -6,6 +6,8 @@ + diff --git a/test/media-type/tei2txt.xsl b/test/media-type/tei2txt.xsl new file mode 100644 index 0000000..7fda2ff --- /dev/null +++ b/test/media-type/tei2txt.xsl @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dropping text in + + : ' + + ' + + + + From 14dccd1edb0a27723eab6986ad1064205aee5ced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Thu, 4 Jun 2026 16:36:34 +0200 Subject: [PATCH 07/28] uses saxon configuration file for testing --- distribution/seed/seed-config-chain.xspec | 8 ++++---- test/media-type/saxon.xml | 13 ------------- test/saxon.xml | 4 ++++ 3 files changed, 8 insertions(+), 17 deletions(-) delete mode 100644 test/media-type/saxon.xml diff --git a/distribution/seed/seed-config-chain.xspec b/distribution/seed/seed-config-chain.xspec index 17f0208..fad4ab8 100644 --- a/distribution/seed/seed-config-chain.xspec +++ b/distribution/seed/seed-config-chain.xspec @@ -5,10 +5,10 @@ xmlns:array="http://www.w3.org/2005/xpath-functions/array" stylesheet="seed-config-chain.xsl" run-as="external"> - + - + @@ -42,10 +42,10 @@ - + - + diff --git a/test/media-type/saxon.xml b/test/media-type/saxon.xml deleted file mode 100644 index 7e935f4..0000000 --- a/test/media-type/saxon.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - diff --git a/test/saxon.xml b/test/saxon.xml index 2f5767a..2287dc0 100644 --- a/test/saxon.xml +++ b/test/saxon.xml @@ -41,6 +41,10 @@ This configuration version="1.0.0" sourceLocation="post-proc-call.xsl"/> + + From b65e26c5cb3355ffa5fffb863b65300d3860b2d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Thu, 4 Jun 2026 17:31:29 +0200 Subject: [PATCH 08/28] adds tests for the plain SEED configuration --- build.xml | 7 ++++++ distribution/seed/seed-config.xspec | 37 +++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 distribution/seed/seed-config.xspec diff --git a/build.xml b/build.xml index 3626b8e..1026b31 100644 --- a/build.xml +++ b/build.xml @@ -28,6 +28,7 @@ + @@ -81,6 +82,12 @@ + + + + + + + + + dts + + + + + + + + + + + + + + + + From fae717251557f86f8510d88cf77f0a4c23033a33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Thu, 4 Jun 2026 18:09:51 +0200 Subject: [PATCH 09/28] adds test for chaining with dependencies in chained stylesheet --- distribution/seed/seed-config-chain.xspec | 43 +++++++++++++++++++++-- test/media-type/a.xsl | 12 +++++++ test/media-type/b.xsl | 8 +++++ test/saxon.xml | 2 ++ 4 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 test/media-type/a.xsl create mode 100644 test/media-type/b.xsl diff --git a/distribution/seed/seed-config-chain.xspec b/distribution/seed/seed-config-chain.xspec index fad4ab8..2b9a833 100644 --- a/distribution/seed/seed-config-chain.xspec +++ b/distribution/seed/seed-config-chain.xspec @@ -18,11 +18,11 @@ test=". => map:get($id-xsl-transformation-id) => map:get('location') => ends-with('document.xsl')"/> - + @@ -42,6 +42,40 @@ + + + + + + + + + + + + + + + + + + + + @@ -51,6 +85,9 @@ + diff --git a/test/media-type/a.xsl b/test/media-type/a.xsl new file mode 100644 index 0000000..65fb311 --- /dev/null +++ b/test/media-type/a.xsl @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/test/media-type/b.xsl b/test/media-type/b.xsl new file mode 100644 index 0000000..3ff2b66 --- /dev/null +++ b/test/media-type/b.xsl @@ -0,0 +1,8 @@ + + + + + + diff --git a/test/saxon.xml b/test/saxon.xml index 2287dc0..b0fed8e 100644 --- a/test/saxon.xml +++ b/test/saxon.xml @@ -45,6 +45,8 @@ This configuration sourceLocation="media-type/id.xsl"/> + + From a15f8f7ababd4e155811e46d3f51c048123a9d44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Thu, 4 Jun 2026 18:50:23 +0200 Subject: [PATCH 10/28] makes tests for SEED configuration generation pass again --- distribution/seed/seed-config.xsl | 37 ++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/distribution/seed/seed-config.xsl b/distribution/seed/seed-config.xsl index 4a4b964..565ef22 100644 --- a/distribution/seed/seed-config.xsl +++ b/distribution/seed/seed-config.xsl @@ -59,6 +59,8 @@ target/bin/xslt.sh -xsl:distribution/seed/seed-config.xsl saxon-config-uri=https } }"/> + + @@ -179,20 +181,29 @@ target/bin/xslt.sh -xsl:distribution/seed/seed-config.xsl saxon-config-uri=https - + + - - - - - - - - - - - + select="seed:configured-package(@name, @package-version, $saxon-config)"/> + + + + + + + + + + + + + + + package not found: + + + + From c6853c6bb9cbccc78f179fe5cdc46a6088f72881 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Thu, 4 Jun 2026 18:51:30 +0200 Subject: [PATCH 11/28] adds command line equivalent for debugging --- distribution/seed/seed-config-chain.xspec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/distribution/seed/seed-config-chain.xspec b/distribution/seed/seed-config-chain.xspec index 2b9a833..016cf72 100644 --- a/distribution/seed/seed-config-chain.xspec +++ b/distribution/seed/seed-config-chain.xspec @@ -7,6 +7,10 @@ + From 47e972fa47330868b13a66979c13cfe554684b70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Thu, 4 Jun 2026 18:56:49 +0200 Subject: [PATCH 12/28] removes debugging messages --- distribution/seed/seed-config-chain.xsl | 2 -- distribution/seed/seed-config.xsl | 3 --- 2 files changed, 5 deletions(-) diff --git a/distribution/seed/seed-config-chain.xsl b/distribution/seed/seed-config-chain.xsl index a51b027..9bdff2a 100644 --- a/distribution/seed/seed-config-chain.xsl +++ b/distribution/seed/seed-config-chain.xsl @@ -95,7 +95,6 @@ target/bin/xslt.sh -xsl:distribution/seed/seed-config.xsl saxon-config-uri=https - document-node in default mode @@ -112,7 +111,6 @@ target/bin/xslt.sh -xsl:distribution/seed/seed-config.xsl saxon-config-uri=https - NT seed:libraries overwrite diff --git a/distribution/seed/seed-config.xsl b/distribution/seed/seed-config.xsl index 565ef22..39da64a 100644 --- a/distribution/seed/seed-config.xsl +++ b/distribution/seed/seed-config.xsl @@ -80,7 +80,6 @@ target/bin/xslt.sh -xsl:distribution/seed/seed-config.xsl saxon-config-uri=https - document-node in default mode @@ -97,7 +96,6 @@ target/bin/xslt.sh -xsl:distribution/seed/seed-config.xsl saxon-config-uri=https - document-node in mode transformation @@ -147,7 +145,6 @@ target/bin/xslt.sh -xsl:distribution/seed/seed-config.xsl saxon-config-uri=https - NT seed:libraries From 10b6ddbdf3238a6390fcc7c20a45cc5f4ef6a5af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Thu, 4 Jun 2026 19:08:08 +0200 Subject: [PATCH 13/28] updates the documentation of SEED config generation --- distribution/seed/seed-config-chain.xsl | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/distribution/seed/seed-config-chain.xsl b/distribution/seed/seed-config-chain.xsl index 9bdff2a..de42355 100644 --- a/distribution/seed/seed-config-chain.xsl +++ b/distribution/seed/seed-config-chain.xsl @@ -1,21 +1,18 @@ - Date: Thu, 4 Jun 2026 22:21:30 +0200 Subject: [PATCH 14/28] merge SEED configurations in JSON format and include it into package --- distribution/seed/assembly.xml | 14 ++++++++++++ distribution/seed/merge.xsl | 39 ++++++++++++++++++++++++++++++++++ pom.xml | 27 ++++++++++++++++++++--- 3 files changed, 77 insertions(+), 3 deletions(-) create mode 100644 distribution/seed/merge.xsl diff --git a/distribution/seed/assembly.xml b/distribution/seed/assembly.xml index f2fe437..37a92a4 100644 --- a/distribution/seed/assembly.xml +++ b/distribution/seed/assembly.xml @@ -37,6 +37,13 @@ wiki/** + + ${project.build.directory}/generated-resources/xml/xslt + /${project.artifactId} + + **/*.seed.json + + target/dependencies @@ -85,4 +92,11 @@ + + + ${project.build.directory}/generated-resources/xml/xslt/pom.json + ${project.artifactId}.json + + + diff --git a/distribution/seed/merge.xsl b/distribution/seed/merge.xsl new file mode 100644 index 0000000..eeff083 --- /dev/null +++ b/distribution/seed/merge.xsl @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + collection URI: + + + + + + No JSON files + + + + + + + JSON files: + + + + + + diff --git a/pom.xml b/pom.xml index e6a9de1..1e5ee89 100644 --- a/pom.xml +++ b/pom.xml @@ -28,6 +28,7 @@ ${project.basedir}/distribution/seed/seed-config.xsl + ${project.basedir}/distribution/seed/merge.xsl ${project.basedir}/distribution/seed/sef-config.xsl @@ -402,7 +403,7 @@ - + + ${project.basedir} + + pom.xml + + + + json-collection + file:${project.build.directory}/generated-resources?select=*.seed.json;recurse=yes + + + ${seed-merge-xsl.url} @@ -500,7 +521,7 @@ ${project.build.directory}/generated-resources/xml/xslt false - **/*.json + **/*.seed.json @@ -520,7 +541,7 @@ ${project.build.directory}/generated-resources/xml/xslt false - **/*.json + **/*.seed.json From 89f71f639ad911c25dd350d57e742b60e0545656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Tue, 9 Jun 2026 09:56:26 +0200 Subject: [PATCH 15/28] adds named template and function as entry points for generating config --- distribution/seed/seed-config.xsl | 23 ++++++++++++++++++++-- distribution/seed/seed-config.xspec | 30 +++++++++++++++++++++++++++-- 2 files changed, 49 insertions(+), 4 deletions(-) diff --git a/distribution/seed/seed-config.xsl b/distribution/seed/seed-config.xsl index 39da64a..897fa0c 100644 --- a/distribution/seed/seed-config.xsl +++ b/distribution/seed/seed-config.xsl @@ -64,8 +64,8 @@ target/bin/xslt.sh -xsl:distribution/seed/seed-config.xsl saxon-config-uri=https - - + + @@ -79,6 +79,23 @@ target/bin/xslt.sh -xsl:distribution/seed/seed-config.xsl saxon-config-uri=https + + + + + + + + + + + + + + + + + + diff --git a/distribution/seed/seed-config.xspec b/distribution/seed/seed-config.xspec index 96cb799..cdc0403 100644 --- a/distribution/seed/seed-config.xspec +++ b/distribution/seed/seed-config.xspec @@ -1,9 +1,9 @@ + xmlns:seed="http://scdh.wwu.de/transform/seed#" run-as="external"> dts @@ -34,4 +34,30 @@ /> + + + + + + + + + + + + + + + + + + From 950ddf954f577860a71c35e1069681682dffe0bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Tue, 9 Jun 2026 12:51:17 +0200 Subject: [PATCH 16/28] XSLT for making chained configs from JSON configs --- distribution/seed/chain.xsl | 72 +++++++++++++++++++++++++++++++++++ distribution/seed/chain.xspec | 48 +++++++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 distribution/seed/chain.xsl create mode 100644 distribution/seed/chain.xspec diff --git a/distribution/seed/chain.xsl b/distribution/seed/chain.xsl new file mode 100644 index 0000000..3a6072f --- /dev/null +++ b/distribution/seed/chain.xsl @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/distribution/seed/chain.xspec b/distribution/seed/chain.xspec new file mode 100644 index 0000000..17f8b1e --- /dev/null +++ b/distribution/seed/chain.xspec @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 298a5e31b84ba631405a2e7b90000983ca8585aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Tue, 9 Jun 2026 22:44:17 +0200 Subject: [PATCH 17/28] refactoring to prepare merging of document and chained XSLT --- build.xml | 7 +++++ distribution/seed/chain.xsl | 57 ++++++++++++++++++++++++++--------- distribution/seed/chain.xspec | 4 +-- 3 files changed, 52 insertions(+), 16 deletions(-) diff --git a/build.xml b/build.xml index 1026b31..bca8976 100644 --- a/build.xml +++ b/build.xml @@ -30,6 +30,7 @@ + @@ -88,6 +89,12 @@ + + + + + + - - + + - + + + + + + + + + + + @@ -41,19 +58,31 @@ target/bin/xslt.sh \ + + - + + + + + + + + + + + + + + + - - + - - + + From 415fd73e96a53fa4f02f2c4dbd24a15291200f1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Tue, 9 Jun 2026 23:05:25 +0200 Subject: [PATCH 18/28] adds regression test for merging SEED JSON configurations --- build.xml | 7 +++++++ distribution/seed/merge.xsl | 23 +++++++++++++++++++++-- distribution/seed/merge.xspec | 17 +++++++++++++++++ 3 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 distribution/seed/merge.xspec diff --git a/build.xml b/build.xml index bca8976..ba30e47 100644 --- a/build.xml +++ b/build.xml @@ -30,6 +30,7 @@ + @@ -89,6 +90,12 @@ + + + + + + diff --git a/distribution/seed/merge.xsl b/distribution/seed/merge.xsl index eeff083..3c4b312 100644 --- a/distribution/seed/merge.xsl +++ b/distribution/seed/merge.xsl @@ -1,4 +1,13 @@ + + + - - + + @@ -36,4 +47,12 @@ + + + JSON files: + + + + + diff --git a/distribution/seed/merge.xspec b/distribution/seed/merge.xspec new file mode 100644 index 0000000..8914fd0 --- /dev/null +++ b/distribution/seed/merge.xspec @@ -0,0 +1,17 @@ + + + + + + + + + + + From 5a20212383e42b5365d12f084f931394011ff92e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Tue, 9 Jun 2026 23:10:31 +0200 Subject: [PATCH 19/28] generate configuration for the chained testing XSLT --- pom.xml | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 1e5ee89..7493a04 100644 --- a/pom.xml +++ b/pom.xml @@ -479,7 +479,7 @@ json-collection - file:${project.build.directory}/generated-resources?select=*.seed.json;recurse=yes + file:${project.build.directory}/generated-resources/xml/xslt/xsl?select=*.seed.json;recurse=yes ${seed-merge-xsl.url} @@ -490,6 +490,32 @@ + + + ${project.basedir} + + + test/media-type/tei2txt.xsl + + + + saxon-config-uri + ${project.basedir}/test/saxon.xml + + + id-prefix + chained + + + ${seed-config-xsl.url} + + + .seed.json + + + @@ -518,7 +544,7 @@ - ${project.build.directory}/generated-resources/xml/xslt + ${project.build.directory}/generated-resources/xml/xslt/xsl false **/*.seed.json @@ -538,7 +564,7 @@ - ${project.build.directory}/generated-resources/xml/xslt + ${project.build.directory}/generated-resources/xml/xslt/xsl false **/*.seed.json From 8ffaee390674a7b46d5be4385ae622ef1ff91b16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Tue, 9 Jun 2026 23:12:19 +0200 Subject: [PATCH 20/28] adds a regression test for the testing chaining with tei2txt.xsl --- build.xml | 6 ++++++ test/media-type/tei2txt.xsl | 27 +++++++++++++++------------ test/media-type/tei2txt.xspec | 22 ++++++++++++++++++++++ 3 files changed, 43 insertions(+), 12 deletions(-) create mode 100644 test/media-type/tei2txt.xspec diff --git a/build.xml b/build.xml index ba30e47..dfd95c7 100644 --- a/build.xml +++ b/build.xml @@ -82,6 +82,12 @@ + + + + + + diff --git a/test/media-type/tei2txt.xsl b/test/media-type/tei2txt.xsl index 7fda2ff..fdfd8e0 100644 --- a/test/media-type/tei2txt.xsl +++ b/test/media-type/tei2txt.xsl @@ -5,26 +5,27 @@ - + - + - + - + + CHAINED PROC - + - + - + @@ -33,21 +34,23 @@ - + - + - + - + - + diff --git a/test/media-type/tei2txt.xspec b/test/media-type/tei2txt.xspec new file mode 100644 index 0000000..0e36793 --- /dev/null +++ b/test/media-type/tei2txt.xspec @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + From d6d28c59d0a669f28382691520d181b032d9e63c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Tue, 9 Jun 2026 23:41:41 +0200 Subject: [PATCH 21/28] assembles a chained XSLT for testing on SEED --- distribution/seed/test-assembly.xml | 61 +++++++++++++++++++++++++++++ pom.xml | 15 +++++++ 2 files changed, 76 insertions(+) create mode 100644 distribution/seed/test-assembly.xml diff --git a/distribution/seed/test-assembly.xml b/distribution/seed/test-assembly.xml new file mode 100644 index 0000000..71c724a --- /dev/null +++ b/distribution/seed/test-assembly.xml @@ -0,0 +1,61 @@ + + + seed-tests + true + + + + tar.gz + + + + + ${project.basedir}/test + /${project.artifactId}-test + + **/tei2txt.xsl + + + post-proc-* + specs/** + **/xspec/**.xsl + distribution/** + scripts/** + doc/** + test/** + utils/** + target/** + frameworks/** + cases/** + dist/** + wiki/** + + + + ${project.build.directory}/generated-resources/xml/xslt/test + /${project.artifactId}-test + + **/*.seed.json + + + + ${project.basedir}/test + /${project.artifactId}-test + + saxon.xml + saxon-no-local.xml + + + + + + + + ${project.build.directory}/generated-resources/xml/xslt/pom.json + ${project.artifactId}-test.json + + + + diff --git a/pom.xml b/pom.xml index 7493a04..547f0b6 100644 --- a/pom.xml +++ b/pom.xml @@ -736,6 +736,21 @@ + + + seed-test + package + + single + + + ${project.artifactId}-${project.version} + ${project.basedir} + + distribution/seed/test-assembly.xml + + + From d4505a1d7830b5b2429c6f4b0151746e3dea6f2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Tue, 9 Jun 2026 23:42:35 +0200 Subject: [PATCH 22/28] exclude testing material --- distribution/seed/assembly.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/distribution/seed/assembly.xml b/distribution/seed/assembly.xml index 37a92a4..07a4883 100644 --- a/distribution/seed/assembly.xml +++ b/distribution/seed/assembly.xml @@ -43,6 +43,9 @@ **/*.seed.json + + test/** + @@ -66,6 +69,9 @@ saxon.*.xml + + test/** + distribution/seed From cd628bb84173c5f3389be70b4d245212eb94264c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Wed, 10 Jun 2026 16:58:57 +0200 Subject: [PATCH 23/28] adds a parameter that for testing purpose only --- test/media-type/tei2txt.xsl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/media-type/tei2txt.xsl b/test/media-type/tei2txt.xsl index fdfd8e0..7a4721c 100644 --- a/test/media-type/tei2txt.xsl +++ b/test/media-type/tei2txt.xsl @@ -11,6 +11,8 @@ + + CHAINED PROC From f834f25ab8265d5167f44c1d9e32e55a160c938a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Wed, 10 Jun 2026 17:00:05 +0200 Subject: [PATCH 24/28] makes chain.xsl work and pass tests --- distribution/seed/chain.xsl | 39 +++++++++++++++-- distribution/seed/chain.xspec | 79 +++++++++++++++++++++++++++++++++++ 2 files changed, 114 insertions(+), 4 deletions(-) diff --git a/distribution/seed/chain.xsl b/distribution/seed/chain.xsl index 3503d34..6171e17 100644 --- a/distribution/seed/chain.xsl +++ b/distribution/seed/chain.xsl @@ -49,22 +49,53 @@ target/bin/xslt.sh \ + + + media-type-package + + xs:string? + + + media-type-package-version + + xs:string + + + media-type-component + + xs:string + + + media-type-processor + + xs:string + + - + - + + + + - + + map:put('libraries', array:join((map:get($document-bare-config, 'libraries'), seed:as-library($chained-config) => map:get('libraries')))) => + map:put('parameterDescriptors', map:merge((map:get($document-bare-config, 'parameterDescriptors'), seed:as-library($chained-config) => map:get('parameterDescriptors')))) => + map:put('compileTimeParameters', array {$media-type-parameters}) => + map:put('description', concat(seed:transformation-id($chained-config), ' chained to ', seed:transformation-id($document-config), ': ', map:get($chained-bare-config, 'description')))" /> diff --git a/distribution/seed/chain.xspec b/distribution/seed/chain.xspec index aacfa9c..e1741ee 100644 --- a/distribution/seed/chain.xspec +++ b/distribution/seed/chain.xspec @@ -11,6 +11,27 @@ + + + + + + + + + + + + + + @@ -42,7 +63,65 @@ /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 896cea5dafa1779bc634a3e000e29ad7cedcdb47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Wed, 10 Jun 2026 18:02:53 +0200 Subject: [PATCH 25/28] make a package of testing resources for deployment on SEED --- distribution/seed/test-assembly.xml | 14 +++---- pom.xml | 64 ++++++++++++++++++++++++++++- 2 files changed, 70 insertions(+), 8 deletions(-) diff --git a/distribution/seed/test-assembly.xml b/distribution/seed/test-assembly.xml index 71c724a..a0bbede 100644 --- a/distribution/seed/test-assembly.xml +++ b/distribution/seed/test-assembly.xml @@ -2,7 +2,7 @@ - seed-tests + seed-testing true @@ -13,7 +13,7 @@ ${project.basedir}/test - /${project.artifactId}-test + /${project.artifactId}-testing **/tei2txt.xsl @@ -35,13 +35,14 @@ ${project.build.directory}/generated-resources/xml/xslt/test - /${project.artifactId}-test + /${project.artifactId}-testing **/*.seed.json + **/*.chain.json - ${project.basedir}/test + ${project.basedir}/testing /${project.artifactId}-test saxon.xml @@ -52,9 +53,8 @@ - - ${project.build.directory}/generated-resources/xml/xslt/pom.json - ${project.artifactId}-test.json + ${project.build.directory}/generated-resources/xml/xslt/build.json + ${project.artifactId}-testing.json diff --git a/pom.xml b/pom.xml index 547f0b6..337ea42 100644 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,9 @@ ${project.basedir}/distribution/seed/seed-config.xsl ${project.basedir}/distribution/seed/merge.xsl + ${project.basedir}/distribution/seed/chain.xsl ${project.basedir}/distribution/seed/sef-config.xsl + ${project.build.directory}/generated-resources/xml/xslt @@ -505,10 +507,50 @@ id-prefix - chained + ${project.artifactId}-testing ${seed-config-xsl.url} + + + .chain.json + + + + + + ${project.basedir} + + test/media-type/tei2txt.xsl + + + + document-config-uri + ${seed-json-config.dir}/xsl/document.seed.json + + + chained-config-uri + ${seed-json-config.dir}/test/media-type/tei2txt.chain.json + + + media-type-package + http://example.com/xsl/tei2txt + + + media-type-package-version + 1.0.0 + + + media-type-component + mode + + + media-type-processor + tei + + + ${seed-chain-xsl.url} @@ -516,6 +558,26 @@ + + + ${project.basedir} + + build.xml + + + + json-collection + file:${project.build.directory}/generated-resources/xml/xslt?select=*.seed.json;recurse=yes + + + ${seed-merge-xsl.url} + + + .json + + + From 940981213404c10abc9065316ed12472e6a99353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Wed, 10 Jun 2026 18:24:47 +0200 Subject: [PATCH 26/28] make YAML config for SEED from merged JSON configurations --- distribution/seed/assembly.xml | 12 +++---- distribution/seed/test-assembly.xml | 4 +++ pom.xml | 51 ++--------------------------- 3 files changed, 11 insertions(+), 56 deletions(-) diff --git a/distribution/seed/assembly.xml b/distribution/seed/assembly.xml index 07a4883..502f8dd 100644 --- a/distribution/seed/assembly.xml +++ b/distribution/seed/assembly.xml @@ -88,14 +88,6 @@ ${project.artifactId}.yaml - - - ${project.basedir} - / - - ${project.artifactId}.yaml - - @@ -103,6 +95,10 @@ ${project.build.directory}/generated-resources/xml/xslt/pom.json ${project.artifactId}.json + + ${project.build.directory}/generated-resources/yml/pom.yml + ${project.artifactId}.yaml + diff --git a/distribution/seed/test-assembly.xml b/distribution/seed/test-assembly.xml index a0bbede..197a840 100644 --- a/distribution/seed/test-assembly.xml +++ b/distribution/seed/test-assembly.xml @@ -56,6 +56,10 @@ ${project.build.directory}/generated-resources/xml/xslt/build.json ${project.artifactId}-testing.json + + ${project.build.directory}/generated-resources/yml/build.yml + ${project.artifactId}-testing.yaml + diff --git a/pom.xml b/pom.xml index 337ea42..c39e4a5 100644 --- a/pom.xml +++ b/pom.xml @@ -606,30 +606,11 @@ - ${project.build.directory}/generated-resources/xml/xslt/xsl + ${project.build.directory}/generated-resources/xml/xslt false - **/*.seed.json - - - - yml - ${project.build.directory}/generated-resources/yml - - - - seed-config-yaml-2-yaml - generate-resources - - json-2-yaml - - - - - ${project.build.directory}/generated-resources/xml/xslt/xsl - false - - **/*.seed.json + pom.json + build.json @@ -720,32 +701,6 @@ - - - concat-seed-xml-transformer-configurations - generate-resources - - run - - - - - - - - - - - - - - - - - From 509acacfcc923dd794bdcb6628d607df95f3e430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Wed, 10 Jun 2026 18:32:48 +0200 Subject: [PATCH 27/28] reflects recent change of names of build artifacts --- distribution/seed/chain.xspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribution/seed/chain.xspec b/distribution/seed/chain.xspec index e1741ee..3cc085e 100644 --- a/distribution/seed/chain.xspec +++ b/distribution/seed/chain.xspec @@ -17,7 +17,7 @@ + select="resolve-uri('test/media-type/tei2txt.chain.json', $config-base-uri)"/> From c48ab48404df7af597dc474b9619daf928783466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Wed, 10 Jun 2026 18:49:48 +0200 Subject: [PATCH 28/28] report changes in 0.4.11 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53708cb..cc55b93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changes +## 0.4.11 + +- adds utilities for generating SEED config for chained transformations (fixes issue #20) +- adds a testing package for SEED with chained transformation + ## 0.4.10 - adds saxon config for SEED with assertions enabled (fixes issue #18)