From 79e5599d7f9489899976c1b283985ead6702014f Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Sun, 9 May 2021 17:37:33 +0100 Subject: [PATCH] Fix #97 by making sure CALS table row and entry xml:ids become id attributes --- build.gradle | 4 +- src/main/xslt/modules/attributes.xsl | 8 ++++ src/main/xslt/modules/tablecals.xsl | 8 ++++ .../resources/expected/table-cals.050.html | 1 + src/test/resources/xml/table-cals.050.xml | 39 +++++++++++++++++++ src/test/xspec/tablecals.xspec | 5 +++ 6 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 src/test/resources/expected/table-cals.050.html create mode 100644 src/test/resources/xml/table-cals.050.xml diff --git a/build.gradle b/build.gradle index 2c31866b1..09cfc6201 100644 --- a/build.gradle +++ b/build.gradle @@ -746,8 +746,6 @@ fileTree(dir: "${projectDir}/src/test/resources/xml", include: "*.xml").each { x stylesheetParams['mediaobject-output-base-uri'] = "media/" stylesheetParams['dynamic-profiles'] = true - //println("Task ${base}.expected: ${stylesheetParams}") - input xml stylesheet "${buildDir}/xslt/xspec-driver.xsl" output "${projectDir}/src/test/resources/expected/${base}.html" @@ -1702,7 +1700,7 @@ publishing { task helloWorld() { doLast { println('Hello, world: ' + xslTNGversion) - project.objects.fileCollection().each { path -> + configurations.validateRuntime.each { path -> println("CP: ${path}") } diff --git a/src/main/xslt/modules/attributes.xsl b/src/main/xslt/modules/attributes.xsl index aaf2dc3e5..7d98e0584 100644 --- a/src/main/xslt/modules/attributes.xsl +++ b/src/main/xslt/modules/attributes.xsl @@ -182,6 +182,14 @@ (local-name(.), $pgwide, $landscape, $style), ())"/> + + + + + + + diff --git a/src/main/xslt/modules/tablecals.xsl b/src/main/xslt/modules/tablecals.xsl index 681efc1dd..5d6f3a917 100644 --- a/src/main/xslt/modules/tablecals.xsl +++ b/src/main/xslt/modules/tablecals.xsl @@ -94,6 +94,7 @@ + @@ -292,6 +293,13 @@ + + + + diff --git a/src/test/resources/expected/table-cals.050.html b/src/test/resources/expected/table-cals.050.html new file mode 100644 index 000000000..425ddd948 --- /dev/null +++ b/src/test/resources/expected/table-cals.050.html @@ -0,0 +1 @@ +CALS table with IDs

CALS table with IDs

Tests that IDs appear on the resulting HTML table.

LeftMiddleRight
LeftRight
·
·
\ No newline at end of file diff --git a/src/test/resources/xml/table-cals.050.xml b/src/test/resources/xml/table-cals.050.xml new file mode 100644 index 000000000..720f7635f --- /dev/null +++ b/src/test/resources/xml/table-cals.050.xml @@ -0,0 +1,39 @@ + +
+CALS table with IDs +Tests that IDs appear on the resulting HTML table. + + + + + + + + + Left + Middle + Right + + + + + Left + Right + + + + + + · + + + + + · + + + + + + +
diff --git a/src/test/xspec/tablecals.xspec b/src/test/xspec/tablecals.xspec index 2067227c8..a3664f0fa 100644 --- a/src/test/xspec/tablecals.xspec +++ b/src/test/xspec/tablecals.xspec @@ -373,4 +373,9 @@ + + + + +