Re: [xml/sgml] How to reference docbookx.dtd via file://?
Thank-you for the detailed reply!
--- Michael Smith <email@example.com> wrote:
> Note that you don't absolutely need to have a
> DOCTYPE declaration in your documents at all. There
> are lots of good reasons for not including one and
> you only strictly need it if you have a "internal
> subset" in the document (with custom entity
> definitions or whatever) -- and even then you are
> not required to include either a system ID or a
> public ID.
I also use the XEmacs psgml mode.
> In the case of XSLT processing (with xsltproc or
> whatever), your XSLT engine does not need to know
> anything about the external DTD
> at all. So if you don't have an internal subset, you
> can omit the DOCTYPE completely and everything will
> work fine.
Agreed. However, I'd have to remove it from the
document before the XSLT phase?
> 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
> your validation engine; e.g.:
Agreed. However, validating in real time is important
> xmllint --noout --postvalid \
> If you want to validate against something other than
> the standard DocBook DTD, you can replace the URI
> with either the remote or local path to the DTD you
> want to validate against.
Which works in XEmacs and xsltproc.
> 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.
> xmlcatalog --create /home/foo/custom-catalog.xml
> The add whatever URI rewrites you want to that.
> Then, put that
> catalog into your XML_CATALOG_FILES env variable;
> XML_CATALOG_FILES="/home/foo/custom-catalog.xml \
> Make sure to separate catalogs in XML_CATALOG_FILES
> with spaces, not with colons. (Reason for that is,
> the value can contain URIs that include
> protocol-specifiers with colons (e.g., file://)
> Hope that helps,
Yes, it does! I do have one final question: shouldn't
dbforms.dtd be in an xml catalog? I'm not an expert on
this, but it seems to exist only in the SGML catalog,
not the corresponding XML catalog.
> Jeff Chimene <firstname.lastname@example.org> writes:
> > --- Mark Johnson <email@example.com> wrote:
> > > Jeff Chimene wrote:
> > >> Hi,
> > >>
> > >> Is the answer to simply rewrite the
> > >> SYSTEM identifier in the DOCTYPE declaration?
> > >
> > > Yep, that'll work.
> > Yes, it did/does. I wound up edting the dbforms
> DTD to
> > reference V4.3 of the docbookx DTD.
> > >> <!DOCTYPE article
> > >> PUBLIC "-//OASIS//DTD DocBook HTML Forms Module
> > >> V1.1//EN" "dbforms.dtd"!>
> > I guess I'm surprised that the PUBLIC declaration
> > doesn't match a catalog entry. I have to admit
> > I'm quite new to XML.
> > > Since you're using XML, it gets even easier: you
> > > ditch the PUBLIC
> > > identifier altogether and simply use a DOCTYPE
> > > declaration like:
> > >
> > > <!DOCTYPE article SYSTEM "path-to-dtd">
> > Yes, that's what I wound up doing. However, it
> > requires hardcoding the DTD location - something
> > doesn't seem quite right. To make my life easier,
> > should I use update-xmlcatalog to point to the
> > DTD?
> > > THe 'file://' prefix is probably optional,
> > > on what parser
> > > you're using. Try it with/without the file://
> > > until it works for you.
> > xsltproc & XSLT including <OLINK> processing.
> > > Hope that helps.
> > >
> > > Cheers,
> > > Mark
> > >
> > > > This seems to force a match on the PUBLIC
> > > identifier.
> > > > Now, the -nonet switch doesn't produce any
> > > >
> > > > Thanks,
> > > > jec
Do you Yahoo!?
The all-new My Yahoo! - What will yours do?