Accepting request 546051 from 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 - - Spec file changes: * Adapted patches (only directory) * Used spec-cleaner * Removed obsolete stuff * Installed files through Makefile * Used/require sgml-skel >= 0.7 * Used update-xml-catalog - Deal with FIXME OBS-URL: https://build.opensuse.org/request/show/546051 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/docbook_4?expand=0&rev=31
This commit is contained in:
commit
bb04092a10
147
Makefile
Normal file
147
Makefile
Normal file
@ -0,0 +1,147 @@
|
||||
#
|
||||
# Makefile to install DocBook 4.x
|
||||
#
|
||||
# Author:
|
||||
# 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
|
||||
CDIR := $(shell pwd)
|
||||
#
|
||||
DATADIR := $(DESTDIR)$(PREFIX)/share
|
||||
#
|
||||
SGML_DIR := $(DATADIR)/sgml
|
||||
XML_DIR := $(DATADIR)/xml
|
||||
|
||||
# Catalog stuff
|
||||
DB_CATALOG_SRC := $(PACKAGE).xml
|
||||
XML_CATALOG_DIR := $(DESTDIR)/etc/xml/catalog.d
|
||||
XML_CATALOG := $(XML_CATALOG_DIR)/$(DB_CATALOG_SRC)
|
||||
SGML_CATALOGS := $(wildcard CATALOG*)
|
||||
SGML_CATALOG_DIR := $(SGML_DIR)
|
||||
#
|
||||
SGML_CONFIG_DIR := $(DESTDIR)/var/lib/sgml
|
||||
SGML_CATALOG_FILES := $(addprefix $(SGML_CONFIG_DIR)/,$(SGML_CATALOGS))
|
||||
#
|
||||
DB_XML_DIR := $(XML_DIR)/docbook
|
||||
DB_SGML_DIR := $(SGML_DIR)/docbook
|
||||
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)
|
||||
|
||||
SGML_DB_PATHS := $(foreach p,$(DB_SGML_VERSIONS),$(DTD_SGML_DIR)/$(p))
|
||||
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 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))
|
||||
|
||||
DTD_DEST_FILES := $(addsuffix /docbookx.dtd,$(DTD_DEST_DIRS))
|
||||
|
||||
# Add the DocBook SGML files too (HINT: SGML has docbook.dtd, without "x"!)
|
||||
DTD_DEST_FILES += $(addsuffix /docbook.dtd,$(SGML_DB_PATHS))
|
||||
|
||||
## All RNG paths and files (restricted to docbook.rng)
|
||||
RNG_DEST_DIRS := $(sort $(wildcard docbook-rng-4.?))
|
||||
RNG_DEST_DIRS := $(subst -,/,$(patsubst docbook-%, %,$(RNG_DEST_DIRS)))
|
||||
RNG_DEST_DIRS := $(addprefix $(XML_SCHEMA_DIR)/,$(RNG_DEST_DIRS))
|
||||
|
||||
RNG_DEST_FILES := $(addsuffix /docbook.rng,$(RNG_DEST_DIRS))
|
||||
|
||||
## All XSD paths and files (restricted to docbook.xsd)
|
||||
XSD_DEST_DIRS := $(sort $(wildcard docbook-xsd-4.?))
|
||||
XSD_DEST_DIRS := $(subst -,/,$(patsubst docbook-%, %,$(XSD_DEST_DIRS)))
|
||||
XSD_DEST_DIRS := $(addprefix $(XML_SCHEMA_DIR)/,$(XSD_DEST_DIRS))
|
||||
|
||||
XSD_DEST_FILES := $(addsuffix /docbook.xsd,$(XSD_DEST_DIRS))
|
||||
|
||||
# All destination files to be unpacked
|
||||
ALL_DEST_FILES := $(DTD_DEST_FILES) $(RNG_DEST_FILES) $(XSD_DEST_FILES)
|
||||
XML_DB_PATHS := $(DTD_DEST_DIRS) $(RNG_DEST_DIRS) $(XSD_DEST_DIRS)
|
||||
|
||||
# All installation directories that needs to be created before
|
||||
INST_DIRECTORIES := $(XML_DB_PATHS) $(SGML_DB_PATHS) $(SGML_CONFIG_DIR) \
|
||||
$(XML_CATALOG_DIR) $(SGML_CATALOG_DIR)
|
||||
|
||||
|
||||
#-----------------------------
|
||||
.PHONY: install
|
||||
install: $(XML_CATALOG) $(SGML_CATALOG_FILES) $(ALL_DEST_FILES)
|
||||
install: | $(XML_IN_SGML_DIRS)
|
||||
@echo "# Installed in $(DESTDIR)$(PREFIX)..."
|
||||
# @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)
|
||||
@echo "# Installing SGML catalog $<..."
|
||||
cp $< $(dir $@)
|
||||
cp $< $(SGML_CATALOG_DIR)
|
||||
|
||||
$(XML_IN_SGML_DIRS): | $(INST_DIRECTORIES)
|
||||
@echo "Creating link $@..."
|
||||
ln -s ../../../xml/docbook/schema/dtd/$(patsubst %xml,%,$(subst $(DTD_SGML_DIR)/,,$@)) $@
|
||||
|
||||
$(DTD_SGML_DIR)/%/docbook.dtd: docbook-sgml-%
|
||||
@echo "# Copying $<"
|
||||
@cp -a $</* $(dir $@)
|
||||
|
||||
$(XML_SCHEMA_DIR)/dtd/%/docbookx.dtd: docbook-xml-%
|
||||
@echo "# Copying $<"
|
||||
@cp -a $</* $(dir $@)
|
||||
|
||||
$(XML_SCHEMA_DIR)/rng/%/docbook.rng: docbook-rng-%
|
||||
@echo "# Copying $<"
|
||||
@cp -a $</* $(dir $@)
|
||||
|
||||
$(XML_SCHEMA_DIR)/xsd/%/docbook.xsd: docbook-xsd-%
|
||||
@echo "# Copying $<"
|
||||
@cp -a $</* $(dir $@)
|
||||
|
||||
$(XML_CATALOG): $(DB_CATALOG_SRC) | $(XML_CATALOG_DIR)
|
||||
@echo "# Installing XML Catalog..."
|
||||
install -m644 $< $@
|
||||
|
||||
# create needed directories
|
||||
#
|
||||
$(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
|
@ -1,5 +1,5 @@
|
||||
--- docbook_4/4.3xml/catalog.xml.~1~ 2004-03-31 13:22:12.000000000 +0200
|
||||
+++ docbook_4/4.3xml/catalog.xml 2005-05-17 15:28:06.000000000 +0200
|
||||
--- docbook_4/docbook-xml-4.3/catalog.xml.~1~ 2004-03-31 13:22:12.000000000 +0200
|
||||
+++ docbook_4/docbook-xml-4.3/catalog.xml 2005-05-17 15:28:06.000000000 +0200
|
||||
@@ -34,6 +34,9 @@
|
||||
<public publicId="-//OASIS//DTD XML Exchange Table Model 19990315//EN"
|
||||
uri="soextblx.dtd"/>
|
||||
@ -11,8 +11,8 @@
|
||||
uri="dbpoolx.mod"/>
|
||||
|
||||
|
||||
--- docbook_4/dtd/4.3/catalog.xml.~1~ 2004-03-31 13:45:14.000000000 +0200
|
||||
+++ docbook_4/dtd/4.3/catalog.xml 2005-05-17 15:27:35.000000000 +0200
|
||||
--- docbook_4/docbook-sgml-4.3/catalog.xml.~1~ 2004-03-31 13:45:14.000000000 +0200
|
||||
+++ docbook_4/docbook-sgml-4.3/catalog.xml 2005-05-17 15:27:35.000000000 +0200
|
||||
@@ -34,6 +34,9 @@
|
||||
<public publicId="-//OASIS//DTD XML Exchange Table Model 19990315//EN"
|
||||
uri="soextblx.dtd"/>
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- dtd/4.3/docbook.dcl.~1~ 2004-03-31 13:44:16.000000000 +0200
|
||||
+++ dtd/4.3/docbook.dcl 2004-06-06 09:07:41.722095720 +0200
|
||||
--- docbook-sgml-4.3/docbook.dcl.~1~ 2004-03-31 13:44:16.000000000 +0200
|
||||
+++ docbook-sgml-4.3/docbook.dcl 2004-06-06 09:07:41.722095720 +0200
|
||||
@@ -61,8 +61,8 @@
|
||||
NAMING
|
||||
LCNMSTRT ""
|
||||
@ -12,8 +12,8 @@
|
||||
GENERAL YES
|
||||
ENTITY NO
|
||||
|
||||
--- dtd/4.3/htmltblx.mod.~1~ 2004-03-31 13:43:24.000000000 +0200
|
||||
+++ dtd/4.3/htmltblx.mod 2004-06-06 09:45:55.033459400 +0200
|
||||
--- docbook-sgml-4.3/htmltblx.mod.~1~ 2004-03-31 13:43:24.000000000 +0200
|
||||
+++ docbook-sgml-4.3/htmltblx.mod 2004-06-06 09:45:55.033459400 +0200
|
||||
@@ -213,8 +213,10 @@
|
||||
bgcolor CDATA #IMPLIED
|
||||
'>
|
||||
|
115
docbook-xml-4.1.2-catalog.xml
Normal file
115
docbook-xml-4.1.2-catalog.xml
Normal 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>
|
@ -1,5 +1,5 @@
|
||||
--- docbook.dcl.~1~ 2005-01-27 14:59:49.000000000 +0100
|
||||
+++ docbook.dcl 2005-08-17 13:48:37.000000000 +0200
|
||||
--- docbook_4/docbook-sgml-4.4/docbook.dcl.~1~ 2017-10-17 08:26:00.675876558 +0200
|
||||
+++ docbook_4/docbook-sgml-4.4/docbook.dcl 2017-10-17 08:26:30.895997614 +0200
|
||||
@@ -61,8 +61,8 @@
|
||||
NAMING
|
||||
LCNMSTRT ""
|
||||
@ -11,5 +11,3 @@
|
||||
NAMECASE
|
||||
GENERAL YES
|
||||
ENTITY NO
|
||||
|
||||
Diff finished. Wed Aug 17 13:48:41 2005
|
||||
|
@ -1,3 +1,22 @@
|
||||
-------------------------------------------------------------------
|
||||
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
|
||||
|
||||
- Spec file changes:
|
||||
* Adapted patches (only directory)
|
||||
* Used spec-cleaner
|
||||
* Removed obsolete stuff
|
||||
* Installed files through Makefile
|
||||
* Used/require sgml-skel >= 0.7
|
||||
* Used update-xml-catalog
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 19 09:42:19 UTC 2015 - toms@opensuse.org
|
||||
|
||||
|
353
docbook_4.spec
353
docbook_4.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package docbook_4
|
||||
#
|
||||
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -16,27 +16,25 @@
|
||||
#
|
||||
|
||||
|
||||
%define regcat %{_bindir}/sgml-register-catalog
|
||||
Name: docbook_4
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: sgml-skel
|
||||
BuildRequires: unzip
|
||||
Provides: docbook
|
||||
Provides: docbook-dtd
|
||||
Provides: docbook-dtds
|
||||
Requires: iso_ent
|
||||
%define regcat /usr/bin/sgml-register-catalog
|
||||
PreReq: %{regcat} /usr/bin/xmlcatalog sgml-skel
|
||||
PreReq: sed grep awk
|
||||
Summary: DocBook DTD Version 4.x
|
||||
License: BSD-3-Clause and MIT
|
||||
Group: Productivity/Publishing/DocBook
|
||||
Version: 4.5
|
||||
Release: 0
|
||||
Summary: DocBook DTD Version 4.x
|
||||
License: BSD-3-Clause AND MIT
|
||||
Group: Productivity/Publishing/DocBook
|
||||
Url: http://www.oasis-open.org/docbook/
|
||||
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
|
||||
@ -67,9 +65,22 @@ Source454: CATALOG.db45xml
|
||||
Patch1: docbook-4-3.diff
|
||||
Patch2: docbook-4-3-xml-cat.diff
|
||||
Patch3: docbook.4.4.dcl.diff
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
#
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: sgml-skel >= 0.7
|
||||
BuildRequires: unzip
|
||||
Requires: iso_ent
|
||||
PreReq: %{_bindir}/xmlcatalog
|
||||
PreReq: awk
|
||||
PreReq: grep
|
||||
PreReq: sed
|
||||
PreReq: sgml-skel
|
||||
Requires(post): sgml-skel >= 0.7
|
||||
Requires(postun): sgml-skel >= 0.7
|
||||
Provides: docbook
|
||||
Provides: docbook-dtd
|
||||
Provides: docbook-dtds
|
||||
BuildArch: noarch
|
||||
Url: http://www.oasis-open.org/docbook/
|
||||
|
||||
%description
|
||||
DocBook is a schema. It is particularly well-suited to books and papers
|
||||
@ -94,263 +105,60 @@ Schema.
|
||||
%define xml_docbook_xsd_dir %{xml_docbook_dir}/schema/xsd
|
||||
%define xml_docbook_custom_dir %{xml_docbook_dir}/custom
|
||||
%define xml_docbook_style_dir %{xml_docbook_dir}/stylesheet
|
||||
%define sgml_config_dir /var/lib/sgml
|
||||
%define sgml_config_dir %{_localstatedir}/lib/sgml
|
||||
%define sgml_sysconf_dir %{_sysconfdir}/sgml
|
||||
%define xml_config_dir /var/lib/xml
|
||||
%define xml_config_dir %{_localstatedir}/lib/xml
|
||||
%define xml_sysconf_dir %{_sysconfdir}/xml
|
||||
%define FOR_ROOT_CAT for-catalog-%{name}-%{version}.xml
|
||||
%define my_all_cat docbook_4 db41xml db42xml db43xml db44xml db45xml
|
||||
|
||||
%prep
|
||||
%setup -n %{name} -c -T
|
||||
%setup -q -n %{name} -c -T
|
||||
cp -p $RPM_SOURCE_DIR/%{name}-README.SUSE README.SUSE
|
||||
%{INSTALL_DIR} dtd/4.{1,2,3,4,5} 4.{1,2,3,4,5}xml
|
||||
echo "**** %{S:410}"
|
||||
pushd dtd/4.1
|
||||
unzip -q -a %{S:410}
|
||||
popd
|
||||
pushd 4.1xml
|
||||
unzip -q -a %{S:411}
|
||||
popd
|
||||
pushd dtd/4.2
|
||||
unzip -q -a %{S:420}
|
||||
popd
|
||||
pushd 4.2xml
|
||||
unzip -q -a %{S:421}
|
||||
popd
|
||||
pushd dtd/4.3
|
||||
unzip -q -a %{S:430}
|
||||
popd
|
||||
pushd 4.3xml
|
||||
unzip -q -a %{S:431}
|
||||
popd
|
||||
pushd dtd/4.4
|
||||
unzip -q -a %{S:440}
|
||||
%patch3 -p 0
|
||||
popd
|
||||
pushd 4.4xml
|
||||
unzip -q -a %{S:441}
|
||||
popd
|
||||
pushd dtd/4.5
|
||||
unzip -q -a %{S:450}
|
||||
popd
|
||||
pushd 4.5xml
|
||||
unzip -q -a %{S:451}
|
||||
popd
|
||||
%patch -p 1 -P 1 -p 0
|
||||
|
||||
# DocBook 4.1
|
||||
unzip -q -a %{SOURCE410} -d docbook-sgml-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
|
||||
unzip -q -a %{SOURCE422} -d docbook-rng-4.2
|
||||
unzip -q -a %{SOURCE423} -d docbook-xsd-4.2
|
||||
# DocBook 4.3
|
||||
unzip -q -a %{SOURCE430} -d docbook-sgml-4.3
|
||||
unzip -q -a %{SOURCE431} -d docbook-xml-4.3
|
||||
unzip -q -a %{SOURCE432} -d docbook-rng-4.3
|
||||
unzip -q -a %{SOURCE433} -d docbook-xsd-4.3
|
||||
# DocBook 4.4
|
||||
unzip -q -a %{SOURCE440} -d docbook-sgml-4.4
|
||||
unzip -q -a %{SOURCE441} -d docbook-xml-4.4
|
||||
unzip -q -a %{SOURCE442} -d docbook-rng-4.4
|
||||
unzip -q -a %{SOURCE443} -d docbook-xsd-4.4
|
||||
# DocBook 4.5
|
||||
unzip -q -a %{SOURCE450} -d docbook-sgml-4.5
|
||||
unzip -q -a %{SOURCE451} -d docbook-xml-4.5
|
||||
unzip -q -a %{SOURCE452} -d docbook-rng-4.5
|
||||
unzip -q -a %{SOURCE453} -d docbook-xsd-4.5
|
||||
|
||||
%patch1 -p 1 -p 0
|
||||
%patch2 -p 1
|
||||
%patch3 -p 1
|
||||
|
||||
# CATALOG.* files
|
||||
cp %{S:7} %{S:414} %{S:424} %{S:434} %{S:444} %{S:454} .
|
||||
cp %{SOURCE3} %{SOURCE7} %{SOURCE8} %{SOURCE414} %{SOURCE424} %{SOURCE434} %{SOURCE444} %{SOURCE454} .
|
||||
chmod -R a+rX,g-w,o-w .
|
||||
# Remove executable bit from files
|
||||
find . -type f | xargs chmod a-x
|
||||
|
||||
%build
|
||||
CATALOG=docbook_41.xml
|
||||
# # build root catalog fragment
|
||||
xmlcatbin=/usr/bin/xmlcatalog
|
||||
$xmlcatbin --create --noout $CATALOG
|
||||
docbookdir=%{xml_docbook_dtd_dir}/4.1
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"-//OASIS//ELEMENTS DocBook XML Information Pool V4.1.2//EN" \
|
||||
"file://$docbookdir/dbpoolx.mod" $CATALOG
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"-//OASIS//DTD DocBook XML V4.1.2//EN" \
|
||||
"file://$docbookdir/docbookx.dtd" $CATALOG
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"-//OASIS//ENTITIES DocBook XML Character Entities V4.1.2//EN" \
|
||||
"file://$docbookdir/dbcentx.mod" $CATALOG
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"-//OASIS//ENTITIES DocBook XML Notations V4.1.2//EN" \
|
||||
"file://$docbookdir/dbnotnx.mod" $CATALOG
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"-//OASIS//ENTITIES DocBook XML Additional General Entities V4.1.2//EN" \
|
||||
"file://$docbookdir/dbgenent.mod" $CATALOG
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.1.2//EN" \
|
||||
"file://$docbookdir/dbhierx.mod" $CATALOG
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
|
||||
"file://$docbookdir/soextblx.dtd" $CATALOG
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"-//OASIS//DTD DocBook XML CALS Table Model V4.1.2//EN" \
|
||||
"file://$docbookdir/calstblx.dtd" $CATALOG
|
||||
$xmlcatbin --noout --add "rewriteSystem" \
|
||||
"http://www.oasis-open.org/docbook/xml/4.1.2" \
|
||||
"file://$docbookdir" $CATALOG
|
||||
$xmlcatbin --noout --add "rewriteSystem" \
|
||||
"http://www.docbook.org/xml/4.1.2" \
|
||||
"file://$docbookdir" $CATALOG
|
||||
$xmlcatbin --noout --add "rewriteURI" \
|
||||
"http://www.oasis-open.org/docbook/xml/4.1.2" \
|
||||
"file://$docbookdir" $CATALOG
|
||||
# === iso
|
||||
isodir=$docbookdir/ent
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"ISO 8879:1986//ENTITIES Publishing//EN//XML" \
|
||||
"file://$isodir/iso-pub.ent" $CATALOG
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"ISO 8879:1986//ENTITIES Greek Letters//EN//XML" \
|
||||
"file://$isodir/iso-grk1.ent" $CATALOG
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"ISO 8879:1986//ENTITIES Box and Line Drawing//EN//XML" \
|
||||
"file://$isodir/iso-box.ent" $CATALOG
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"ISO 8879:1986//ENTITIES Greek Symbols//EN//XML" \
|
||||
"file://$isodir/iso-grk3.ent" $CATALOG
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN//XML" \
|
||||
"file://$isodir/iso-amsn.ent" $CATALOG
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML" \
|
||||
"file://$isodir/iso-num.ent" $CATALOG
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN//XML" \
|
||||
"file://$isodir/iso-grk4.ent" $CATALOG
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"ISO 8879:1986//ENTITIES Diacritical Marks//EN//XML" \
|
||||
"file://$isodir/iso-dia.ent" $CATALOG
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"ISO 8879:1986//ENTITIES Monotoniko Greek//EN//XML" \
|
||||
"file://$isodir/iso-grk2.ent" $CATALOG
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN//XML" \
|
||||
"file://$isodir/iso-amsa.ent" $CATALOG
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN//XML" \
|
||||
"file://$isodir/iso-amso.ent" $CATALOG
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"ISO 8879:1986//ENTITIES Russian Cyrillic//EN//XML" \
|
||||
"file://$isodir/iso-cyr1.ent" $CATALOG
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"ISO 8879:1986//ENTITIES General Technical//EN//XML" \
|
||||
"file://$isodir/iso-tech.ent" $CATALOG
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN//XML" \
|
||||
"file://$isodir/iso-amsc.ent" $CATALOG
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"ISO 8879:1986//ENTITIES Added Latin 1//EN//XML" \
|
||||
"file://$isodir/iso-lat1.ent" $CATALOG
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN//XML" \
|
||||
"file://$isodir/iso-amsb.ent" $CATALOG
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"ISO 8879:1986//ENTITIES Added Latin 2//EN//XML" \
|
||||
"file://$isodir/iso-lat2.ent" $CATALOG
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN//XML" \
|
||||
"file://$isodir/iso-amsr.ent" $CATALOG
|
||||
$xmlcatbin --noout --add "public" \
|
||||
"ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN//XML" \
|
||||
"file://$isodir/iso-cyr2.ent" $CATALOG
|
||||
# ====
|
||||
%define FOR_ROOT_CAT for-catalog-%{name}-%{version}.xml
|
||||
CATALOG=etc/xml/$CATALOG
|
||||
rm -f %{FOR_ROOT_CAT}.tmp
|
||||
$xmlcatbin --noout --create %{FOR_ROOT_CAT}.tmp
|
||||
for v in 4.2 4.3 4.4 4.5; do
|
||||
cat42=%{xml_docbook_dtd_dir}/$v/catalog.xml
|
||||
for s in \
|
||||
"-//OASIS//DTD DocBook XML V${v}//EN" \
|
||||
"-//OASIS//DTD DocBook CALS Table Model V${v}//EN" \
|
||||
"-//OASIS//DTD XML Exchange Table Model 19990315//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"
|
||||
do
|
||||
$xmlcatbin --noout --add "delegatePublic" "$s" \
|
||||
"file://$cat42" %{FOR_ROOT_CAT}.tmp
|
||||
done
|
||||
case $v in
|
||||
4.[345])
|
||||
$xmlcatbin --noout --add "delegatePublic" \
|
||||
"-//OASIS//ELEMENTS DocBook XML HTML Tables V${v}//EN" \
|
||||
"file://$cat42" %{FOR_ROOT_CAT}.tmp
|
||||
;;
|
||||
*)
|
||||
true
|
||||
esac
|
||||
$xmlcatbin --noout --add "delegateSystem" \
|
||||
"http://www.oasis-open.org/docbook/xml/${v}" \
|
||||
"file://$cat42" %{FOR_ROOT_CAT}.tmp
|
||||
$xmlcatbin --noout --add "delegateSystem" \
|
||||
"http://www.docbook.org/xml/${v}" \
|
||||
"file://$cat42" %{FOR_ROOT_CAT}.tmp
|
||||
$xmlcatbin --noout --add "delegateURI" \
|
||||
"http://www.oasis-open.org/docbook/xml/${v}" \
|
||||
"file://$cat42" %{FOR_ROOT_CAT}.tmp
|
||||
$xmlcatbin --noout --add "rewriteSystem" \
|
||||
"http://www.oasis-open.org/docbook/xml/${v}" \
|
||||
"file://%{xml_docbook_dtd_dir}/${v}" %{FOR_ROOT_CAT}.tmp
|
||||
$xmlcatbin --noout --add "rewriteSystem" \
|
||||
"http://www.docbook.org/xml/${v}" \
|
||||
"file://%{xml_docbook_dtd_dir}/${v}" %{FOR_ROOT_CAT}.tmp
|
||||
$xmlcatbin --noout --add "delegatePublic" \
|
||||
"ISO 8879:1986" \
|
||||
"file:///$CATALOG" %{FOR_ROOT_CAT}.tmp
|
||||
done
|
||||
# 41xml
|
||||
for s in \
|
||||
"-//OASIS//DTD DocBook XML V4.1" \
|
||||
"-//OASIS//ELEMENTS DocBook Information Pool V4.1" \
|
||||
"-//OASIS//ELEMENTS DocBook Document Hierarchy V4.1" \
|
||||
"-//OASIS//ENTITIES DocBook Additional General Entities V4.1" \
|
||||
"-//OASIS//ENTITIES DocBook Notations V4.1" \
|
||||
"-//OASIS//ENTITIES DocBook Character Entities V4.1"
|
||||
do
|
||||
$xmlcatbin --noout --add "delegatePublic" "$s" \
|
||||
"file:///$CATALOG" %{FOR_ROOT_CAT}.tmp
|
||||
done
|
||||
$xmlcatbin --noout --add "delegateSystem" \
|
||||
"http://www.oasis-open.org/docbook/xml/4.1" \
|
||||
"file:///$CATALOG" %{FOR_ROOT_CAT}.tmp
|
||||
$xmlcatbin --noout --add "delegateURI" \
|
||||
"http://www.oasis-open.org/docbook/xml/4.1" \
|
||||
"file:///$CATALOG" %{FOR_ROOT_CAT}.tmp
|
||||
# Create tag
|
||||
sed '/<catalog/a\
|
||||
<group id="%{name}-%{version}">
|
||||
/<\/catalog/i\
|
||||
</group>' \
|
||||
%{FOR_ROOT_CAT}.tmp > %{FOR_ROOT_CAT}
|
||||
# Nothing to build
|
||||
|
||||
%install
|
||||
%{INSTALL_DIR} $RPM_BUILD_ROOT%{sgml_config_dir}
|
||||
%{INSTALL_DIR} $RPM_BUILD_ROOT%{xml_config_dir}
|
||||
%{INSTALL_DATA} CATALOG.* $RPM_BUILD_ROOT%{sgml_config_dir}
|
||||
# for CATALOG.* links
|
||||
%define my_all_cat docbook_4 db41xml db42xml db43xml db44xml db45xml
|
||||
for v in 4.1 4.2 4.3 4.4 4.5; do
|
||||
vl=${v/\.}
|
||||
%{INSTALL_DIR} $RPM_BUILD_ROOT%{sgml_docbook_dtd_dir}/$v
|
||||
%{INSTALL_DATA} dtd/${v}/* $RPM_BUILD_ROOT%{sgml_docbook_dtd_dir}/${v}
|
||||
%{INSTALL_DIR} $RPM_BUILD_ROOT%{xml_docbook_dtd_dir}/$v
|
||||
cp -a ${v}xml/* $RPM_BUILD_ROOT%{xml_docbook_dtd_dir}/$v
|
||||
ln -s %{xml_docbook_dtd_dir}/$v $RPM_BUILD_ROOT%{sgml_docbook_dtd_dir}/${v}xml
|
||||
ln -sf %{sgml_config_dir}/CATALOG.db${vl}xml \
|
||||
$RPM_BUILD_ROOT%{sgml_dir}/CATALOG.db${vl}xml
|
||||
done
|
||||
ln -sf %{sgml_docbook_dtd_dir}/4.1 $RPM_BUILD_ROOT%{sgml_dir}/%{name}.1
|
||||
ln -sf %{sgml_config_dir}/CATALOG.%{name} \
|
||||
$RPM_BUILD_ROOT%{sgml_dir}/CATALOG.%{name}
|
||||
ln -sf %{sgml_config_dir}/CATALOG.%{name} \
|
||||
$RPM_BUILD_ROOT%{sgml_dir}/CATALOG.docbk41
|
||||
cat_dir=%{buildroot}/etc/xml
|
||||
%{INSTALL_DIR} $cat_dir
|
||||
%{INSTALL_DATA} %{FOR_ROOT_CAT} docbook_41.xml $cat_dir
|
||||
# rng
|
||||
%{INSTALL_DIR} $RPM_BUILD_ROOT%{xml_docbook_rng_dir}/{4.3,4.4} \
|
||||
$RPM_BUILD_ROOT%{xml_docbook_xsd_dir}/{4.3,4.4}
|
||||
unzip -q -a -d $RPM_BUILD_ROOT%{xml_docbook_rng_dir}/4.2 %{S:422}
|
||||
unzip -q -a -d $RPM_BUILD_ROOT%{xml_docbook_rng_dir}/4.3 %{S:432}
|
||||
unzip -q -a -d $RPM_BUILD_ROOT%{xml_docbook_rng_dir}/4.4 %{S:442}
|
||||
unzip -q -a -d $RPM_BUILD_ROOT%{xml_docbook_rng_dir}/4.5 %{S:452}
|
||||
# w3c schema
|
||||
unzip -q -a -d $RPM_BUILD_ROOT%{xml_docbook_xsd_dir}/4.2 %{S:422}
|
||||
unzip -q -a -d $RPM_BUILD_ROOT%{xml_docbook_xsd_dir}/4.3 %{S:433}
|
||||
unzip -q -a -d $RPM_BUILD_ROOT%{xml_docbook_xsd_dir}/4.4 %{S:443}
|
||||
unzip -q -a -d $RPM_BUILD_ROOT%{xml_docbook_xsd_dir}/4.5 %{S:453}
|
||||
make DESTDIR=%{buildroot} install
|
||||
|
||||
# cleanup
|
||||
%fdupes $RPM_BUILD_ROOT
|
||||
%fdupes -s %{buildroot}
|
||||
|
||||
%post
|
||||
if [ -x %{regcat} ]; then
|
||||
@ -362,13 +170,19 @@ fi
|
||||
|
||||
# in case of an update, remove old
|
||||
if [ "2" = "$1" ]; then
|
||||
/usr/bin/edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
|
||||
%{_bindir}/edit-xml-catalog --group --catalog %{_sysconfdir}/xml/suse-catalog.xml \
|
||||
--del %{name}-%{version} || true
|
||||
fi
|
||||
/usr/bin/edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
|
||||
--add /etc/xml/%{FOR_ROOT_CAT}
|
||||
if [ ! -f %{_sysconfdir}/xml/suse-catalog.xml -a -x %{_bindir}/edit-xml-catalog ]; then
|
||||
%{_bindir}/edit-xml-catalog --group --catalog %{_sysconfdir}/xml/suse-catalog.xml \
|
||||
--add %{_sysconfdir}/xml/%{FOR_ROOT_CAT}
|
||||
fi
|
||||
|
||||
update-xml-catalog
|
||||
exit 0
|
||||
|
||||
%postun
|
||||
update-xml-catalog
|
||||
if [ "$1" = "0" -a -x %{regcat} ]; then
|
||||
for c in %{my_all_cat}; do
|
||||
%{regcat} -r %{sgml_dir}/CATALOG.$c \
|
||||
@ -377,13 +191,15 @@ if [ "$1" = "0" -a -x %{regcat} ]; then
|
||||
fi
|
||||
# remove entries only on removal of file
|
||||
if [ "0" = "$1" -a ! -f %{xml_sysconf_dir}/%{FOR_ROOT_CAT} ] ; then
|
||||
/usr/bin/edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
|
||||
%{_bindir}/edit-xml-catalog --group --catalog %{_sysconfdir}/xml/suse-catalog.xml \
|
||||
--del %{name}-%{version}
|
||||
fi
|
||||
exit 0
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
%config %{sgml_config_dir}/CATALOG.*
|
||||
%config %{_sysconfdir}/xml/catalog.d/%{name}.xml
|
||||
|
||||
%doc README.SUSE
|
||||
%{sgml_dir}/CATALOG.*
|
||||
%{sgml_docbook_dtd_dir}/4.1
|
||||
@ -392,13 +208,13 @@ fi
|
||||
%{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
|
||||
@ -414,10 +230,7 @@ fi
|
||||
%{xml_docbook_xsd_dir}/4.4
|
||||
%{xml_docbook_xsd_dir}/4.5
|
||||
#
|
||||
%config %{xml_sysconf_dir}/docbook_41.xml
|
||||
%config %{xml_sysconf_dir}/%{FOR_ROOT_CAT}
|
||||
%dir %{sgml_dir}/docbook/dtd
|
||||
%{sgml_dir}/docbook_4.1
|
||||
%dir %{xml_docbook_dir}/schema
|
||||
%dir %{xml_docbook_dtd_dir}
|
||||
%dir %{xml_docbook_rng_dir}
|
||||
|
106
docbook_4.xml
Normal file
106
docbook_4.xml
Normal file
@ -0,0 +1,106 @@
|
||||
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
|
||||
<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>
|
||||
|
155
generate-docbook_4-xmlcat.py
Normal file
155
generate-docbook_4-xmlcat.py
Normal 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))
|
Loading…
Reference in New Issue
Block a user