diff options
author | Bruno Victal <mirai@makinata.eu> | 2023-10-09 21:05:56 +0100 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-10-10 21:10:55 -0400 |
commit | 7c31a02ecdd2733d905dd684e6369f066932bbf5 (patch) | |
tree | d2d6f33f673825689e32d95aa123a6d91e842399 /gnu | |
parent | 143d6b3890c4503afc3a5dbd1c10f30f27be71a6 (diff) |
gnu: docbook-xsl: Add compatibility entry.
Remap "http://docbook.sourceforge.net/release/xsl-ns/" to
"http://docbook.sourceforge.net/release/xsl/".
* gnu/packages/docbook.scm (docbook-xsl)[arguments]<#:phases>: Add
compatibility entry.
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/docbook.scm | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index a9f4c67198..973cadca18 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -388,7 +388,46 @@ downloading from @var{source}, where @var{version} is a string and "http://docbook.sourceforge.net/release/xsl/current/" store-uri catalog)) - (list "rewriteSystem" "rewriteURI"))) + (list "rewriteSystem" "rewriteURI")) + + ;; Originally the + ;; "http://docbook.sourceforge.net/release/xsl/" + ;; URI referred to the non-namespaced docbook-xsl, + ;; with its namespaced version using a URI differing in + ;; the path component as '…/xsl-ns/'. + ;; At some point the namespaced version was made the + ;; canonical docbook-xsl package whilst preserving the + ;; original URI. + ;; + ;; For compatibility with XML files that still specify + ;; the legacy namespaced docbook-xsl URIs we re-add them + ;; here. + (for-each + (lambda (type) + ;; Remap /xsl-ns/ to /xsl/. + ;; Note: URI resolutions are not recursive. + ;; A rewrite rule from: + ;; 'http://docbook.sourceforge.net/release/xsl-ns/' + ;; to + ;; 'http://docbook.sourceforge.net/release/xsl/' + ;; will not trigger the rewrite rule that ultimately + ;; remaps to a /gnu/store URI, as can be seen by + ;; invoking: + ;; $ xmlcatalog "" \ + ;; 'http://docbook.sourceforge.net/release/xsl-ns/current/' + ;; http://docbook.sourceforge.net/release/xsl/current/ + ;; $ xmlcatalog "" \ + ;; 'http://docbook.sourceforge.net/release/xsl/current/' + ;; file://gnu/store/…/xml/xsl/… + ;; + ;; See XML Catalog specification, item 7.2.2. for + ;; details. + (invoke xmlcatalog "--noout" + "--add" type + "http://docbook.sourceforge.net/release/xsl-ns/current/" + store-uri + catalog)) + (list "rewriteSystem" "rewriteURI"))) catalog-files)))) (replace 'install (lambda _ |