[libxslt] Remove unused variable in xsltGenerateIdFunction



commit 5da60eb44ce4100ce314d861c0f3560265b06081
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Tue Feb 25 15:08:16 2014 +0100

    Remove unused variable in xsltGenerateIdFunction
    
    doc isn't used as of commit "Fix generate-id() to avoid generating the
    same ID".

 libxslt/functions.c |   16 ----------------
 1 files changed, 0 insertions(+), 16 deletions(-)
---
diff --git a/libxslt/functions.c b/libxslt/functions.c
index dc61994..6448bde 100644
--- a/libxslt/functions.c
+++ b/libxslt/functions.c
@@ -665,7 +665,6 @@ xsltGenerateIdFunction(xmlXPathParserContextPtr ctxt, int nargs){
     xmlXPathObjectPtr obj = NULL;
     long val;
     xmlChar str[30];
-    xmlDocPtr doc;
 
     if (nargs == 0) {
        cur = ctxt->context->node;
@@ -698,21 +697,6 @@ xsltGenerateIdFunction(xmlXPathParserContextPtr ctxt, int nargs){
        ctxt->error = XPATH_INVALID_ARITY;
        return;
     }
-    /*
-     * Okay this is ugly but should work, use the NodePtr address
-     * to forge the ID
-     */
-    if (cur->type != XML_NAMESPACE_DECL)
-        doc = cur->doc;
-    else {
-        xmlNsPtr ns = (xmlNsPtr) cur;
-
-        if (ns->context != NULL)
-            doc = ns->context;
-        else
-            doc = ctxt->context->doc;
-
-    }
 
     if (obj)
         xmlXPathFreeObject(obj);


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