rpms/libxslt/F-9 key.patch,NONE,1.1 libxslt.spec,1.50,1.51
Daniel Veillard (veillard)
fedora-extras-commits at redhat.com
Tue Apr 22 15:36:31 UTC 2008
- Previous message (by thread): rpms/unuran/devel .cvsignore, 1.3, 1.4 sources, 1.3, 1.4 unuran.spec, 1.3, 1.4
- Next message (by thread): rpms/jd/F-9 .cvsignore, 1.229, 1.230 jd.spec, 1.265, 1.266 sources, 1.230, 1.231
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: veillard
Update of /cvs/pkgs/rpms/libxslt/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7722
Modified Files:
libxslt.spec
Added Files:
key.patch
Log Message:
Reverted one of the keying patches from 1.1.23, Daniel
key.patch:
--- NEW FILE key.patch ---
Index: libxslt/keys.c
===================================================================
--- libxslt/keys.c (revision 1450)
+++ libxslt/keys.c (revision 1451)
@@ -393,9 +393,11 @@ xsltGetKey(xsltTransformContextPtr ctxt,
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))
@@ -406,20 +408,23 @@ xsltGetKey(xsltTransformContextPtr ctxt,
"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;
@@ -464,6 +469,7 @@ xsltGetKey(xsltTransformContextPtr ctxt,
}
}
#endif
+#endif
return(NULL);
}
@@ -553,6 +559,77 @@ xsltEvalXPathKeys(xsltTransformContextPt
}
#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
Index: libxslt/xsltInternals.h
===================================================================
--- libxslt/xsltInternals.h (revision 1450)
+++ libxslt/xsltInternals.h (revision 1451)
@@ -1958,7 +1958,8 @@ XSLTPUBFUN int XSLTCALL
xsltInitCtxtKey (xsltTransformContextPtr ctxt,
xsltDocumentPtr doc,
xsltKeyDefPtr keyd);
-
+XSLTPUBFUN int XSLTCALL
+ xsltInitAllDocKeys (xsltTransformContextPtr ctxt);
#ifdef __cplusplus
}
#endif
Index: libxslt/pattern.c
===================================================================
--- libxslt/pattern.c (revision 1450)
+++ libxslt/pattern.c (revision 1451)
@@ -2242,10 +2242,6 @@ xsltAddTemplate(xsltStylesheetPtr style,
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(): "
@@ -2266,57 +2262,7 @@ xsltComputeAllKeys(xsltTransformContextP
if (ctxt->document == 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);
+ return xsltInitAllDocKeys(ctxt);
doc_info_mismatch:
xsltTransformError(ctxt, NULL, ctxt->inst,
Index: libxslt.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libxslt/F-9/libxslt.spec,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- libxslt.spec 11 Apr 2008 09:51:28 -0000 1.50
+++ libxslt.spec 22 Apr 2008 15:35:37 -0000 1.51
@@ -1,7 +1,7 @@
Summary: Library providing the Gnome XSLT engine
Name: libxslt
Version: 1.1.23
-Release: 1%{?dist}%{?extra_release}
+Release: 2%{?dist}%{?extra_release}
License: MIT
Group: Development/Libraries
Source: ftp://xmlsoft.org/XSLT/libxslt-%{version}.tar.gz
@@ -15,6 +15,7 @@
Prefix: %{_prefix}
Docdir: %{_docdir}
Patch0: multilib.patch
+Patch1: key.patch
%description
This C library allows to transform XML files into other XML files
@@ -56,6 +57,7 @@
%prep
%setup -q
%patch0 -p1
+%patch1 -R -p0
%build
%configure
@@ -122,6 +124,10 @@
%doc python/tests/*.xsl
%changelog
+* Mon Apr 21 2008 Daniel Veillard <veillard at redhat.com> 1.1.23-2.fc9
+- revert a key initialization patch from 1.1.23 which seems broken
+ see rhbz#442097
+
* Tue Apr 8 2008 Daniel Veillard <veillard at redhat.com> 1.1.23-1.fc9
- upstream release 1.1.23
- bugfixes
- Previous message (by thread): rpms/unuran/devel .cvsignore, 1.3, 1.4 sources, 1.3, 1.4 unuran.spec, 1.3, 1.4
- Next message (by thread): rpms/jd/F-9 .cvsignore, 1.229, 1.230 jd.spec, 1.265, 1.266 sources, 1.230, 1.231
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list