After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 59427 - Add capability to use catalogs with --nonet option for xsltproc.
Add capability to use catalogs with --nonet option for xsltproc.
Status: VERIFIED FIXED
Product: libxslt
Classification: Platform
Component: general
unspecified
Other FreeBSD
: Normal enhancement
: ---
Assigned To: Daniel Veillard
Daniel Veillard
Depends on:
Blocks:
 
 
Reported: 2001-08-23 12:32 UTC by Jun Kuriyama
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jun Kuriyama 2001-08-23 12:32:59 UTC
A xsltproc program which is included in libxslt distribution cannot
handle catalog files with --nonet option.
This patch add capability to use catalogs even if --nonet option is
specified.

--- xsltproc/xsltproc.c.orig	Tue Jul 24 06:48:24 2001
+++ xsltproc/xsltproc.c	Thu Aug 23 21:18:07 2001
@@ -78,12 +78,20 @@
 static xmlParserInputPtr
 xsltNoNetExternalEntityLoader(const char *URL, const char *ID,
                                xmlParserCtxtPtr ctxt) {
-    if (URL != NULL) {
-        if ((!xmlStrncasecmp((const xmlChar *) URL,
+    const xmlChar *resource = NULL;
+
+#ifdef LIBXML_CATALOG_ENABLED
+    if (ID != NULL)
+	resource = xmlCatalogGetPublic((const xmlChar *)ID);
+    if ((resource == NULL) && (URL != NULL))
+	resource = xmlCatalogGetSystem((const xmlChar *)URL);
+#endif
+    if (resource != NULL) {
+        if ((!xmlStrncasecmp((const xmlChar *) resource,
 		            (const xmlChar *) "ftp://", 6)) ||
-            (!xmlStrncasecmp((const xmlChar *) URL,
+            (!xmlStrncasecmp((const xmlChar *) resource,
 		            (const xmlChar *) "http://", 7))) {
-	    fprintf(stderr, "Attempt to load network entity %s \n", URL);
+	    fprintf(stderr, "Attempt to load network entity %s \n", resource);
 	    if (nonet)
 		return(NULL);
 	}
Comment 1 Daniel Veillard 2001-08-23 13:12:48 UTC
Well, thanks for the patch, I'm working on this and
it's a bit more complex than what you suggested :-)

I will definitely try to get the whole catalog thing sorted
for the next release, I think we are tryng to reach the same
goal ...

  thanks again, I hope to have a new set of releases soon,

Daniel
Comment 2 Daniel Veillard 2001-08-23 15:45:26 UTC
Okay I think I have fixed the problem for good in CVS:

http://cvs.gnome.org/bonsai/cvsview2.cgi?command=DIFF&subdir=libxslt%2Fxsltproc&file=xsltproc.c&rev1=1.8&rev2=1.9&whitespace_mode=show&diff_mode=context

This is tightly dependant on recent commits done in the libxml module
since the release is not far away, I suggest to wait for it :-)

Daniel
Comment 3 Daniel Veillard 2001-08-24 10:32:41 UTC
Should be fixed in the latest 1.0.3/2.4.3 releases,

 thanks,

Daniel