garnome r6482 - in branches/gnome-2-22: . platform/libxslt platform/libxslt/files
- From: kbrae svn gnome org
- To: svn-commits-list gnome org
- Subject: garnome r6482 - in branches/gnome-2-22: . platform/libxslt platform/libxslt/files
- Date: Wed, 23 Apr 2008 19:29:13 +0100 (BST)
Author: kbrae
Date: Wed Apr 23 18:29:13 2008
New Revision: 6482
URL: http://svn.gnome.org/viewvc/garnome?rev=6482&view=rev
Log:
* platform/libxslt: Bump version to 1.1.23, required by planner.
Add upstream patch fixing broken key computations, provided by
Daniel Veillard.
Added:
branches/gnome-2-22/platform/libxslt/files/
branches/gnome-2-22/platform/libxslt/files/key-computations.patch
Modified:
branches/gnome-2-22/ChangeLog
branches/gnome-2-22/platform/libxslt/Makefile
branches/gnome-2-22/platform/libxslt/checksums
Modified: branches/gnome-2-22/platform/libxslt/Makefile
==============================================================================
--- branches/gnome-2-22/platform/libxslt/Makefile (original)
+++ branches/gnome-2-22/platform/libxslt/Makefile Wed Apr 23 18:29:13 2008
@@ -1,7 +1,10 @@
GARNAME = libxslt
-GARVERSION = 1.1.22
+GARVERSION = 1.1.23
CATEGORIES = platform
-DISTFILES = $(GARNAME)-$(GARVERSION).tar.bz2
+DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz
+PATCHFILES = key-computations.patch
+
+MASTER_SITES = ftp://xmlsoft.org/libxslt/
LIBDEPS = platform/libxml2
Modified: branches/gnome-2-22/platform/libxslt/checksums
==============================================================================
--- branches/gnome-2-22/platform/libxslt/checksums (original)
+++ branches/gnome-2-22/platform/libxslt/checksums Wed Apr 23 18:29:13 2008
@@ -1 +1,2 @@
-f2061dddea77257488601e20e2f3b5a7 download/libxslt-1.1.22.tar.bz2
+0650b23650b70ad7ce2447ee16f445a3 download/libxslt-1.1.23.tar.gz
+8a2d8da622caa4d53bf66913e09ba067 download/key-computations.patch
Added: branches/gnome-2-22/platform/libxslt/files/key-computations.patch
==============================================================================
--- (empty file)
+++ branches/gnome-2-22/platform/libxslt/files/key-computations.patch Wed Apr 23 18:29:13 2008
@@ -0,0 +1,211 @@
+--- libxslt-1.1.23/libxslt/keys.c 2008-01-24 16:23:15.000000000 +0100
++++ libxslt-1.1.23/libxslt/keys.c 2008-04-23 20:01:12.000000000 +0200
+@@ -393,11 +393,9 @@
+ const xmlChar *nameURI, const xmlChar *value) {
+ xmlNodeSetPtr ret;
+ xsltKeyTablePtr table;
+-#if 0
+ #ifdef XSLT_REFACTORED_KEYCOMP
+ int found = 0;
+ #endif
+-#endif
+
+ if ((ctxt == NULL) || (name == NULL) || (value == NULL) ||
+ (ctxt->document == NULL))
+@@ -408,23 +406,20 @@
+ "Get key %s, value %s\n", name, value);
+ #endif
+
+-#ifdef XSLT_REFACTORED_KEYCOMP
+- if (xsltInitAllDocKeys(ctxt))
+- return(NULL);
+-#endif
+-
+ table = (xsltKeyTablePtr) ctxt->document->keys;
+ while (table != NULL) {
+ if (((nameURI != NULL) == (table->nameURI != NULL)) &&
+ xmlStrEqual(table->name, name) &&
+ xmlStrEqual(table->nameURI, nameURI))
+ {
++#ifdef XSLT_REFACTORED_KEYCOMP
++ found = 1;
++#endif
+ ret = (xmlNodeSetPtr)xmlHashLookup(table->keys, value);
+ return(ret);
+ }
+ table = table->next;
+ }
+-#if 0
+ #ifdef XSLT_REFACTORED_KEYCOMP
+ if (! found) {
+ xsltStylesheetPtr style = ctxt->style;
+@@ -469,7 +464,6 @@
+ }
+ }
+ #endif
+-#endif
+ return(NULL);
+ }
+
+@@ -559,77 +553,6 @@
+ }
+ #endif
+
+-#ifdef XSLT_REFACTORED_KEYCOMP
+-/**
+- * xsltInitAllDocKeys:
+- *
+- * INTERNAL ROUTINE ONLY
+- *
+- * Check if any keys on the current document need to be computed
+- */
+-int
+-xsltInitAllDocKeys(xsltTransformContextPtr ctxt)
+-{
+- xsltStylesheetPtr style, style2;
+- xsltKeyDefPtr keyd, keyd2;
+- xsltKeyTablePtr table;
+-
+- if (ctxt == NULL)
+- return(-1);
+-
+- if (ctxt->document->nbKeysComputed == ctxt->nbKeys)
+- return(0);
+- /*
+- * TODO: This could be further optimized
+- */
+- style = ctxt->style;
+- while (style) {
+- keyd = (xsltKeyDefPtr) style->keys;
+- while (keyd != NULL) {
+- /*
+- * Check if keys with this QName have been already
+- * computed.
+- */
+- table = (xsltKeyTablePtr) ctxt->document->keys;
+- while (table) {
+- if (((keyd->nameURI != NULL) == (table->nameURI != NULL)) &&
+- xmlStrEqual(keyd->name, table->name) &&
+- xmlStrEqual(keyd->nameURI, table->nameURI))
+- {
+- break;
+- }
+- table = table->next;
+- }
+- if (table == NULL) {
+- /*
+- * Keys with this QName have not been yet computed.
+- */
+- style2 = ctxt->style;
+- while (style2 != NULL) {
+- keyd2 = (xsltKeyDefPtr) style2->keys;
+- while (keyd2 != NULL) {
+- if (((keyd2->nameURI != NULL) ==
+- (keyd->nameURI != NULL)) &&
+- xmlStrEqual(keyd2->name, keyd->name) &&
+- xmlStrEqual(keyd2->nameURI, keyd->nameURI))
+- {
+- xsltInitCtxtKey(ctxt, ctxt->document, keyd2);
+- if (ctxt->document->nbKeysComputed == ctxt->nbKeys)
+- return(0);
+- }
+- keyd2 = keyd2->next;
+- }
+- style2 = xsltNextImport(style2);
+- }
+- }
+- keyd = keyd->next;
+- }
+- style = xsltNextImport(style);
+- }
+- return(0);
+-}
+-#endif
+-
+ /**
+ * xsltInitCtxtKey:
+ * @ctxt: an XSLT transformation context
+--- libxslt-1.1.23/libxslt/pattern.c 2008-01-24 16:23:15.000000000 +0100
++++ libxslt-1.1.23/libxslt/pattern.c 2008-04-23 20:01:14.000000000 +0200
+@@ -2242,6 +2242,10 @@
+ static int
+ xsltComputeAllKeys(xsltTransformContextPtr ctxt, xmlNodePtr contextNode)
+ {
++ xsltStylesheetPtr style, style2;
++ xsltKeyDefPtr keyd, keyd2;
++ xsltKeyTablePtr table;
++
+ if ((ctxt == NULL) || (contextNode == NULL)) {
+ xsltTransformError(ctxt, NULL, ctxt->inst,
+ "Internal error in xsltComputeAllKeys(): "
+@@ -2262,7 +2266,57 @@
+ if (ctxt->document == NULL)
+ return(-1);
+ }
+- return xsltInitAllDocKeys(ctxt);
++
++ if (ctxt->document->nbKeysComputed == ctxt->nbKeys)
++ return(0);
++ /*
++ * TODO: This could be further optimized
++ */
++ style = ctxt->style;
++ while (style) {
++ keyd = (xsltKeyDefPtr) style->keys;
++ while (keyd != NULL) {
++ /*
++ * Check if keys with this QName have been already
++ * computed.
++ */
++ table = (xsltKeyTablePtr) ctxt->document->keys;
++ while (table) {
++ if (((keyd->nameURI != NULL) == (table->nameURI != NULL)) &&
++ xmlStrEqual(keyd->name, table->name) &&
++ xmlStrEqual(keyd->nameURI, table->nameURI))
++ {
++ break;
++ }
++ table = table->next;
++ }
++ if (table == NULL) {
++ /*
++ * Keys with this QName have not been yet computed.
++ */
++ style2 = ctxt->style;
++ while (style2 != NULL) {
++ keyd2 = (xsltKeyDefPtr) style2->keys;
++ while (keyd2 != NULL) {
++ if (((keyd2->nameURI != NULL) ==
++ (keyd->nameURI != NULL)) &&
++ xmlStrEqual(keyd2->name, keyd->name) &&
++ xmlStrEqual(keyd2->nameURI, keyd->nameURI))
++ {
++ xsltInitCtxtKey(ctxt, ctxt->document, keyd2);
++ if (ctxt->document->nbKeysComputed == ctxt->nbKeys)
++ return(0);
++ }
++ keyd2 = keyd2->next;
++ }
++ style2 = xsltNextImport(style2);
++ }
++ }
++ keyd = keyd->next;
++ }
++ style = xsltNextImport(style);
++ }
++ return(0);
+
+ doc_info_mismatch:
+ xsltTransformError(ctxt, NULL, ctxt->inst,
+--- libxslt-1.1.23/libxslt/xsltInternals.h 2008-01-24 16:23:15.000000000 +0100
++++ libxslt-1.1.23/libxslt/xsltInternals.h 2008-04-23 20:01:13.000000000 +0200
+@@ -1958,8 +1958,7 @@
+ xsltInitCtxtKey (xsltTransformContextPtr ctxt,
+ xsltDocumentPtr doc,
+ xsltKeyDefPtr keyd);
+-XSLTPUBFUN int XSLTCALL
+- xsltInitAllDocKeys (xsltTransformContextPtr ctxt);
++
+ #ifdef __cplusplus
+ }
+ #endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]