DOM/XPath Generator: Difference between revisions

m
no edit summary
No edit summary
 
mNo edit summary
Line 1: Line 1:
This page is to propose a XPathGenerator global constructor function for  
This page is to propose a XPathGenerator global constructor function for  
returning a XPath string leading from the context node to the target node.  Each
returning a XPath string leading from the context node to the target node.  Each
instance would be a XPCOM component, providing features for modifying the desired
instance would be a XPCOM component, providing features for modifying the desired XPath value, and a namespace resolver which corresponds to the XPath.
XPath value, and a namespace resolver which corresponds to the XPath.


A consumer might use the code in the following manner:
A consumer might use the code in the following manner:
Line 102: Line 101:


The bitwise flags are currently largely undefined, with the intent being for developers to add flags as needed.  For instance, if a developer wants to ignore anonymous-to-non-anonymous content boundaries, they can add a flag for it, implement it, and offer a patch.  While a patch awaits review or if it has been rejected, the upper 8 bits of the searchFlags number may be used privately for the same feature.  The official XPathGenerator implementation must not use any of these eight flags for any purpose.
The bitwise flags are currently largely undefined, with the intent being for developers to add flags as needed.  For instance, if a developer wants to ignore anonymous-to-non-anonymous content boundaries, they can add a flag for it, implement it, and offer a patch.  While a patch awaits review or if it has been rejected, the upper 8 bits of the searchFlags number may be used privately for the same feature.  The official XPathGenerator implementation must not use any of these eight flags for any purpose.
Implementation: [https://bugzilla.mozilla.org/show_bug.cgi?id=319768 Bug 319768]
Confirmed users
146

edits