This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
[docbook-apps] Bug(?) in VERSION XSL file or in resolver?
- From: Neil Roeth <neil at occamsrazor dot net>
- To: DocBook Apps <docbook-apps at lists dot oasis-open dot org>
- Cc: Larry Garfield <larry at garfieldtech dot com>
- Date: Mon, 4 Apr 2005 07:53:38 -0400
- Subject: [docbook-apps] Bug(?) in VERSION XSL file or in resolver?
- References: <42512574.6070104@garfieldtech.com>
On Apr 4, Larry Garfield (larry@garfieldtech.com) wrote:
> This looks like a bug to me, but I figured I'd check to see if anyone
> else has seen it before reporting it, as well as deciding where to
> report it.
>
> I've been having a problem with catalog files, specifically, every time
> I run an XSLT process the script pauses for a long time (~30 seconds)
> and generates a lot of network traffic before continuing. If a given
> run of Ant has two Saxon transforms, there are two separate instances of
> large network traffic.
>
> After pulling my hair out trying to figure out why my catalog file
> wasn't mapping my DTDs properly, I cranked up the verbosity in
> CatalogManager.properties and fired up Ethereal to see precisely what
> was happening. After a little testing, I found that the problem wasn't
> my catalog, but the VERSION file, located on my system in:
>
> /usr/share/xml/docbook/stylesheet/nwalsh/VERSION
>
> (I'm using Debian, which puts everything in slightly different places
> than the stock tarball does but, I believe, doesn't edit them.)
>
> Specifically, the debugging information is:
>
> [java] Resolved URI:
> [java] file:/usr/share/xml/docbook/stylesheet/nwalsh/VERSION
>
> Note the lack of a URI being resolved. VERSION line 8 reads:
>
> <xsl:param name="VERSION" select="string(document('')//fm:Version[1])"/>
>
> When the resolver gets to that line, Ethereal shows that it downloads
> the entire DocBook DTD from the Oasis web site. That's what's
> generating all that traffic.
>
> It appears that the resolver is getting to that line and trying to
> resolve a URI of ''. That doesn't match any local file, nor anything in
> my catalog file, nor anything in the DocBook SGML .cat file, so the
> resolver falls back on the only other DTD file it knows about, the one
> specified in the System portion of the input file's DTD, which is the
> URL to the Oasis web site. I also tried commenting that line out of
> VERSION, and it resulted in an error later in the script when the
> 'VERSION' variable is used (naturally) but prevented the script from
> re-downloading the entire DTD.
>
> I tried adding a <uri name="" uri="html/docbook.xsl" /> directive to my
> catalog file, as well as the same with a blank uri attribute, but in
> both cases the resolver still downloaded the whole DTD from the Oasis site.
>
> This behavior certainly seems like a bug to me, however, I'm not certain
> which component has the bug. It could be in the XSLT VERSION script for
> having document('') in the first place, or in the Apache resolver class
> for not handling such a URL "properly". I don't know off hand what the
> "proper" behavior is for this scenario, but I'm pretty sure that abusing
> the poor Oasis site isn't it. :-) I didn't see this issue mentioned in
> either project's BTS.
>
> Is this actually a bug, or is there some detail I'm missing? If it is,
> to which project should I report it, or both?
>
> Software versions in use:
> Java 1.5
> DocBook 4.3
> DocBook XSL 1.66.1
As a Debian developer, I'd want to hear about this, so I'd recommend you file
a bug with Debian. If it is an upstream bug, the Debian maintainer will
forward it appropriately.
--
Neil Roeth