From 52ce55e6c981968a4083615d91aaf145420709bb Mon Sep 17 00:00:00 2001 From: Tom Schraitle Date: Mon, 1 Jul 2024 14:52:03 +0200 Subject: [PATCH] Add customization layer for assemble.xsl (#733) * Allow to preserve or discard xml:base attributes (XSLT parameter preserve-xmlbase: 1 = preserve xml:base, 0 = discard them) This addition was needed to avoid wrong image paths as the xml:base attribute is taken into account to construct the path. --------- Co-authored-by: Frank Sundermeyer --- daps-xslt/assembly/assemble.xsl | 420 ++++++++++++++++++++++++++++++++ make/assembly2db.mk | 5 +- 2 files changed, 423 insertions(+), 2 deletions(-) create mode 100644 daps-xslt/assembly/assemble.xsl diff --git a/daps-xslt/assembly/assemble.xsl b/daps-xslt/assembly/assemble.xsl new file mode 100644 index 000000000..fe6f1d13a --- /dev/null +++ b/daps-xslt/assembly/assemble.xsl @@ -0,0 +1,420 @@ + + + + + + + +5.2 + + + + + + + + + + + + + + + + + + + + + + + + ERROR: no xml:id matches @resourceref = ' + + '. + + + + + ERROR: xml:id matching @resourceref = ' + + is not a resource element'. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ERROR: resource with @xml:id=' + + ' does not resolve to a filename. + + + + + + + + + + + + + + + + + + ERROR: @href = ' + + ' has no content or is unresolved. + + + + + + + + + + + + + + omittitles + + + + + + contentonly + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ERROR: no xml:id matches @resourceref = ' + + '. + + + + + ERROR: xml:id matching @resourceref = ' + + is not a resource element'. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/make/assembly2db.mk b/make/assembly2db.mk index 5f4a2fd6c..539a30888 100644 --- a/make/assembly2db.mk +++ b/make/assembly2db.mk @@ -12,9 +12,10 @@ include $(DAPSROOT)/make/common_variables.mk # Stylesheets and Settings +# Prefer the one shipped with DAPS # Can be overwritten in DC files or in shell -STYLEASSEMBLY ?= $(firstword $(wildcard $(addsuffix \ - /assembly/assemble.xsl, $(STYLE_ROOTDIRS)))) +STYLEASSEMBLY ?= $(firstword $(wildcard $(DAPSROOT)/daps-xslt/assembly/assemble.xsl $(addsuffix \ + /assembly/assemble.xsl, $(STYLE_ROOTDIRS)))) # Error out if no assembly stylesheet can be found ifeq "$(strip $(STYLEASSEMBLY))" ""