Changes

Jump to: navigation, search

DOM/XPath Generator

415 bytes added, 09:07, 20 January 2006
m
Proposed IDL
DOMString generateXPath(in nsIDOMNode targetNode
in nsIDOMNode contextNode);
 
/**
* Generate a xpointer as a string.
*
* @param targetNode The node our xpath ends at.
* @param contextNode The node our xpath starts from. If null, use targetNode's owner document.
*
* @return DOMString XPointer from the context node to the target node.
*/
DOMString generateXPointer(in nsIDOMNode targetNode
in nsIDOMNode contextNode);
 
}
</pre>
== API Notes ==
The resolver of each XPathGenerator object would not be a standard document.createNSResolver(node) object. Instead, the XPathGenerator object will create and maintain the resolver independently. This will allow the generator to add additional namespaces transparently and harmlessly as needed.
Confirm
146
edits

Navigation menu