[xml/sgml] How to reference docbookx.dtd via file://?

Jeff Chimene jeffchimene@yahoo.com
Thu, 2 Dec 2004 18:06:47 -0800 (PST)


--- Michael Smith <smith@xml-doc.org> wrote:

> Jeff Chimene <jeffchimene@yahoo.com> writes:
> 
> > Hi Mark,
> > 
> > Thank-you for the detailed reply!
> > 
> > --- Michael Smith <smith@xml-doc.org> wrote:
> 
> [...]
> 
> > I also use the XEmacs psgml mode.
> 
> Ah. Well, you might want to think about moving to
> James Clark's nxml. Debian package name is
> "nxml-mode". Home page is:

<snip>

Right. I've been playing with nxml. However, I haven't
figured out how to get it to tell me which tags are
valid when. XEmacs will display them in a popup
window. Also, it lists all valid attributes on
request. I haven't figured out how to get nxml to
replicate that service.

Also, nxml doesn't support the same elision service of
XEmacs; although I think I can configure nxml mode to
tell it to elide structures beside <article> and
<section>. 

What else...

XEmacs is smarter about indenting tags. I've noticed
that nxml isn't as good about indentation when a tag
is open.

I use Emacs/nxml when working on RelaxNG schemas &
instance documents. For that purpose, it's far
superior to XEmacs/psgml. However, docbook.dtd ==>
onechunk.xsl seems to be in better shape than the
"gin" revision of docbook.rnc ==> onechunk.xsl

<snip>

> > Agreed. However, I'd have to remove it from the
> > document before the XSLT phase?
> 
> Or pipe it through sed or something to filter it out
> at runtime.
> 
>   xmllint xmlcatalog_man.xml | sed
> 's/^<!DOCTYPE[^>]*>$//' | xsltproc custom.xsl -

Interesting point. I've started using Make to generate
the <olink> database and HTML files. I'll check this
out.
 
> > > And for the case of doing validation, you can
> > > validate DOCTYPE-less documents just by
> explicitly 
> > > specifying the URI for the DTD on the command
> line
> > to
> > > your validation engine; e.g.:
> > 
> > Agreed. However, validating in real time is
> important
> > to me.
> 
> Then you should definitely try nxml. It does true
> real-time automatic validation in the background. If

> something in the part of the document that is 
> currently displayed is invalid, you will know 
> instantly.

When I can figure out how to see all valid elements
and attributes, that will mostly eliminate psgml mode.
However, source code elision and smart indenting are
quite important.

> > > And you don't necessarily need to use 
> > > update-xmlcatalog to add custom catalog entries;
> 
> > > you can use xmlcatalog directly to create
> > > a custom catalog
> > 
> > OK, I'll use that instead. The Debian docs seem to
> > deprecate xml-catalog; which is why I mentioned
> that
> > instead of update-xmlcatalog.
> 
> Actually, I had never used update-xmlcatalog
> directly and I hadn't bothered to check the doc. 
> Looking at it now, I see it has --local
> --file switches that'll let you update a local
> catalog. So you can use that also. I guess my point 
> about it just that you can create local catalogs and

> use those instead of updating the system catalogs.
> I personally prefer not to touch the system catalogs
> directly, to prevent conflicting with or overwriting
> entries that a package may add.

Agreed. An application-specific catalog is on my
agenda. 

Cheers,
jec


		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com