From d91befd1407ec654fcaf60fcbac1d8fc8132f293 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Wed, 14 Sep 2005 12:35:35 +0000 Subject: [PATCH] removed a superfluous second sorting of the node set on xsl:copy-of, fixes * libxslt/transform.c: removed a superfluous second sorting of the node set on xsl:copy-of, fixes #316288 * libxslt/xsltutils.c: marked xsltDocumentSortFunction as slow, obsolete and deprecated :-) Daniel --- ChangeLog | 7 +++++++ libxslt/transform.c | 3 +-- libxslt/xsltutils.c | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c7f4975..22bcaa9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Wed Sep 14 14:30:03 CEST 2005 Daniel Veillard + + * libxslt/transform.c: removed a superfluous second sorting of + the node set on xsl:copy-of, fixes #316288 + * libxslt/xsltutils.c: marked xsltDocumentSortFunction as slow, + obsolete and deprecated :-) + Sat Sep 10 14:35:06 CEST 2005 Daniel Veillard * configure.in: check environment for PYTHON, fixes #315367 diff --git a/libxslt/transform.c b/libxslt/transform.c index 5ad625f..5bd4d40 100644 --- a/libxslt/transform.c +++ b/libxslt/transform.c @@ -2924,8 +2924,7 @@ xsltCopyOf(xsltTransformContextPtr ctxt, xmlNodePtr node, #endif list = res->nodesetval; if (list != NULL) { - /* sort the list in document order */ - xsltDocumentSortFunction(list); + /* the list is already sorted in document order by XPath */ /* append everything in this order under ctxt->insert */ for (i = 0;i < list->nodeNr;i++) { if (list->nodeTab[i] == NULL) diff --git a/libxslt/xsltutils.c b/libxslt/xsltutils.c index 5c7a4cf..af762f7 100644 --- a/libxslt/xsltutils.c +++ b/libxslt/xsltutils.c @@ -776,6 +776,7 @@ xsltGetQNameURI2(xsltStylesheetPtr style, xmlNodePtr node, * @list: the node set * * reorder the current node list @list accordingly to the document order + * This function is slow, obsolete and should not be used anymore. */ void xsltDocumentSortFunction(xmlNodeSetPtr list) { -- 2.7.4