/[gentoo-src]/build-docbook-catalog/build-docbook-catalog
Gentoo

Diff of /build-docbook-catalog/build-docbook-catalog

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.3 Revision 1.4
1#!/bin/bash 1#!/bin/bash
2# $Header: /var/cvsroot/gentoo-src/build-docbook-catalog/build-docbook-catalog,v 1.3 2008/09/22 13:43:02 flameeyes Exp $ 2# $Header: /var/cvsroot/gentoo-src/build-docbook-catalog/build-docbook-catalog,v 1.4 2008/09/22 14:10:17 flameeyes Exp $
3# 3#
4# build-docbook-catalog: populate /etc/xml/docbook based in 4# build-docbook-catalog: populate /etc/xml/docbook based in
5# installed docbook-xml-dtd versions. 5# installed docbook-xml-dtd versions.
6# 6#
7# Copyright 2004 Gentoo Foundation 7# Copyright 2004 Gentoo Foundation
107 verb " Populating ${ROOTCATALOG} with DTD delegates to ${CATALOG}" 107 verb " Populating ${ROOTCATALOG} with DTD delegates to ${CATALOG}"
108 xmlcatalog --noout --add "delegatePublic" "-//OASIS//ENTITIES DocBook XML" "file://${CATALOG}" ${ROOTCATALOG} 108 xmlcatalog --noout --add "delegatePublic" "-//OASIS//ENTITIES DocBook XML" "file://${CATALOG}" ${ROOTCATALOG}
109 xmlcatalog --noout --add "delegatePublic" "-//OASIS//DTD DocBook XML" "file://${CATALOG}" ${ROOTCATALOG} 109 xmlcatalog --noout --add "delegatePublic" "-//OASIS//DTD DocBook XML" "file://${CATALOG}" ${ROOTCATALOG}
110 xmlcatalog --noout --add "delegateSystem" "http://www.oasis-open.org/docbook/" "file://${CATALOG}" ${ROOTCATALOG} 110 xmlcatalog --noout --add "delegateSystem" "http://www.oasis-open.org/docbook/" "file://${CATALOG}" ${ROOTCATALOG}
111 xmlcatalog --noout --add "delegateURI" "http://www.oasis-open.org/docbook/" "file://${CATALOG}" ${ROOTCATALOG} 111 xmlcatalog --noout --add "delegateURI" "http://www.oasis-open.org/docbook/" "file://${CATALOG}" ${ROOTCATALOG}
112 xmlcatalog --noout --add "delegateSystem" "http://docbook.sourceforge.net/release/xsl/" "file://${CATALOG}" ${ROOTCATALOG}
113 xmlcatalog --noout --add "delegateURI" "http://docbook.sourceforge.net/release/xsl/" "file://${CATALOG}" ${ROOTCATALOG}
114 112
115 # entities pointer 113 # entities pointer
116 verb " Populating ${ROOTCATALOG} with ISO entities delegate to ${CATALOG}" 114 verb " Populating ${ROOTCATALOG} with ISO entities delegate to ${CATALOG}"
117 xmlcatalog --noout --add "delegatePublic" "ISO 8879:1986" "file://${CATALOG}" ${ROOTCATALOG} 115 xmlcatalog --noout --add "delegatePublic" "ISO 8879:1986" "file://${CATALOG}" ${ROOTCATALOG}
118} 116}
272 return 1 270 return 1
273 fi 271 fi
274 272
275 # Populate catalog with XSL entries 273 # Populate catalog with XSL entries
276 echo "Found DocBook XSL stylesheets (${type}) in ${xsldir}" 274 echo "Found DocBook XSL stylesheets (${type}) in ${xsldir}"
275
276 verb " Populating ${ROOTCATALOG} with XSL delegations"
277 xmlcatalog --noout --add "delegateSystem" "http://docbook.sourceforge.net/release/${type}/" "file://${CATALOG}" ${ROOTCATALOG}
278 xmlcatalog --noout --add "delegateURI" "http://docbook.sourceforge.net/release/${type}/" "file://${CATALOG}" ${ROOTCATALOG}
279
277 verb " Populating ${CATALOG} with XSL stylesheets" 280 verb " Populating ${CATALOG} with XSL stylesheets"
278
279 # HACK: This is a totally arbitrary subset, either it should
280 # be reduced to just current or it should be expanded.
281 for version in current 1.39 1.40 1.41 1.42 1.43 1.44 1.45 1.46 1.47 \
282 1.48 1.49 1.50
283 do
284 xmlcatalog --noout --add "rewriteSystem" "http://docbook.sourceforge.net/release/${type}/${version}" "file://${xsldir}" ${CATALOG} 281 xmlcatalog --noout --add "rewriteSystem" "http://docbook.sourceforge.net/release/${type}/current" "file://${xsldir}" ${CATALOG}
285 xmlcatalog --noout --add "rewriteURI" "http://docbook.sourceforge.net/release/${type}/${version}" "file://${xsldir}" ${CATALOG} 282 xmlcatalog --noout --add "rewriteURI" "http://docbook.sourceforge.net/release/${type}/current" "file://${xsldir}" ${CATALOG}
286 done
287} 283}
288 284
289# Call the main routine 285# Call the main routine
290main "$@" 286main "$@"

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.20