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]

[docbook-apps] Re: DOCTYPE Windows path for file attribute


>>>>> "Don Adams" <dga@sgi.com>:

> I was trying to get the Windows versions of xmllint, xsltproc, and saxon
> working with my local version of the DocBook DTD.  No matter
> what I tried, none of the applications would find the DTD.

> It turns out that I didn't notice that you need three slashes after
> "file:" in the DOCTYPE declaration in order for the path to work in
> Windows.

That's the correct interpretation of the file URL.  The reason for
this, is that the position beteween the two leading slashes and the
third slash, is meant to hold an IP number, or a DNS name.

Of course, there are lots of different interpretations of the file
URL, by different applications.

> For example: <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML
> V4.2//EN" "file:///H:/DocBook/docbook4.2/docbookx.dtd">

My advice to you, is not to use the system identifier to locate the
DTD, because that ties your documents to a particular directory
structure on a particular computer.

The above DOCTYPE declaration could be made to work on a different
Windows machine, by using the exact same path to the DTD, but would be
hard to get to work on a linux or UNIX machine, or on a Mac.

With the tools you mention (xsltproc, xmllint, and saxon), suggest you
use XML catalogs to locate the DTDs:
	http://www.oasis-open.org/committees/entity/spec-2001-08-06.html

Perhaps set the system identifier to the canonical URL for the DTD?

The xsltproc and xmllint programs are able to use XML Catalogs out of
the box, saxon needs Norm Walsh's catalog resolver,  which can be
downloaded from apache commons.  See Bob Stayton's book for more
information on this:
	http://www.sagehill.net/docbookxsl/Catalogs.html


To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.


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