2007年 04月 15日

xmllint catalog

http://www.akatsukinishisu.net/wiki.cgi?XSLT%A4%C7catalog_file%A4%F2%BB%C8%A4%A6
おお
xmllint では (Mac ではデフォルトではいっているはず。たぶん)

       --catalogs
              Use the SGML catalog(s) from SGML_CATALOG_FILES. Otherwise XML
              catalogs starting from /etc/xml/catalog are used by default.

で、--catalogs つけないときは /etc/xml/catalog をよむみたいだ

$ cd /etc
$ sudo mkdir xml
$ cd xml
$ sudo vim catalog
$ cat catalog
<?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">
  <public publicId="-//W3C//DTD XHTML 1.1//EN"
    uri="xhtml11-flat.dtd"/>
  <public publicId="-//W3C//DTD XHTML 1.0 Strict//EN"
    uri="xhtml1-strict.dtd"/>
  <public publicId="-//W3C//DTD XHTML 1.0 Transitional//EN"
    uri="xhtml1-transitional.dtd"/>
  <public publicId="-//W3C//DTD XHTML 1.0 Frameset//EN"
    uri="xhtml1-frameset.dtd"/>
  <public publicId="-//W3C//DTD XHTML Basic 1.0//EN"
    uri="xhtml-basic10-f.dtd"/>
</catalog>
$ sudo wget http://www.w3.org/TR/xhtml11/DTD/xhtml11-flat.dtd
$ sudo wget http://www.w3.org/TR/xhtml-basic/xhtml-basic10-f.dtd
$ sudo wget http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-strict.dtd
$ sudo wget http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-transitional.dtd
$ sudo wget http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-frameset.dtd
$ sudo wget http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml-lat1.ent
$ sudo wget http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml-special.ent
$ sudo wget http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml-symbol.ent

これやらないと激おそい。