This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
expression/install-catalogs

42 lines
2.8 KiB
Plaintext
Raw Permalink Normal View History

Added XHTML DTDs & entities as XML catalogs. These catalogs are handled the Debian way <http://debian-xml-sgml.alioth.debian.org/>. Q: Why do you use manage XML catalogs the standard way instead of libxml2 way? A: Because the Debian way is the standard (Oasis) way and it is partially incompatible with libxml2 way. Q: Why do you use XML catalogs? A: Because I needed to store XHTML entities definitions in the local filesystem. Q: Why do you need to store XHTML DTDs & entities definitions in the local filesystem? A: For speed reasons. Otherwise calls to libxml2 function xmlReadDoc with option XML_PARSE_DTDLOAD require HTTP calls to get the DTD and its entities. Q: Why do you need to use xmlReadDoc function with option XML_PARSE_DTDLOAD? A: Otherwise, the parsing of XHTML files fails when the files contain entities like &eacute;, etc. Q: Why are entities definitions needed? You don't need entities substitution when parsing XML & XHTML files. A: Because after spending several hours testing and reading libxml2 documentation, I discovered that even when not substituting entities, libxml2 needs to know their definitions (the reason is it stores both entities declarations and substitutions inside XML tree. See http://xmlsoft.org/entities.html). Q: Why do you use xmlReadDoc instead of xmlParseDoc? A: Because after spending several hours testing and reading libxml2 documentation, I discovered that xmlParse functions are deprecated. Q: Why don't you use htmlParseDoc (or htmlReadDoc) anymore to read XHTML files? They worked well with entities without requiring DTDs. A: Because html(Parse|Read)Doc ignore namespace declarations. Q: Why don't you ignore namespace declarations when parsing XHTML files? A: Because XHTML files are XML files. And we need to differentiate XML tags with and without namespaces. Q: Why did you repair XHTML namespaces handling today. A: Because Fred asked for it yesterday: "je crée un fichier xml, je ne spécifie pas de namespace, pq l'attribution à l'holder et à l'élément du namespace xhtml ?". Q: Did you spent the whole day programming this small feature request? A: No, I also wrote this FAQ.
2004-05-24 01:13:05 +02:00
#!/bin/sh
# Install Expression XML catalogs the Debian way.
# See: http://debian-xml-sgml.alioth.debian.org/
#
# Note: All changes in this file must also be done on file
# debian/expression.xmlcatalogs
#
# Note: The XHTML 1.0 catalogs should really be defined in another package, for
# example xml-core.
PREFIX=/usr/local
Added XHTML DTDs & entities as XML catalogs. These catalogs are handled the Debian way <http://debian-xml-sgml.alioth.debian.org/>. Q: Why do you use manage XML catalogs the standard way instead of libxml2 way? A: Because the Debian way is the standard (Oasis) way and it is partially incompatible with libxml2 way. Q: Why do you use XML catalogs? A: Because I needed to store XHTML entities definitions in the local filesystem. Q: Why do you need to store XHTML DTDs & entities definitions in the local filesystem? A: For speed reasons. Otherwise calls to libxml2 function xmlReadDoc with option XML_PARSE_DTDLOAD require HTTP calls to get the DTD and its entities. Q: Why do you need to use xmlReadDoc function with option XML_PARSE_DTDLOAD? A: Otherwise, the parsing of XHTML files fails when the files contain entities like &eacute;, etc. Q: Why are entities definitions needed? You don't need entities substitution when parsing XML & XHTML files. A: Because after spending several hours testing and reading libxml2 documentation, I discovered that even when not substituting entities, libxml2 needs to know their definitions (the reason is it stores both entities declarations and substitutions inside XML tree. See http://xmlsoft.org/entities.html). Q: Why do you use xmlReadDoc instead of xmlParseDoc? A: Because after spending several hours testing and reading libxml2 documentation, I discovered that xmlParse functions are deprecated. Q: Why don't you use htmlParseDoc (or htmlReadDoc) anymore to read XHTML files? They worked well with entities without requiring DTDs. A: Because html(Parse|Read)Doc ignore namespace declarations. Q: Why don't you ignore namespace declarations when parsing XHTML files? A: Because XHTML files are XML files. And we need to differentiate XML tags with and without namespaces. Q: Why did you repair XHTML namespaces handling today. A: Because Fred asked for it yesterday: "je crée un fichier xml, je ne spécifie pas de namespace, pq l'attribution à l'holder et à l'élément du namespace xhtml ?". Q: Did you spent the whole day programming this small feature request? A: No, I also wrote this FAQ.
2004-05-24 01:13:05 +02:00
# Add XHTML entities to package catalog (/etc/xml/expression.xml).
update-xmlcatalog --add --package expression --type public --id "-//W3C//ENTITIES Latin 1 for XHTML" --local $PREFIX/share/xml/entities/expression/catalog.xml
update-xmlcatalog --add --package expression --type public --id "-//W3C//ENTITIES Special for XHTML" --local $PREFIX/share/xml/entities/expression/catalog.xml
update-xmlcatalog --add --package expression --type public --id "-//W3C//ENTITIES Symbols for XHTML" --local $PREFIX/share/xml/entities/expression/catalog.xml
update-xmlcatalog --add --package expression --type system --id "http://www.w3.org/TR/xhtml1/DTD/xhtml-" --local $PREFIX/share/xml/entities/expression/catalog.xml
Added XHTML DTDs & entities as XML catalogs. These catalogs are handled the Debian way <http://debian-xml-sgml.alioth.debian.org/>. Q: Why do you use manage XML catalogs the standard way instead of libxml2 way? A: Because the Debian way is the standard (Oasis) way and it is partially incompatible with libxml2 way. Q: Why do you use XML catalogs? A: Because I needed to store XHTML entities definitions in the local filesystem. Q: Why do you need to store XHTML DTDs & entities definitions in the local filesystem? A: For speed reasons. Otherwise calls to libxml2 function xmlReadDoc with option XML_PARSE_DTDLOAD require HTTP calls to get the DTD and its entities. Q: Why do you need to use xmlReadDoc function with option XML_PARSE_DTDLOAD? A: Otherwise, the parsing of XHTML files fails when the files contain entities like &eacute;, etc. Q: Why are entities definitions needed? You don't need entities substitution when parsing XML & XHTML files. A: Because after spending several hours testing and reading libxml2 documentation, I discovered that even when not substituting entities, libxml2 needs to know their definitions (the reason is it stores both entities declarations and substitutions inside XML tree. See http://xmlsoft.org/entities.html). Q: Why do you use xmlReadDoc instead of xmlParseDoc? A: Because after spending several hours testing and reading libxml2 documentation, I discovered that xmlParse functions are deprecated. Q: Why don't you use htmlParseDoc (or htmlReadDoc) anymore to read XHTML files? They worked well with entities without requiring DTDs. A: Because html(Parse|Read)Doc ignore namespace declarations. Q: Why don't you ignore namespace declarations when parsing XHTML files? A: Because XHTML files are XML files. And we need to differentiate XML tags with and without namespaces. Q: Why did you repair XHTML namespaces handling today. A: Because Fred asked for it yesterday: "je crée un fichier xml, je ne spécifie pas de namespace, pq l'attribution à l'holder et à l'élément du namespace xhtml ?". Q: Did you spent the whole day programming this small feature request? A: No, I also wrote this FAQ.
2004-05-24 01:13:05 +02:00
# Add XHTML 1.0 DTDs to package catalog (/etc/xml/expression.xml).
update-xmlcatalog --add --package expression --type public --id "-//W3C//DTD XHTML 1.0 " --local $PREFIX/share/xml/schema/expression/catalog.xml
update-xmlcatalog --add --package expression --type system --id "http://www.w3.org/TR/xhtml1/DTD/xhtml1-" --local $PREFIX/share/xml/schema/expression/catalog.xml
Added XHTML DTDs & entities as XML catalogs. These catalogs are handled the Debian way <http://debian-xml-sgml.alioth.debian.org/>. Q: Why do you use manage XML catalogs the standard way instead of libxml2 way? A: Because the Debian way is the standard (Oasis) way and it is partially incompatible with libxml2 way. Q: Why do you use XML catalogs? A: Because I needed to store XHTML entities definitions in the local filesystem. Q: Why do you need to store XHTML DTDs & entities definitions in the local filesystem? A: For speed reasons. Otherwise calls to libxml2 function xmlReadDoc with option XML_PARSE_DTDLOAD require HTTP calls to get the DTD and its entities. Q: Why do you need to use xmlReadDoc function with option XML_PARSE_DTDLOAD? A: Otherwise, the parsing of XHTML files fails when the files contain entities like &eacute;, etc. Q: Why are entities definitions needed? You don't need entities substitution when parsing XML & XHTML files. A: Because after spending several hours testing and reading libxml2 documentation, I discovered that even when not substituting entities, libxml2 needs to know their definitions (the reason is it stores both entities declarations and substitutions inside XML tree. See http://xmlsoft.org/entities.html). Q: Why do you use xmlReadDoc instead of xmlParseDoc? A: Because after spending several hours testing and reading libxml2 documentation, I discovered that xmlParse functions are deprecated. Q: Why don't you use htmlParseDoc (or htmlReadDoc) anymore to read XHTML files? They worked well with entities without requiring DTDs. A: Because html(Parse|Read)Doc ignore namespace declarations. Q: Why don't you ignore namespace declarations when parsing XHTML files? A: Because XHTML files are XML files. And we need to differentiate XML tags with and without namespaces. Q: Why did you repair XHTML namespaces handling today. A: Because Fred asked for it yesterday: "je crée un fichier xml, je ne spécifie pas de namespace, pq l'attribution à l'holder et à l'élément du namespace xhtml ?". Q: Did you spent the whole day programming this small feature request? A: No, I also wrote this FAQ.
2004-05-24 01:13:05 +02:00
# Add XHTML package catalog to root XML catalog (/etc/xml/catalog).
# First: XHTML entities.
update-xmlcatalog --add --root --package expression --type public --id "-//W3C//ENTITIES Latin 1 for XHTML"
update-xmlcatalog --add --root --package expression --type public --id "-//W3C//ENTITIES Special for XHTML"
update-xmlcatalog --add --root --package expression --type public --id "-//W3C//ENTITIES Symbols for XHTML"
update-xmlcatalog --add --root --package expression --type system --id "http://www.w3.org/TR/xhtml1/DTD/xhtml-"
# Next: XHTML 1.0 DTDs.
update-xmlcatalog --add --root --package expression --type public --id "-//W3C//DTD XHTML 1.0 "
update-xmlcatalog --add --root --package expression --type system --id "http://www.w3.org/TR/xhtml1/DTD/xhtml1-"
# Add Expression XML descriptions to package catalog (/etc/xml/expression.xml).
update-xmlcatalog --add --package expression --type system --id "http://www.entrouvert.org/expression/descriptions/" --local $PREFIX/share/xml/misc/expression/catalog.xml
# Add Expression XML schemas to package catalog (/etc/xml/expression.xml).
update-xmlcatalog --add --package expression --type system --id "http://www.entrouvert.org/expression/schemas/" --local $PREFIX/share/xml/schema/expression/catalog.xml
# Add Expression package catalog to root XML catalog (/etc/xml/catalog).
update-xmlcatalog --add --root --package expression --type system --id "http://www.entrouvert.org/expression/"