diff options
author | Bruno Victal <mirai@makinata.eu> | 2023-03-11 17:54:12 +0000 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-04-21 00:44:00 -0400 |
commit | e9ba6d2c47bacae433be1a6c629d4d307206245a (patch) | |
tree | 1c90ec8da1a8fb7249b86fd284fbb1178d37abdf /gnu/packages/aux-files | |
parent | a29754b4f152db15b8a7622d7319cfee62f8d7d8 (diff) | |
download | guix-e9ba6d2c47bacae433be1a6c629d4d307206245a.tar.gz |
gnu: docbook-xml: Use XSLT to patch catalog.xml.
(sxml transforms) are unsuited here due to guile-bug #20339. * gnu/packages/aux-files/xml/patch-catalog-xml.xsl: New file. * Makefile.am: Register it. * gnu/packages/docbook.scm (docbook-xml-5)[native-inputs]: Add libxslt. [arguments]: Add phase to patch catalog.xml using XSLT. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Diffstat (limited to 'gnu/packages/aux-files')
-rw-r--r-- | gnu/packages/aux-files/xml/patch-catalog-xml.xsl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gnu/packages/aux-files/xml/patch-catalog-xml.xsl b/gnu/packages/aux-files/xml/patch-catalog-xml.xsl new file mode 100644 index 0000000000..947517476d --- /dev/null +++ b/gnu/packages/aux-files/xml/patch-catalog-xml.xsl @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +SPDX-FileCopyrightText: 2023 Bruno Victal <mirai@makinata.eu> +SPDX-License-Identifier: ISC + +Fix uri attributes to point to paths in the store. +--> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + <xsl:output method="xml"/> + <xsl:param name="prefix">/</xsl:param> + <!-- begin identity transform --> + <xsl:template match="@*|node()"> + <xsl:copy> + <xsl:apply-templates select="@*|node()"/> + </xsl:copy> + </xsl:template> + <!-- end identity transform --> + + <xsl:template match="@uri"> + <xsl:attribute name="uri"> + <xsl:value-of select="concat('file://', $prefix, '/', .)"/> + </xsl:attribute> + </xsl:template> +</xsl:stylesheet> |