Introduksjon til DocBook XML Skjemaer 5.1
DocBook XML Skjemaer-5.1 pakken
inneholder skjemafiler og Schematron regler for verifisering av XML
data filer mot DocBook regelsettet. Disse er nyttige for å
strukturere bøker og programvaredokumentasjon til en standard som
lar deg bruke transformasjoner som allerede er skrevet for den
standarden.
Denne pakken er kjent for å bygge og fungere riktig ved å bruke en
LFS 12.1 plattform.
Pakkeinformasjon
DocBook XML Skjemaer 5.1 Avhengigheter
Påkrevd
libxml2-2.12.5, sgml-common-0.6.3,
og UnZip-6.0 (eller libarchive-3.7.2)
Installasjon av DocBook XML Skjemaer 5.1
Note
Pakkekilden er distribuert i zip
format og krever unzip (eller bsdunzip fra libarchive). Du bør opprette en mappe og
bytte til den mappen før du pakker ut filen for å lette
fjerningen av kildefilene etter at pakken er installert.
Installer DocBook XML Schemas ved
å kjøre følgende kommandoer som root
bruker:
install -vdm755 /usr/share/xml/docbook/schema/{rng,sch}/5.1 &&
install -m644 schemas/rng/* /usr/share/xml/docbook/schema/rng/5.1 &&
install -m644 schemas/sch/* /usr/share/xml/docbook/schema/sch/5.1 &&
install -m755 tools/db4-entities.pl /usr/bin &&
install -vdm755 /usr/share/xml/docbook/stylesheet/docbook5 &&
install -m644 tools/db4-upgrade.xsl \
/usr/share/xml/docbook/stylesheet/docbook5
Opprett (eller oppdater) og fyll ut /etc/xml/docbook-5.1
katalogfilen ved å kjøre
følgende kommandoer som root
bruker:
if [ ! -e /etc/xml/docbook-5.1 ]; then
xmlcatalog --noout --create /etc/xml/docbook-5.1
fi &&
xmlcatalog --noout --add "uri" \
"http://www.oasis-open.org/docbook/xml/5.1/rng/docbook.rng" \
"file:///usr/share/xml/docbook/schema/rng/5.1/docbook.rng" \
/etc/xml/docbook-5.1 &&
xmlcatalog --noout --add "uri" \
"http://docbook.org/xml/5.1/rng/docbook.rng" \
"file:///usr/share/xml/docbook/schema/rng/5.1/docbook.rng" \
/etc/xml/docbook-5.1 &&
xmlcatalog --noout --add "uri" \
"http://www.oasis-open.org/docbook/xml/5.1/rng/docbookxi.rng" \
"file:///usr/share/xml/docbook/schema/rng/5.1/docbookxi.rng" \
/etc/xml/docbook-5.1 &&
xmlcatalog --noout --add "uri" \
"http://docbook.org/xml/5.1/rng/docbookxi.rng" \
"file:///usr/share/xml/docbook/schema/rng/5.1/docbookxi.rng" \
/etc/xml/docbook-5.1 &&
xmlcatalog --noout --add "uri" \
"http://www.oasis-open.org/docbook/xml/5.1/rnc/docbook.rnc" \
"file:///usr/share/xml/docbook/schema/rng/5.1/docbook.rnc" \
/etc/xml/docbook-5.1 &&
xmlcatalog --noout --add "uri" \
"http://docbook.org/xml/5.1/rng/docbook.rnc" \
"file:///usr/share/xml/docbook/schema/rng/5.1/docbook.rnc" \
/etc/xml/docbook-5.1 &&
xmlcatalog --noout --add "uri" \
"http://www.oasis-open.org/docbook/xml/5.1/rnc/docbookxi.rnc" \
"file:///usr/share/xml/docbook/schema/rng/5.1/docbookxi.rnc" \
/etc/xml/docbook-5.1 &&
xmlcatalog --noout --add "uri" \
"http://docbook.org/xml/5.1/rng/docbookxi.rnc" \
"file:///usr/share/xml/docbook/schema/rng/5.1/docbookxi.rnc" \
/etc/xml/docbook-5.1 &&
xmlcatalog --noout --add "uri" \
"http://www.oasis-open.org/docbook/xml/5.1/sch/docbook.sch" \
"file:///usr/share/xml/docbook/schema/sch/5.1/docbook.sch" \
/etc/xml/docbook-5.1 &&
xmlcatalog --noout --add "uri" \
"http://docbook.org/xml/5.1/sch/docbook.sch" \
"file:///usr/share/xml/docbook/schema/sch/5.1/docbook.sch" \
/etc/xml/docbook-5.1
Mens igjen som root
bruker, lag de
individuelle katalogene:
xmlcatalog --noout --create /usr/share/xml/docbook/schema/rng/5.1/catalog.xml &&
xmlcatalog --noout --add "uri" \
"http://docbook.org/xml/5.1/schemas/rng/docbook.schemas/rng" \
"docbook.schemas/rng" /usr/share/xml/docbook/schema/rng/5.1/catalog.xml &&
xmlcatalog --noout --add "uri" \
"http://www.oasis-open.org/docbook/xml/5.1/schemas/rng/docbook.schemas/rng" \
"docbook.schemas/rng" /usr/share/xml/docbook/schema/rng/5.1/catalog.xml &&
xmlcatalog --noout --add "uri" \
"http://docbook.org/xml/5.1/schemas/rng/docbookxi.schemas/rng" \
"docbookxi.schemas/rng" /usr/share/xml/docbook/schema/rng/5.1/catalog.xml &&
xmlcatalog --noout --add "uri" \
"http://www.oasis-open.org/docbook/xml/5.1/schemas/rng/docbookxi.schemas/rng" \
"docbookxi.schemas/rng" /usr/share/xml/docbook/schema/rng/5.1/catalog.xml &&
xmlcatalog --noout --add "uri" \
"http://docbook.org/xml/5.1/schemas/rng/docbook.rnc" \
"docbook.rnc" /usr/share/xml/docbook/schema/rng/5.1/catalog.xml &&
xmlcatalog --noout --add "uri" \
"http://www.oasis-open.org/docbook/xml/5.1/schemas/rng/docbook.rnc" \
"docbook.rnc" /usr/share/xml/docbook/schema/rng/5.1/catalog.xml &&
xmlcatalog --noout --add "uri" \
"http://docbook.org/xml/5.1/schemas/rng/docbookxi.rnc" \
"docbookxi.rnc" /usr/share/xml/docbook/schema/rng/5.1/catalog.xml &&
xmlcatalog --noout --add "uri" \
"http://www.oasis-open.org/docbook/xml/5.1/schemas/rng/docbookxi.rnc" \
"docbookxi.rnc" /usr/share/xml/docbook/schema/rng/5.1/catalog.xml
xmlcatalog --noout --create /usr/share/xml/docbook/schema/sch/5.1/catalog.xml &&
xmlcatalog --noout --add "uri" \
"http://docbook.org/xml/5.1/schemas/sch/docbook.schemas/sch" \
"docbook.schemas/sch" /usr/share/xml/docbook/schema/sch/5.1/catalog.xml &&
xmlcatalog --noout --add "uri" \
"http://www.oasis-open.org/docbook/xml/5.1/schemas/sch/docbook.schemas/sch" \
"docbook.schemas/sch" /usr/share/xml/docbook/schema/sch/5.1/catalog.xml
Opprett (eller oppdater) og fyll ut systemets XML katalog
(/etc/xml/catalog
) ved å kjøre
følgende kommandoer som root
bruker:
if [ ! -e /etc/xml/catalog ]; then
xmlcatalog --noout --create /etc/xml/catalog
fi &&
xmlcatalog --noout --add "delegatePublic" \
"-//OASIS//DTD DocBook XML 5.1//EN" \
"file:///usr/share/xml/docbook/schema/dtd/5.1/catalog.xml" \
/etc/xml/catalog &&
xmlcatalog --noout --add "delegateSystem" \
"http://docbook.org/xml/5.1/dtd/" \
"file:///usr/share/xml/docbook/schema/dtd/5.1/catalog.xml" \
/etc/xml/catalog &&
xmlcatalog --noout --add "delegateURI" \
"http://docbook.org/xml/5.1/dtd/" \
"file:///usr/share/xml/docbook/schema/dtd/5.1/catalog.xml" \
/etc/xml/catalog &&
xmlcatalog --noout --add "delegateURI" \
"http://docbook.org/xml/5.1/rng/" \
"file:///usr/share/xml/docbook/schema/rng/5.1/catalog.xml" \
/etc/xml/catalog &&
xmlcatalog --noout --add "delegateURI" \
"http://docbook.org/xml/5.1/sch/" \
"file:///usr/share/xml/docbook/schema/sch/5.1/catalog.xml" \
/etc/xml/catalog &&
xmlcatalog --noout --add "delegateURI" \
"http://docbook.org/xml/5.1/xsd/" \
"file:///usr/share/xml/docbook/schema/xsd/5.1/catalog.xml" \
/etc/xml/catalog