1addXMLCatalogs () { 2 local d i 3 # ‘xml/dtd’ and ‘xml/xsl’ are deprecated. Catalogs should be 4 # installed underneath ‘share/xml’. 5 for d in $1/share/xml $1/xml/dtd $1/xml/xsl; do 6 if [ -d $d ]; then 7 for i in $(find $d -name catalog.xml); do 8 XML_CATALOG_FILES+=" $i" 9 done 10 fi 11 done 12} 13 14if [ -z "${libxmlHookDone-}" ]; then 15 libxmlHookDone=1 16 17 # Set up XML_CATALOG_FILES. An empty initial value prevents 18 # xmllint and xsltproc from looking in /etc/xml/catalog. 19 export XML_CATALOG_FILES='' 20 if [ -z "$XML_CATALOG_FILES" ]; then XML_CATALOG_FILES=" "; fi 21 addEnvHooks "$hostOffset" addXMLCatalogs 22fi