GNOME Bugzilla – Bug 121984
Dispspec detection doesn't use DTDs yet
Last modified: 2009-08-15 18:40:50 UTC
In cong_dispspec_registry_get_appropriate_dispspec we ought to detect for matching DTDs first of all.
On Thu, Oct 16, 2003 at 09:54:53AM +0100, Jeff Martin wrote: > This is related to this bug. Conglomerate determines which dispspec to > use based purely on the root node, so at the moment you can't really use > different documents with the same root node. > > http://bugzilla.gnome.org/show_bug.cgi?id=121984 > > We should probably look at this fairly sharpish. > > On Thu, 2003-10-16 at 02:55, Boris Goldowsky wrote: > > I'm trying to write a dispspec for the Apache documentation DTD (ie, for > > use with Forrest -- see http://xml.apache.org/forrest/). I put the > > document.xds file in .../share/conglomerate/dispspecs/document.xds . > > Unfortunately, whenever I open an xml file that uses this DTD, > > Conglomerate uses the "readme" dispspec to render it. The only way I've > > een able to fix this is by changing the top-level tag in the document > > to, say, apache-document, and saving the dispspec as apache-document.xds > > -- obviously not a fix that will work in practice. > > > > What obvious thing am I missing here? Shouldn't the top-level tag > > <document> select document.xds rather than readme.xds? > >
raising severity from trivial to normal
Created attachment 20743 [details] [review] Patch to use DTD when selecting dispspecs
I've already fixed this in CVS; I've supplied the patch since anon cvs is so slow and this is blocking the work on Apache Forrest.
Created attachment 20747 [details] [review] Proposed patch to fix this
OK David, you beat me to it by about 2 hours - but at least I learned something about how the pieces fit together. My patch also checks system ID as well as public ID, which I think is a good idea since many documents in the wild only have one or the other specified.
reopening, to prevent good idea getting lost ...
I've taken the second half of Boris's patch and applied it to CVS
okay.
Perhaps the file format created by James Clark for locating RNG schemas for the nXML emacs major mode, could be used for associating documents and dispspecs? It gives many mechanisms for detecting the document type. http://groups.yahoo.com/group/emacs-nxml-mode/message/259