~ubuntu-branches/ubuntu/natty/libxslt/natty

« back to all changes in this revision

Viewing changes to libxslt/transform.c

  • Committer: Bazaar Package Importer
  • Author(s): Mike Hommey
  • Date: 2006-11-21 00:42:01 UTC
  • Revision ID: james.westby@ubuntu.com-20061121004201-7p50jpdm38qrmroy
Tags: 1.1.18-2
* libxslt/transform.c:
  + Don't lose context namespaces in some recursive cases. Closes: #399010
  + Took patch from upstream CVS for copy-of issue with entities.
    Closes: #397395
* Set urgency to high since we fix RC regressions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1074
1074
            } else
1075
1075
                copyNs = NULL;
1076
1076
        }
 
1077
        /*
 
1078
         * If attribute has a value, we need to copy it (watching out
 
1079
         * for possible entities)
 
1080
         */
1077
1081
        if (attr->children)
1078
 
            value = xmlNodeListGetString(attr->doc, attr->children, 1);
 
1082
            value = xmlNodeListGetString(attr->doc, attr->children, 0);
1079
1083
        /*
1080
1084
        * REVISIT: I think xmlNewDocProp() is the only attr function
1081
1085
        * which does not eval if the attr is of type ID. This is good,
4634
4638
    xmlNodePtr cur, delNode = NULL, oldContextNode;    
4635
4639
    xmlNodeSetPtr list = NULL, oldList;
4636
4640
    xsltStackElemPtr withParams = NULL;
4637
 
    int oldXPProximityPosition, oldXPContextSize;
 
4641
    int oldXPProximityPosition, oldXPContextSize, oldXPNsNr;
4638
4642
    const xmlChar *oldMode, *oldModeURI;
4639
4643
    xmlDocPtr oldXPDoc;
4640
4644
    xsltDocumentPtr oldDocInfo;
4641
4645
    xmlXPathContextPtr xpctxt;
 
4646
    xmlNsPtr oldXPNamespaces;
4642
4647
 
4643
4648
    if (comp == NULL) {
4644
4649
        xsltTransformError(ctxt, NULL, inst,
4672
4677
    oldXPContextSize = xpctxt->contextSize;
4673
4678
    oldXPProximityPosition = xpctxt->proximityPosition;
4674
4679
    oldXPDoc = xpctxt->doc;
 
4680
    oldXPNsNr = xpctxt->nsNr;
 
4681
    oldXPNamespaces = xpctxt->namespaces;
4675
4682
 
4676
4683
    /*
4677
4684
    * Set up contexts.
4989
4996
    /*
4990
4997
    * Restore context states.
4991
4998
    */
 
4999
    xpctxt->nsNr = oldXPNsNr;
 
5000
    xpctxt->namespaces = oldXPNamespaces;
4992
5001
    xpctxt->doc = oldXPDoc;
4993
5002
    xpctxt->contextSize = oldXPContextSize;
4994
5003
    xpctxt->proximityPosition = oldXPProximityPosition;