discuss: supporting our xsl(-ns) customization layers; permanent URI(?)
Subject:
supporting our xsl(-ns) customization layers; permanent URI(?)
From:
"Martin A. Brown" ####@####.####
Date:
20 May 2016 17:40:01 +0100
Message-Id: <alpine.LSU.2.11.1605100747250.29512@znpeba.jbaqresebt.arg>
Hello there all,
Short version:
==============
I would like to request a permanent URI for our docbook XSL
customization layers for use with XML catalogs. I suggest a scheme
like this:
http://tldp.org/docbook/stylesheets/current/ -> 0.3
http://tldp.org/docbook/stylesheets/0.1/
http://tldp.org/docbook/stylesheets/0.2/
http://tldp.org/docbook/stylesheets/0.3/
Briefly, can I claim the URL http://tldp.org/docbook/stylesheets/
for our XSL (and XSL-NS) customization layers?
Longer version
==============
Goal
----
I would like to include local XML catalog support for our XSL
stylesheets. With catalog support, anybody could use our
stylesheets whether connected to the network or not.
Types of stylesheets
--------------------
Our Docbook XML 4.x customization layers would be found under the
xsl/ directory.
Our Docbook XML 5.x customization layers would be found under the
xsl-ns/ directory.
This layout parallels the layout used by the upstream project.
File layout
-----------
The name 'current' would be a symlink to the latest released version
(exactly as Norm Walsh and Bob Stayton do for the xsl and xsl-ns
stylesheets). Underneath that directory would be a tree that would
look like this:
xsl
├── fo
└── html
xsl-ns
├── fo
└── html
The permanent URI would be used in the catalogs, which enable
processors to use local copies of the stylesheets to be used instead
of fetching XSL from our server(s). See the Catalogs description
for an explanation.
Catalogs
--------
Many years ago, public identifiers became less common (things like
"-//OASIS//DTD DocBook XML V4.2//EN") and were replaced with system
identifiers, like "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd".
It works to use a local filesystem path, as many of our documents
did, e.g. /usr/share/sgml/docbook/dtd/4.2/docbook.dtd; however, not
all systems install the DTDs and XSL in the same filesystem
locations.
Catalogs solve this problem by mapping the well-known system
identifier to be an Internet URL ('http://something/somewhere') to a
filesystem location on the local machine. On most (Linux) systems
today, you will see a well-known file called /etc/xml/catalog.
Each system installs the XSL (and DTD) files wherever it makes sense
in the filesystem and then updates the system catalog, often by
installing a catalog in the /etc/xml/ directory.
Then, if an XML processing tool needs to load a particular resource,
say http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd, it tries
first to use the catalog to find the local system copy of the
resource.
[When somebody runs 'xsltproc --nonet', the resolution of the
resource is tried using the catalog. If that fails, then the
invocation will fail. Without the '--nonet' option, xsltproc will
fetch the resources over the network from the well-known location.]
History of the stylesheets
----------------------------
The ldp.dsl file was honed by Greg Ferguson over the years and has
been the sole stylesheet used to prepare all LDP Docbook sources
with the openjade toolchain.
There were two variants of the XSL stylesheets, one by David Horton
and another by Dan York. They were never used for publication of our
documents. The files were furnished by TLDP and were distributed
widely, even making it into the Debian project. I have already
started on the changes to these stylesheets.
Changes to the various stylesheets
----------------------------------
Here are the changes:
* The only substantive change is a change to the XSL print
stylesheet which generates FO (Formatted Objects). The Apache
fop utility cannot process the generated FO without this
change.
* I reconciled the differences between the two extant versions of
our XSL stylesheet layers.
* Based on the new XSL stylesheet layers, I generated a usable
variant for use with Docbook 5.x, the XSL-NS stylesheet layers.
* I added an HTML stylesheet (CSS) declaration to the ldp.dsl.
I plan on packaging the customization layers for Debian, which means
updating the existing package called ldp-docbook-stylesheets.
That's all from here,
-Martin
--
Martin A. Brown
http://linux-ip.net/