Dear all! Issue lookupNamespaceURIAlgo-1: How does one look for the default namespace? I propose the following addition to the namespace lookup algorithm: If the specifiedPrefix parameter is null then the default namespace is to be looked up: DOMString Element.lookupNamespaceURI(in DOMString specifiedPrefix) { return lookupNamespaceURI(specifiedPrefix, this); } DOMString Element.lookupNamespaceURI(in DOMString specifiedPrefix, Element el) { if ( Element's namespace URI != null and Element's prefix == specifiedPrefix and el.lookupNamespacePrefix(Element's namespace URI) == specifiedPrefix ) { return Element's namespace URI } /* ======= Start addition ====== */ else if ( specifiedPrefix == null and Element has an Attr without namespace and Attr's name == "xmlns" ) { return Attr's value } /* ========End addition ======== */ else if ( Element has an Attr and Attr's namespaceURI == "http://www.w3.org/2000/xmlns/" and Attr's prefix == "xmlns" and Attr's localName == specifiedPrefix and el.lookupNamespacePrefix(Attr's value URI) == specifiedPrefix ) { return Attr's value. } else if ( Element has an ancestor Element ) // EntityReferences may have to be skipped to get to it { return ancestorElement.lookupNamespaceURI(specifiedPrefix, el) } else { return unknown (null) } } -- StefanReceived on Wednesday, 13 March 2002 16:56:21 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 October 2009 08:24:55 GMT