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] Bug(?) in VERSION XSL file or in resolver?


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

--
Larry Garfield			AIM: LOLG42
larry@garfieldtech.com		ICQ: 6817012

"If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it." -- Thomas Jefferson


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