This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: DTD validation question for docbook under redhat


On Tue, Aug 06, 2002 at 08:53:54AM -0700, Jason Diamond wrote:
> On Tue, 2002-08-06 at 06:18, Robert P. J. Day wrote:
>  
> >   i was playing around on the latest red hat beta -- limbo --
> > and for the fun of it, decided to see what would happen if i
> > tried to define my docbook file with an invalid DTD number, so
> > i cranked the value in the public and system identifiers up
> > to 4.3, which does not exist -- limbo comes with 4.2.
> > 
> >   no problem, xsltproc generated the HTML just fine, so i'm
> > curious, what's the algorithm for locating the proper DTD when
> > xslsproc goes to work?  as i read it, that program uses the
> > contents of the env var SGML_CATALOG_FILES, but that still
> > doesn't explain why there was no complaint about a non-existent
> > DTD file.
> 
> I noticed a similar phenomenon recently using TEI. I used xsltproc to
> transform a TEI document that referenced the TEI DTD from their website.
> The transformation succeeded even though I was currently offline and had
> yet to add their DTD to my local catalog. I simply guessed that xsltproc
> doesn't do validation and that my document didn't contain any entity
> references that needed to be replaced (or maybe it did but just silently
> skipped them).

  More precisely, libxslt/xsltproc will try to load the DTD to be conformant
to the XPath data model in which entities are substitued with their values
and attributes are defaulted. I think xsltproc will complain if it can't
load a DOCTYPE associated to the document processed (and there is such a
association) but it's not considered a fatal error.

> By the way, I believe that libxml uses /etc/xml/catalog for its XML
> catalogs. You can override this by setting $XML_CATALOG_FILES. The

  Yes,

> --help output for xmllint says that $SGML_CATALOG_FILES is only used
> when you specify --catalogs. libxml must have support for the older SGML
> catalog specification that's not enabled by default.

  Hum, it is enabled by default (I mean at configure/compilation time),
but XML Catalogs are definitely the preferred way to lookup resources locally
and has priority at libxml2 level, yes.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]