bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Bug-gnubg] New gnubg-no-gui.exe unable to read MET


From: macherius
Subject: RE: [Bug-gnubg] New gnubg-no-gui.exe unable to read MET
Date: Fri, 18 Feb 2005 16:32:48 +0100

Here's the fix for the MET loading problems in the full and the no-gui
versions.

The problem was as suspected, recent versions by default only use a new, XML
based catalog format. The catalog shipping with gnubg used the older SGML
catalog format. I tried to find out from libxml2's changelog when that
change happened, but it is hopeless.

So not to break older versions of libxml2, I put an #ifdef around validation
that compiles in the DTD validation code only for versions > 2.4.3. This is
the first version to introduce XML based catalogs. I dates back to august
2001, guess that version (or better) should be installed everywhere. Older
versions just do not validate METs anymore, not really a big loss.

As a result, "met/catalog" needs to be removed and replaced by
"met/catalog.xml" and the supplementaty "met/catalog.dtd". I've attached
both along with a patch against matchequity.c.

Ingo

> -----Original Message-----
> From: address@hidden [mailto:address@hidden 
> Sent: Friday, February 18, 2005 10:45 AM
> To: 'macherius'; 'Jon Kinsey'; 'Øystein Johansen'
> Cc: address@hidden
> Subject: RE: [Bug-gnubg] New gnubg-no-gui.exe unable to read MET
> 
> 
> Yes, it is the catalog. It is using an older format (OASIS 
> Catalog), which is not itself XML. This was common in SGML 
> and early XML times. Recently the catalog format itself was 
> XMLized (OASIS XML Calatalog). libxml2 followed that and 
> changed to the XML format. The update must have updated 
> libxml2 as well to such a degree that the old calls break. 
> Because the old calls look for non-xml catalogs, and of 
> course get parse errors.
> 
> I'm currently overhauling the XML parsing and validation code 
> to reflect the changed API and semantics.
> 
> Ingo
> 
> > -----Original Message-----
> > From: address@hidden
> > [mailto:address@hidden On Behalf 
> > Of macherius
> > Sent: Thursday, February 17, 2005 3:52 PM
> > To: 'Jon Kinsey'; 'Øystein Johansen'
> > Cc: address@hidden
> > Subject: RE: [Bug-gnubg] New gnubg-no-gui.exe unable to read MET
> > 
> > 
> > Moving the DTD wont help as log as you don't move or change
> > the catalog file along with it. I did not check the code, but 
> > I think that one is used as an indirection to find the DTD by 
> > the parser. 
> > 
> > PUBLIC "-//GNU Backgammon//DTD Match Equity Tables//EN" "met.dtd"
> > 
> > So all XML documents of public ID Gnu are instructed to use
> > "met.dtd", with a relative path to the catalog.
> > 
> > There are 2 ways to solve this:
> > 
> > 1. Make the installer change the path to the DTD during
> > installation using macro expansion, e.g. @MET@ -> c:\program 
> > files\gnubg\met\gnubg.dtd
> > 
> > 2. Not using a catalog at all, it may add just one extra
> > indirection for no effect as all it says is "the DTD is in 
> > the same directory I am and it is named met.dtd".
> > 
> > Ingo
> > 
> > 
> > > -----Original Message-----
> > > From: address@hidden
> > > [mailto:address@hidden On Behalf
> > > Of Jon Kinsey
> > > Sent: Thursday, February 17, 2005 11:01 AM
> > > To: Øystein Johansen
> > > Cc: address@hidden
> > > Subject: Re: [Bug-gnubg] New gnubg-no-gui.exe unable to read MET
> > > 
> > > 
> > > Øystein Johansen wrote:
> > > > 
> > > > I checked the getInstallDir() returns in the new function
> > > compared to
> > > > the previous implementation.
> > > > 
> > > > The new implementation returns the string of the install
> > directory,
> > > > however the earlier (before 7 Feb) implementation returned NULL
> > > > pointer? If the function returns NULL, everything else works?
> > > 
> > > Try moving (or copying) met.dtd to the parent directory. 
> There seems 
> > > to be a bug in the latest xml lib where the searching doesn't
> > > work very well.
> > > 
> > > Jon
> > > 
> > > Ps. The function used to read the install dir from the 
> registry - so 
> > > would return null if the key wasn't there.
> > > 
> > > 
> > > _______________________________________________
> > > Bug-gnubg mailing list
> > > address@hidden http://lists.gnu.org/mailman/listinfo/bug-gnubg
> > > 
> > 
> > 
> > 
> > _______________________________________________
> > Bug-gnubg mailing list
> > address@hidden http://lists.gnu.org/mailman/listinfo/bug-gnubg
> > 
> 
> 

Attachment: catalog.xml
Description: Text Data

Attachment: catalog.dtd
Description: Text Data

Attachment: xmlvalidation.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]