Re: [xml] XML_CATALOG_DEBUG enhancement suggestion and yet another question



It might be nice if the debug output stated what it was going to use based on that match.


  okay, I take patch, this is debug output so I'm fine extending it !

this is against 2.6.23, berifly tested with xmllint:

# diff -c catalog.c.orig catalog.c
*** catalog.c.orig      Fri Apr  1 05:15:01 2005
--- catalog.c   Wed Feb 22 11:22:45 2006
***************
*** 1648,1654 ****
                    if (xmlStrEqual(sysID, cur->name)) {
                        if (xmlDebugCatalogs)
                            xmlGenericError(xmlGenericErrorContext,
!                                   "Found system match %s\n", cur->name);
                        catal->depth--;
                        return(xmlStrdup(cur->URL));
                    }
--- 1648,1654 ----
                    if (xmlStrEqual(sysID, cur->name)) {
                        if (xmlDebugCatalogs)
                            xmlGenericError(xmlGenericErrorContext,
! "Found system match for %s so using %s\n", cur->name,cur->URL);
                        catal->depth--;
                        return(xmlStrdup(cur->URL));
                    }
# pwd
/tmp/libxml2-2.6.23


I have a typescript of a compilation of vanilla 2.6.23 under HP-UX 11.23 with the HP compilers. There are some warnings and I can pass them along if you like.

BTW, in line 1164 of catalog.c there is a compare of xmlDebugCatalogs with > 1, but it isn't clear that it can ever be > 1 except perhaps with the xmlcatalog command itself, which seems to be the only thing that calls xmlCatalogSetDebug. I'm not sure if that is a bug or not or even if I've fully understood the code, but I thought I'd mention it.

rick jones




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