SHA256
1
0
forked from pool/docbook_4

Accepting request 545059 from home:thomas-schraitle:branches:Publishing

- Fix XML catalog problems (missing or mistyped identifiers)
- Fix version 4.1.2 link in SGML (yes!) directory
- Add missing docbook-xml-4.1.2-catalog.xml

OBS-URL: https://build.opensuse.org/request/show/545059
OBS-URL: https://build.opensuse.org/package/show/Publishing/docbook_4?expand=0&rev=23
This commit is contained in:
Thomas Schraitle 2017-11-24 08:11:18 +00:00 committed by Git OBS Bridge
parent 8f33613b0c
commit 138436f876
6 changed files with 419 additions and 73 deletions

View File

@ -5,11 +5,14 @@
# Thomas Schraitle <toms@opensuse.org>
#
ifndef PREFIX
PREFIX := /usr
endif
# ifdef DESTDIR
# DESTDIR := $(dir $(patsubst %/,%,$(dir $(DESTDIR))))
# endif
SHELL := /bin/bash
PACKAGE := docbook_4
VERSION := 4.5
@ -37,14 +40,14 @@ XML_SCHEMA_DIR := $(DB_XML_DIR)/schema
DTD_SGML_DIR := $(DB_SGML_DIR)/dtd
#
DB_VERSIONS := 4.2 4.3 4.4 4.5
DB_XML_VERSIONS := 4.1.2 $(DB_VERSIONS)
DB_SGML_VERSIONS := 4.1 $(DB_VERSIONS)
DB_DIRS := dtd rng xsd
SGML_DB_PATHS := $(foreach p,$(DB_SGML_VERSIONS),$(DTD_SGML_DIR)/$(p))
XML_IN_SGML_DIRS := $(addsuffix xml,$(SGML_DB_PATHS))
XML_IN_SGML_DIRS := $(addsuffix xml,$(foreach p,$(DB_XML_VERSIONS),$(DTD_SGML_DIR)/$(p)))
## All DTD paths and files (restricted to docbookx.dtd)
DTD_DEST_DIRS := $(sort $(wildcard docbook-xml-4.?))
DTD_DEST_DIRS := $(sort docbook-xml-4.1.2 $(wildcard docbook-xml-4.?))
DTD_DEST_DIRS := $(subst -,/,$(patsubst docbook-%, %,$(DTD_DEST_DIRS)))
DTD_DEST_DIRS := $(subst xml,dtd,$(DTD_DEST_DIRS))
DTD_DEST_DIRS := $(addprefix $(XML_SCHEMA_DIR)/,$(DTD_DEST_DIRS))
@ -85,6 +88,8 @@ install: | $(XML_IN_SGML_DIRS)
# @echo "DTD_DEST_DIRS=$(DTD_DEST_DIRS)"
# @echo "SGML_CATALOGS=$(SGML_CATALOGS)"
# @echo "SGML_CATALOG_FILES=$(SGML_CATALOG_FILES)"
@echo "INST_DIRECTORIES=$(INST_DIRECTORIES)"
@echo "DESTDIR=$(DESTDIR)"
@echo "Finished."
$(SGML_CONFIG_DIR)/CATALOG.%: CATALOG.% | $(SGML_CONFIG_DIR) $(SGML_CATALOG_DIR)
@ -120,3 +125,23 @@ $(XML_CATALOG): $(DB_CATALOG_SRC) | $(XML_CATALOG_DIR)
#
$(INST_DIRECTORIES):
@mkdir -p $@
#-----------------------------
.PHONY: check
check:
@echo "Checking DocBook4 Catalogs..."
@for v in $(DB_XML_VERSIONS); do \
echo "*** Checking version $$v..."; \
xmlcatalog $(XML_CATALOG) "-//OASIS//DTD DocBook XML V$$v//EN" \
"http://www.oasis-open.org/docbook/xml/$$v/docbookx.dtd" \
"http://www.docbook.org/xml/$$v/docbookx.dtd" \
"-//OASIS//DTD DocBook CALS Table Model V$$v//EN" \
"-//OASIS//ELEMENTS DocBook Information Pool V$$v//EN" \
"-//OASIS//ELEMENTS DocBook Document Hierarchy V$$v//EN" \
"-//OASIS//ENTITIES DocBook Additional General Entities V$$v//EN" \
"-//OASIS//ENTITIES DocBook Notations V$$v//EN" \
"-//OASIS//ENTITIES DocBook Character Entities V$$v//EN" \
"-//OASIS//ENTITIES DocBook Additional General Entities V$$v//EN" \
; \
done

View File

@ -0,0 +1,115 @@
<?xml version='1.0'?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<!-- ...................................................................... -->
<!-- XML Catalog data for DocBook XML V4.1.2 .............................. -->
<!-- File catalog.xml ..................................................... -->
<!-- Please direct all questions, bug reports, or suggestions for
changes to the docbook@lists.oasis-open.org mailing list. For more
information, see http://www.oasis-open.org/.
-->
<!-- This is the catalog data file for DocBook V4.1.2. It is provided as
a convenience in building your own catalog files. You need not use
the filenames listed here, and need not use the filename method of
identifying storage objects at all. See the documentation for
detailed information on the files associated with the DocBook DTD.
See XML Catalogs at http://www.oasis-open.org/committees/entity/ for
detailed information on supplying and using catalog data.
-->
<!-- ...................................................................... -->
<!-- DocBook driver file .................................................. -->
<public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN"
uri="docbookx.dtd"/>
<!-- ...................................................................... -->
<!-- DocBook modules ...................................................... -->
<public publicId="-//OASIS//DTD DocBook CALS Table Model V4.1.2//EN"
uri="calstblx.dtd"/>
<public publicId="-//OASIS//DTD XML Exchange Table Model 19990315//EN"
uri="soextblx.dtd"/>
<public publicId="-//OASIS//ELEMENTS DocBook Information Pool V4.1.2//EN"
uri="dbpoolx.mod"/>
<public publicId="-//OASIS//ELEMENTS DocBook Document Hierarchy V4.1.2//EN"
uri="dbhierx.mod"/>
<public publicId="-//OASIS//ENTITIES DocBook Additional General Entities V4.1.2//EN"
uri="dbgenent.mod"/>
<public publicId="-//OASIS//ENTITIES DocBook Notations V4.1.2//EN"
uri="dbnotnx.mod"/>
<public publicId="-//OASIS//ENTITIES DocBook Character Entities V4.1.2//EN"
uri="dbcentx.mod"/>
<!-- ...................................................................... -->
<!-- ISO entity sets ...................................................... -->
<public publicId="ISO 8879:1986//ENTITIES Diacritical Marks//EN//XML"
uri="ent/iso-dia.ent"/>
<public publicId="ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML"
uri="ent/iso-num.ent"/>
<public publicId="ISO 8879:1986//ENTITIES Publishing//EN//XML"
uri="ent/iso-pub.ent"/>
<public publicId="ISO 8879:1986//ENTITIES General Technical//EN//XML"
uri="ent/iso-tech.ent"/>
<public publicId="ISO 8879:1986//ENTITIES Added Latin 1//EN//XML"
uri="ent/iso-lat1.ent"/>
<public publicId="ISO 8879:1986//ENTITIES Added Latin 2//EN//XML"
uri="ent/iso-lat2.ent"/>
<public publicId="ISO 8879:1986//ENTITIES Greek Letters//EN//XML"
uri="ent/iso-grk1.ent"/>
<public publicId="ISO 8879:1986//ENTITIES Monotoniko Greek//EN//XML"
uri="ent/iso-grk2.ent"/>
<public publicId="ISO 8879:1986//ENTITIES Greek Symbols//EN//XML"
uri="ent/iso-grk3.ent"/>
<public publicId="ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN//XML"
uri="ent/iso-grk4.ent"/>
<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN//XML"
uri="ent/iso-amsa.ent"/>
<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN//XML"
uri="ent/iso-amsb.ent"/>
<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN//XML"
uri="ent/iso-amsc.ent"/>
<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN//XML"
uri="ent/iso-amsn.ent"/>
<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN//XML"
uri="ent/iso-amso.ent"/>
<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN//XML"
uri="ent/iso-amsr.ent"/>
<public publicId="ISO 8879:1986//ENTITIES Box and Line Drawing//EN//XML"
uri="ent/iso-box.ent"/>
<public publicId="ISO 8879:1986//ENTITIES Russian Cyrillic//EN//XML"
uri="ent/iso-cyr1.ent"/>
<public publicId="ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN//XML"
uri="ent/iso-cyr2.ent"/>
<!-- End of catalog data for DocBook XML V4.1.2 ........................... -->
<!-- ...................................................................... -->
</catalog>

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Nov 13 15:56:39 UTC 2017 - thomas.schraitle@suse.com
- Fix XML catalog problems (missing or mistyped identifiers)
- Fix version 4.1.2 link in SGML (yes!) directory
- Add missing docbook-xml-4.1.2-catalog.xml
-
-------------------------------------------------------------------
Tue Oct 17 09:05:19 UTC 2017 - thomas.schraitle@suse.com

View File

@ -28,9 +28,13 @@ Source2: docbook_4-README.SUSE
Source3: %{name}.xml
Source7: CATALOG.docbook_4
Source8: Makefile
# Only needed to regenerate docbook_4.xml
Source9: generate-docbook_4-xmlcat.py
# DocBook 4.1
Source410: http://www.oasis-open.org/docbook/sgml/4.1/docbk41.zip
Source411: http://www.oasis-open.org/docbook/xml/4.1/docbkx412.zip
Source411: docbook-xml-4.1.2-catalog.xml
Source412: http://www.oasis-open.org/docbook/xml/4.1/docbkx412.zip
# No RNG and XSD files for DB4.1
Source414: CATALOG.db41xml
# DocBook 4.2
@ -113,11 +117,11 @@ Schema.
%prep
%setup -q -n %{name} -c -T
cp -p $RPM_SOURCE_DIR/%{name}-README.SUSE README.SUSE
%{INSTALL_DIR} docbook-{sgml,xml}-4.{1..5} docbook-{xsd,rng}-4.{2..5}
# DocBook 4.1
unzip -q -a %{SOURCE410} -d docbook-sgml-4.1
unzip -q -a %{SOURCE411} -d docbook-xml-4.1
unzip -q -a %{SOURCE412} -d docbook-xml-4.1.2
cp -vi %{SOURCE411} docbook-xml-4.1.2/catalog.xml
# DocBook 4.2
unzip -q -a %{SOURCE420} -d docbook-sgml-4.2
unzip -q -a %{SOURCE421} -d docbook-xml-4.2
@ -206,13 +210,13 @@ exit 0
%{sgml_docbook_dtd_dir}/4.4
%{sgml_docbook_dtd_dir}/4.5
#
%{sgml_docbook_dtd_dir}/4.1xml
%{sgml_docbook_dtd_dir}/4.1.2xml
%{sgml_docbook_dtd_dir}/4.2xml
%{sgml_docbook_dtd_dir}/4.3xml
%{sgml_docbook_dtd_dir}/4.4xml
%{sgml_docbook_dtd_dir}/4.5xml
#
%{xml_docbook_dtd_dir}/4.1
%{xml_docbook_dtd_dir}/4.1.2
%{xml_docbook_dtd_dir}/4.2
%{xml_docbook_dtd_dir}/4.3
%{xml_docbook_dtd_dir}/4.4

View File

@ -1,67 +1,106 @@
<?xml version="1.0"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<group id="docbook_4-4.5">
<delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//DTD DocBook CALS Table Model V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//DTD XML Exchange Table Model 19990315//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Information Pool V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Document Hierarchy V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Additional General Entities V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Notations V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Character Entities V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
<delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.2" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
<delegateSystem systemIdStartString="http://www.docbook.org/xml/4.2" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
<delegateURI uriStartString="http://www.oasis-open.org/docbook/xml/4.2" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
<rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.2" rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/4.2"/>
<rewriteSystem systemIdStartString="http://www.docbook.org/xml/4.2" rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/4.2"/>
<delegatePublic publicIdStartString="ISO 8879:1986" catalog="file:///etc/xml/docbook_41.xml"/>
<delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//DTD DocBook CALS Table Model V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Information Pool V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Document Hierarchy V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Additional General Entities V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Notations V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Character Entities V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook XML HTML Tables V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
<delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.3" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
<delegateSystem systemIdStartString="http://www.docbook.org/xml/4.3" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
<delegateURI uriStartString="http://www.oasis-open.org/docbook/xml/4.3" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
<rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.3" rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/4.3"/>
<rewriteSystem systemIdStartString="http://www.docbook.org/xml/4.3" rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/4.3"/>
<delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//DTD DocBook CALS Table Model V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Information Pool V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Document Hierarchy V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Additional General Entities V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Notations V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Character Entities V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook XML HTML Tables V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
<delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.4" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
<delegateSystem systemIdStartString="http://www.docbook.org/xml/4.4" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
<delegateURI uriStartString="http://www.oasis-open.org/docbook/xml/4.4" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
<rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.4" rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/4.4"/>
<rewriteSystem systemIdStartString="http://www.docbook.org/xml/4.4" rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/4.4"/>
<delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//DTD DocBook CALS Table Model V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Information Pool V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Document Hierarchy V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Additional General Entities V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Notations V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Character Entities V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook XML HTML Tables V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
<delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.5" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
<delegateSystem systemIdStartString="http://www.docbook.org/xml/4.5" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
<delegateURI uriStartString="http://www.oasis-open.org/docbook/xml/4.5" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
<rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.5" rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/4.5"/>
<rewriteSystem systemIdStartString="http://www.docbook.org/xml/4.5" rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/4.5"/>
<delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML V4.1" catalog="file:///etc/xml/docbook_41.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Information Pool V4.1" catalog="file:///etc/xml/docbook_41.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Document Hierarchy V4.1" catalog="file:///etc/xml/docbook_41.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Additional General Entities V4.1" catalog="file:///etc/xml/docbook_41.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Notations V4.1" catalog="file:///etc/xml/docbook_41.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Character Entities V4.1" catalog="file:///etc/xml/docbook_41.xml"/>
<delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.1" catalog="file:///etc/xml/docbook_41.xml"/>
<delegateURI uriStartString="http://www.oasis-open.org/docbook/xml/4.1" catalog="file:///etc/xml/docbook_41.xml"/>
<group id="docbook_4">
<!-- === Version 4.1.2 === -->
<delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML V4.1.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.1.2/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//DTD DocBook CALS Table Model V4.1.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.1.2/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Information Pool V4.1.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.1.2/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Document Hierarchy V4.1.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.1.2/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Additional General Entities V4.1.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.1.2/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Notations V4.1.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.1.2/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Character Entities V4.1.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.1.2/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Additional General Entities V4.1.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.1.2/catalog.xml"/>
<rewriteSystem rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/4.1.2" systemIdStartString="http://www.oasis-open.org/docbook/xml/4.1.2"/>
<rewriteSystem rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/4.1.2" systemIdStartString="http://www.docbook.org/xml/4.1.2"/>
<!-- === Version 4.2 === -->
<delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//DTD DocBook CALS Table Model V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Information Pool V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Document Hierarchy V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Additional General Entities V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Notations V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Character Entities V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Additional General Entities V4.2//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
<rewriteSystem rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/4.2" systemIdStartString="http://www.oasis-open.org/docbook/xml/4.2"/>
<rewriteSystem rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/4.2" systemIdStartString="http://www.docbook.org/xml/4.2"/>
<!-- === Version 4.3 === -->
<delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//DTD DocBook CALS Table Model V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Information Pool V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Document Hierarchy V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook XML HTML Tables V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Additional General Entities V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Notations V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Character Entities V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Additional General Entities V4.3//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.3/catalog.xml"/>
<rewriteSystem rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/4.3" systemIdStartString="http://www.oasis-open.org/docbook/xml/4.3"/>
<rewriteSystem rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/4.3" systemIdStartString="http://www.docbook.org/xml/4.3"/>
<!-- === Version 4.4 === -->
<delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//DTD DocBook CALS Table Model V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Information Pool V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Document Hierarchy V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook XML HTML Tables V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Additional General Entities V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Notations V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Character Entities V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Additional General Entities V4.4//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.4/catalog.xml"/>
<rewriteSystem rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/4.4" systemIdStartString="http://www.oasis-open.org/docbook/xml/4.4"/>
<rewriteSystem rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/4.4" systemIdStartString="http://www.docbook.org/xml/4.4"/>
<!-- === Version 4.5 === -->
<delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//DTD DocBook CALS Table Model V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Information Pool V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook Document Hierarchy V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ELEMENTS DocBook XML HTML Tables V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Additional General Entities V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Notations V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Character Entities V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook Additional General Entities V4.5//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
<rewriteSystem rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/4.5" systemIdStartString="http://www.oasis-open.org/docbook/xml/4.5"/>
<rewriteSystem rewritePrefix="file:///usr/share/xml/docbook/schema/dtd/4.5" systemIdStartString="http://www.docbook.org/xml/4.5"/>
<!-- === Miscellenous === -->
<delegatePublic publicIdStartString="-//OASIS//DTD XML Exchange Table Model 19990315//EN" catalog="file:///usr/share/xml/docbook/schema/dtd/4.5/catalog.xml"/>
</group>
<!-- === XML Entities === -->
<group id="docbook_4_xmlentities">
<public uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isoamsa.ent" publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN//XML"/>
<system uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isoamsa.ent" systemId="http://www.w3.org/2003/entities/iso8879/isoamsa.ent"/>
<public uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isoamsb.ent" publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN//XML"/>
<system uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isoamsb.ent" systemId="http://www.w3.org/2003/entities/iso8879/isoamsb.ent"/>
<public uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isoamsc.ent" publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN//XML"/>
<system uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isoamsc.ent" systemId="http://www.w3.org/2003/entities/iso8879/isoamsc.ent"/>
<public uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isoamsn.ent" publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN//XML"/>
<system uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isoamsn.ent" systemId="http://www.w3.org/2003/entities/iso8879/isoamsn.ent"/>
<public uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isoamso.ent" publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN//XML"/>
<system uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isoamso.ent" systemId="http://www.w3.org/2003/entities/iso8879/isoamso.ent"/>
<public uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isoamsr.ent" publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN//XML"/>
<system uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isoamsr.ent" systemId="http://www.w3.org/2003/entities/iso8879/isoamsr.ent"/>
<public uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isobox.ent" publicId="ISO 8879:1986//ENTITIES Box and Line Drawing//EN//XML"/>
<system uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isobox.ent" systemId="http://www.w3.org/2003/entities/iso8879/isobox.ent"/>
<public uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isocyr1.ent" publicId="ISO 8879:1986//ENTITIES Russian Cyrillic//EN//XML"/>
<system uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isocyr1.ent" systemId="http://www.w3.org/2003/entities/iso8879/isocyr1.ent"/>
<public uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isocyr2.ent" publicId="ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN//XML"/>
<system uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isocyr2.ent" systemId="http://www.w3.org/2003/entities/iso8879/isocyr2.ent"/>
<public uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isodia.ent" publicId="ISO 8879:1986//ENTITIES Diacritical Marks//EN//XML"/>
<system uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isodia.ent" systemId="http://www.w3.org/2003/entities/iso8879/isodia.ent"/>
<public uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isogrk1.ent" publicId="ISO 8879:1986//ENTITIES Greek Letters//EN//XML"/>
<system uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isogrk1.ent" systemId="http://www.w3.org/2003/entities/iso8879/isogrk1.ent"/>
<public uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isogrk2.ent" publicId="ISO 8879:1986//ENTITIES Monotoniko Greek//EN//XML"/>
<system uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isogrk2.ent" systemId="http://www.w3.org/2003/entities/iso8879/isogrk2.ent"/>
<public uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isogrk3.ent" publicId="ISO 8879:1986//ENTITIES Greek Symbols//EN//XML"/>
<system uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isogrk3.ent" systemId="http://www.w3.org/2003/entities/iso8879/isogrk3.ent"/>
<public uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isogrk4.ent" publicId="ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN//XML"/>
<system uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isogrk4.ent" systemId="http://www.w3.org/2003/entities/iso8879/isogrk4.ent"/>
<public uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isolat1.ent" publicId="ISO 8879:1986//ENTITIES Added Latin 1//EN//XML"/>
<system uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isolat1.ent" systemId="http://www.w3.org/2003/entities/iso8879/isolat1.ent"/>
<public uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isolat2.ent" publicId="ISO 8879:1986//ENTITIES Added Latin 2//EN//XML"/>
<system uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isolat2.ent" systemId="http://www.w3.org/2003/entities/iso8879/isolat2.ent"/>
<public uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isonum.ent" publicId="ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML"/>
<system uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isonum.ent" systemId="http://www.w3.org/2003/entities/iso8879/isonum.ent"/>
<public uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isopub.ent" publicId="ISO 8879:1986//ENTITIES Publishing//EN//XML"/>
<system uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isopub.ent" systemId="http://www.w3.org/200osc 3/entities/iso8879/isopub.ent"/>
<public uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isotech.ent" publicId="ISO 8879:1986//ENTITIES General Technical//EN//XML"/>
<system uri="file:///usr/share/xml/docbook/schema/dtd/4.5/ent/isotech.ent" systemId="http://www.w3.org/2003/entities/iso8879/isotech.ent"/>
</group>
</catalog>

View File

@ -0,0 +1,155 @@
#!/usr/bin/env python3
#
#
from lxml import etree
from lxml.builder import ElementMaker
import os.path
CATATALOG_NS="urn:oasis:names:tc:entity:xmlns:xml:catalog"
CATALOG="file:///usr/share/xml/docbook/schema/dtd/{ver}/catalog.xml"
DB_VERSIONS=["4.1.2", "4.2", "4.3", "4.4", "4.5"]
DTD="-//OASIS//DTD DocBook XML V{ver}//EN"
CALS="-//OASIS//DTD DocBook CALS Table Model V{ver}//EN"
POOL="-//OASIS//ELEMENTS DocBook Information Pool V{ver}//EN"
HIER="-//OASIS//ELEMENTS DocBook Document Hierarchy V{ver}//EN"
GEN_ENT="-//OASIS//ENTITIES DocBook Additional General Entities V{ver}//EN"
NOTA="-//OASIS//ENTITIES DocBook Notations V{ver}//EN"
CHAR_ENT="-//OASIS//ENTITIES DocBook Character Entities V{ver}//EN"
ADD_CHAR_ENT="-//OASIS//ENTITIES DocBook Additional General Entities V{ver}//EN"
HTML="-//OASIS//ELEMENTS DocBook XML grep HTML Tables V{ver}//EN"
SYSTEM_IDENTIFIERS=[
"http://www.oasis-open.org/docbook/xml/{ver}",
"http://www.docbook.org/xml/{ver}",
]
MISC_IDENTIFIERS=[
"-//OASIS//DTD XML Exchange Table Model 19990315//EN",
]
XML_ENTITIES=[
("ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN//XML",
"http://www.w3.org/2003/entities/iso8879/isoamsa.ent",),
("ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN//XML",
"http://www.w3.org/2003/entities/iso8879/isoamsb.ent",),
("ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN//XML",
"http://www.w3.org/2003/entities/iso8879/isoamsc.ent",),
("ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN//XML",
"http://www.w3.org/2003/entities/iso8879/isoamsn.ent",),
("ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN//XML",
"http://www.w3.org/2003/entities/iso8879/isoamso.ent",),
("ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN//XML",
"http://www.w3.org/2003/entities/iso8879/isoamsr.ent",),
("ISO 8879:1986//ENTITIES Box and Line Drawing//EN//XML",
"http://www.w3.org/2003/entities/iso8879/isobox.ent",),
("ISO 8879:1986//ENTITIES Russian Cyrillic//EN//XML",
"http://www.w3.org/2003/entities/iso8879/isocyr1.ent",),
("ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN//XML",
"http://www.w3.org/2003/entities/iso8879/isocyr2.ent",),
("ISO 8879:1986//ENTITIES Diacritical Marks//EN//XML",
"http://www.w3.org/2003/entities/iso8879/isodia.ent",),
("ISO 8879:1986//ENTITIES Greek Letters//EN//XML",
"http://www.w3.org/2003/entities/iso8879/isogrk1.ent",),
("ISO 8879:1986//ENTITIES Monotoniko Greek//EN//XML",
"http://www.w3.org/2003/entities/iso8879/isogrk2.ent",),
("ISO 8879:1986//ENTITIES Greek Symbols//EN//XML",
"http://www.w3.org/2003/entities/iso8879/isogrk3.ent",),
("ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN//XML",
"http://www.w3.org/2003/entities/iso8879/isogrk4.ent",),
("ISO 8879:1986//ENTITIES Added Latin 1//EN//XML",
"http://www.w3.org/2003/entities/iso8879/isolat1.ent",),
("ISO 8879:1986//ENTITIES Added Latin 2//EN//XML",
"http://www.w3.org/2003/entities/iso8879/isolat2.ent",),
("ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML",
"http://www.w3.org/2003/entities/iso8879/isonum.ent",),
("ISO 8879:1986//ENTITIES Publishing//EN//XML",
"http://www.w3.org/200osc 3/entities/iso8879/isopub.ent",),
("ISO 8879:1986//ENTITIES General Technical//EN//XML",
"http://www.w3.org/2003/entities/iso8879/isotech.ent",),
]
DOCBOOK_IDENTIFIERS={
"4.1.2": [DTD, CALS, POOL, HIER, GEN_ENT, NOTA, CHAR_ENT, ADD_CHAR_ENT],
"4.2": [DTD, CALS, POOL, HIER, GEN_ENT, NOTA, CHAR_ENT, ADD_CHAR_ENT],
"4.3": [DTD, CALS, POOL, HIER, HTML, GEN_ENT, NOTA, CHAR_ENT, ADD_CHAR_ENT],
"4.4": [DTD, CALS, POOL, HIER, HTML, GEN_ENT, NOTA, CHAR_ENT, ADD_CHAR_ENT],
"4.5": [DTD, CALS, POOL, HIER, HTML, GEN_ENT, NOTA, CHAR_ENT, ADD_CHAR_ENT],
}
E = ElementMaker(namespace=CATATALOG_NS, nsmap={None : CATATALOG_NS})
catalog = E.catalog
group = E.group
public = E.public
system = E.system
delpub = E.delegatePublic
delsys = E.delegateSystem
deluri = E.delegateURI
rewsys = E.rewriteSystem
def create_db_catalog():
c = catalog()
g = group({'id': 'docbook_4'})
for version in DB_VERSIONS:
g.append(etree.Comment(' === Version {ver} === '.format(ver=version)))
for ident in DOCBOOK_IDENTIFIERS[version]:
g.append(delpub({'publicIdStartString': ident.format(ver=version),
'catalog': CATALOG.format(ver=version)}))
for sysid in SYSTEM_IDENTIFIERS:
#g.append(delsys({'systemIdStartString': sysid.format(ver=version),
# 'catalog': CATALOG.format(ver=version)}))
g.append(rewsys({'systemIdStartString': sysid.format(ver=version),
'rewritePrefix': os.path.dirname(CATALOG.format(ver=version))
}
))
# We use the latest DocBook version for our misc part:
g.append(etree.Comment(' === Miscellenous === '))
for misc in MISC_IDENTIFIERS:
g.append(delpub(publicIdStartString=misc,
catalog=CATALOG.format(ver='4.5')))
c.append(g)
c.append(etree.Comment(' === XML Entities === '))
c.append(create_entities_catalog())
return c
def create_entities_catalog():
g = group({'id': 'docbook_4_xmlentities'})
entfile = "file:///usr/share/xml/docbook/schema/dtd/4.5/ent/{}"
for pub, sys in XML_ENTITIES:
e = sys.rsplit("/", 1)[-1]
entity = entfile.format(e)
g.append(public(publicId=pub,
uri=entity))
g.append(system(systemId=sys,
uri=entity))
return g
if __name__=="__main__":
catalog = create_db_catalog()
print(etree.tostring(catalog, encoding="unicode", pretty_print=True))