Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#55946 closed defect (duplicate)

docbook-xsl installs namespace-aware templates (it should be non-namespace aware?)

Reported by: macdice (Thomas Munro) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: docbook-xsl

Description (last modified by mf2k (Frank Schima))

Hello,

I am trying to use non-namespace DocBook to build the PostgreSQL documentation, but I suspect there may be a packaging bug in docbook-xsl. I see two ports:

docbook-xsl @1.79.2_1 (textproc)
    The docbook xsl stylesheets

docbook-xsl-ns @1.76.1_1 (textproc)
    DocBook XSL NS (namespaced) Stylesheets

This appears to be like the way DocBook XSL is packaged in other distributions: a version without namespaces and a version with namespaces. For example, Debian and FreeBSD also have packages called docbook-xsl and docbook-xsl-ns. However, in the MacPorts docbook-xsl port I see that namespaces *are* used. For example /opt/local/share/xsl/docbook-xsl/common/labels.xsl I see templates with namespace-prefixed match attributes like these:

  <xsl:template match="d:chapter" mode="label.markup">
  <xsl:template match="d:appendix" mode="label.markup">

On a Debian or FreeBSD system, labels.xsl has those particular lines as:

  <xsl:template match="chapter" mode="label.markup">
  <xsl:template match="appendix" mode="label.markup">

On those other systems, the docbook-xsl-ns package installs a version with those d: prefixes under a separate docbook-ns directory.

I think the MacPorts package may be accidentally installing a namespace-aware version in docbook-xsl. I have no idea how to fix that or if my attempt at an analysis is correct, because I know next to nothing about DocBook or XSL.

For what it is worth, here is the thread on the PostgreSQL documentation mailing list, where we've been trying to work out how to get our documentation to build with a MacPorts installed DocBooks installation, which might make matters clearer:

https://www.postgresql.org/message-id/flat/CAEepm%3D2HZ%2BLkTSMtihu61wd63vpLwYE-cE41syf%3D1FHsO6gybg%40mail.gmail.com

Change History (4)

comment:1 Changed 7 years ago by mf2k (Frank Schima)

In the future, please use WikiFormatting.

comment:2 Changed 7 years ago by mf2k (Frank Schima)

Description: modified (diff)

comment:3 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: duplicate
Status: newclosed

You're correct. Resolved in #56354.

comment:4 Changed 7 years ago by raimue (Rainer Müller)

In f79b00ec032b29752b998f99790df8d9f1e8f950/macports-guide (master):

Makefile: Switch to docbook-xsl-ns for DocBook 5.0

With the switch to DocBook 5.0, the DocBook XSL stylesheets should have
been switched to the namespaced variant [1]. However, at that time, the
docbook-xsl port already provided the namespaced version due to
a mistake [2]. While namespace stripping seems to work, explicitly
switch to docbook-xsl-ns now.

[1] https://docbook.org/docs/howto/howto.html#processing
[2] #55946

Note: See TracTickets for help on using tickets.