pike.git / lib / modules / Parser.pmod / XML.pmod / NSTree.pmod

version» Context lines:

pike.git/lib/modules/Parser.pmod/XML.pmod/NSTree.pmod:5:   //! namespace xmlfoo without complaints.      inherit Parser.XML.Tree;      //! Namespace aware node.   class NSNode {    inherit Node;       // New stuff    -  /* static */ string default_ns; +  /* protected */ string default_ns;    protected mapping(string:string) nss;    protected string element_ns;    protected mapping(string:mapping(string:string)) ns_attrs = ([]);       //! Returns the namespace in which the current element is defined in.    string get_ns() { return element_ns; }       //! Returns the default namespace in the current scope.    string get_default_ns() { return default_ns; }   
pike.git/lib/modules/Parser.pmod/XML.pmod/NSTree.pmod:160:    else    error("Unknown namespace %s.\n", ns);    }    ns = nss[ns];    m_delete(attr, name);    } else {    // FIXME: This makes the RDF-tests work,    // but is it according to the spec?    ns = element_ns;    m = name; -  if (ns_attrs[ns] && !zero_type(ns_attrs[ns][m])) { +  if (ns_attrs[ns] && has_index(ns_attrs[ns], m)) {    // We have an explicit entry already,    // so skip the implicit entry.    continue;    }    }    if(!ns_attrs[ns])    ns_attrs[ns] = ([]);    ns_attrs[ns][m] = value;    }    }