From 9d0d05889be3cd717887021fcb54aac158df40ce Mon Sep 17 00:00:00 2001 From: Jarno Elovirta Date: Fri, 2 Feb 2024 10:19:33 +0200 Subject: [PATCH 1/5] Use preprocess2 Signed-off-by: Jarno Elovirta --- build.xml | 2 +- xsl/normalize.xsl | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build.xml b/build.xml index 539f898..4524297 100644 --- a/build.xml +++ b/build.xml @@ -10,7 +10,7 @@ See the accompanying LICENSE file for applicable license. + preprocess2"> diff --git a/xsl/normalize.xsl b/xsl/normalize.xsl index c316f6e..7fcdb32 100644 --- a/xsl/normalize.xsl +++ b/xsl/normalize.xsl @@ -38,7 +38,8 @@ See the accompanying LICENSE file for applicable license. - + From 20d11499a2275803a6124b7fbdfb78a6a187d0ba Mon Sep 17 00:00:00 2001 From: Jarno Elovirta Date: Fri, 2 Feb 2024 10:27:48 +0200 Subject: [PATCH 2/5] Use pipeline XSLT Signed-off-by: Jarno Elovirta --- build.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.xml b/build.xml index 4524297..c703083 100644 --- a/build.xml +++ b/build.xml @@ -40,7 +40,7 @@ See the accompanying LICENSE file for applicable license. - + @@ -49,7 +49,7 @@ See the accompanying LICENSE file for applicable license. - + From 05cc139de5522a553735477f873c3d87a489104c Mon Sep 17 00:00:00 2001 From: Jarno Elovirta Date: Fri, 2 Feb 2024 10:28:04 +0200 Subject: [PATCH 3/5] Add logging level PI to messages Signed-off-by: Jarno Elovirta --- xsl/normalize.xsl | 131 ++++++++++++++++++++++++---------------------- 1 file changed, 67 insertions(+), 64 deletions(-) diff --git a/xsl/normalize.xsl b/xsl/normalize.xsl index 7fcdb32..da932d3 100644 --- a/xsl/normalize.xsl +++ b/xsl/normalize.xsl @@ -7,39 +7,39 @@ Copyright 2015 Jarno Elovirta See the accompanying LICENSE file for applicable license. --> - + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/" + xmlns:dita-ot="http://dita-ot.sourceforge.net/ns/201007/dita-ot" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + exclude-result-prefixes="xs ditaarch dita-ot xsi" + version="2.0"> + - + - + - + - + - + + or (@format = 'ditamap' and (@input, @inputResource) = 'true')]"> @@ -65,24 +65,27 @@ See the accompanying LICENSE file for applicable license. + if (position() eq 1) + then '.$1' + else concat('-', position() - 1, '.$1'))"/> - + - + - + - + + + + @@ -94,8 +97,8 @@ See the accompanying LICENSE file for applicable license. + doctype-public="{dita-ot:get-doctype-public(.)}" + doctype-system="{dita-ot:get-doctype-system(.)}"> @@ -105,7 +108,7 @@ See the accompanying LICENSE file for applicable license. - + @@ -126,7 +129,7 @@ See the accompanying LICENSE file for applicable license. - + @@ -139,27 +142,27 @@ See the accompanying LICENSE file for applicable license. - + - + priority="10"/> + - + processing-instruction('workdir-uri') | + processing-instruction('path2project') | + processing-instruction('path2project-uri') | + processing-instruction('path2rootmap-uri') | + processing-instruction('ditaot') | + processing-instruction('doctype-public') | + processing-instruction('doctype-system') | + @dita-ot:* | + @mapclass" + priority="10"/> + - + - + - + [exists(@keys) and @processing-role = 'resource-only'] + [$normalize-strip-keyref = 'true']"/> + - + @keys[$normalize-strip-keyref = 'true']"/> + - + [$normalize-strip-branch-filter = 'true']"/> + + contains(@class, ' topic/link ') or + (contains(@class, ' topic/keyword') and exists(@href)) or + contains(@class, ' map/topicref ')] + [empty(@format) or @format = 'dita'] + [empty(@scope) or @scope = 'local']/@href"> @@ -197,8 +200,8 @@ See the accompanying LICENSE file for applicable license. @@ -206,7 +209,7 @@ See the accompanying LICENSE file for applicable license. - + @@ -215,32 +218,32 @@ See the accompanying LICENSE file for applicable license. - + - + @scope[. = 'local'] | + @format[. = 'dita'] | + *[contains(@class, ' topic/xref ')]/@locktitle"/> + - + - + - + - + From a84292b34342f1aacd359cae6b3790590671bd90 Mon Sep 17 00:00:00 2001 From: Jarno Elovirta Date: Fri, 2 Feb 2024 10:28:37 +0200 Subject: [PATCH 4/5] Update version number Signed-off-by: Jarno Elovirta --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 152c2b5..74dc09a 100644 --- a/plugin.xml +++ b/plugin.xml @@ -6,7 +6,7 @@ Copyright 2015 Jarno Elovirta See the accompanying LICENSE file for applicable license. --> - + yes From 5d822d3c4c7cac7f1ad957b5ac3352cb149c5b2a Mon Sep 17 00:00:00 2001 From: Jarno Elovirta Date: Fri, 2 Feb 2024 10:49:46 +0200 Subject: [PATCH 5/5] Remove reltables Links from reltables are pushed to topics and thus duplicated information. Signed-off-by: Jarno Elovirta --- xsl/normalize.xsl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xsl/normalize.xsl b/xsl/normalize.xsl index da932d3..656b9db 100644 --- a/xsl/normalize.xsl +++ b/xsl/normalize.xsl @@ -233,6 +233,9 @@ See the accompanying LICENSE file for applicable license. + + +