This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: Re: DOCBOOK: Re: website dtd newbie
- From: Bob Stayton <bobs at caldera dot com>
- To: alexl at socrates dot berkeley dot edu
- Cc: docbook-apps at lists dot oasis-open dot org
- Date: Sat, 24 Nov 2001 02:22:21 -0800 (PST)
- Subject: Re: DOCBOOK-APPS: Re: DOCBOOK: Re: website dtd newbie
- List-id: <docbook-apps.lists.oasis-open.org>
> From: Alex Lancaster <alexl@socrates.berkeley.edu>
>
> >>>>> "-" == Bob Stayton <bobs@caldera.com> writes:
>
> >> Should this be expected to work for SGML catalogs? I tried the
> >> following mapping of system id to system id (analogous to the XML
> >> version) in my SGML catalog:
> >>
> >> SYSTEM
> >> "http://docbook.sourceforge.net/release/xsl/snapshot/html/docbook.xsl"
> >> "file:///home/alex/packages/share/sgml/docbook-xsl-1.46-experimental"
> >>
> >> Is this the correct syntax?
>
> -> No, it looks like you are mapping a URI for a specific file to a
> -> directory. You need to map it to the exact stylesheet file you are
> -> importing.
>
> Whoops, well spotted, my mistake, I should have spotted that (it was
> pretty late at night). Nevertheless if I change it to the correct
> location, I still get the error:
>
> SGML_CATALOG_FILES=/etc/sgml/catalog:catalog xsltproc --parsection.autolabel 1 --param use.extensions 1 --catalogs --nonet -o biostat_rhtml html.xsl biostat_ref.xml
> Attempt to load network entity
> http://docbook.sourceforge.net/release/xsl/snapshot/html/docbook.xsl
> compilation error: file html.xsl line 8 element import
> xsl:import : unable to load http://docbook.sourceforge.net/release/xsl/snapshot/html/docbook.xsl
>
> Here is my full catalog:
>
> OVERRIDE YES
> PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
> "/usr/share/sgml/docbook/xml-dtd-4.1.2/docbookx.dtd"
>
> OVERRIDE YES
> SYSTEM
> "http://docbook.sourceforge.net/release/xsl/snapshot/html/docbook.xsl"
> "/home/alex/packages/share/sgml/docbook-xsl-1.46-experimental/html/docbook.xsl"
>
> The error in both cases, however, is that it can't load the network
> entity, which it should never attempt to do if the catalog is using
> the local system id. If it was simply the case that my system id was
> wrong (as in my previous post), I would have expected an error like:
>
> Attempt to load
> /home/alex/packages/share/sgml/docbook-xsl-1.46-experimental
> compilation error: file html.xsl line 8 element import
> xsl:import : unable to load /home/alex/packages/share/sgml/docbook-xsl-1.46-experimental
>
> -> When I use your example with a customization like yours, it works
> -> with xsltproc. But be aware that there was a version of xsltproc
> -> (actually libxml2) that was broken regarding catalogs. I'm using
> -> libxml2-2.4.10 and libxslt-1.0.7.
>
> Interesting, yes I had heard abou that, I, too, am using these exact
> version:
>
> [alex@delpy Swarm]$ rpm -q libxml2 libxslt
> libxml2-2.4.10-2
> libxslt-1.0.7-4
>
> Could you post the customization layer you are using? I take it you
> are using the `--nonet' option to xsltproc to specifically *prevent*
> it from loading any files from the net?
Oops, my turn to admit a mistake. I didn't use --nonet, so
I was getting network resolution without catalog usage. Duh.
But now I remember how I did it before. I don't
think you can resolve <xsl:import> hrefs with an SGML
catalog, only with an XML catalog. XML catalogs are
described at:
http://www.oasis-open.org/committees/entity/spec.html
A uri-to-uri mapping like you want but inside an XML
catalog looks like this:
<!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" prefer="public">
<uri
name="http://docbook.sourceforge.net/release/xsl/snapshot/html/docbook.xsl"
uri="file:///home/docadmin/docbook-xsl-1.45/html/docbook.xsl"/>
</catalog>
This catalog works with --nonet to resolve the an import href
to a local file.
bobs
Bob Stayton 400 Encinal Street
Publications Architect Santa Cruz, CA 95060
Technical Publications voice: (831) 427-7796
Caldera International, Inc. fax: (831) 429-1887
email: bobs@caldera.com