Open dysbulic opened 3 years ago
This also I am rethinking. In order to match an XPath, the entire tree needs to be created. It is not possible to do stepwise when generating the tree up from the leaves.
To use XPath, I think would require multiple passes and replacing parts of the tree that have already been generated.
More thought is required.
A user needs to be able to cogently select nodes in a DOM tree and specify an ordered list of authors allowed to control that location.
Calculating what the ruleset if for a location involves traversing the tree from the current location to the root. At each step all the pertinent rules from the list of controllers are generated using an XSLT-like pattern matching scheme.
Rules definitions could be of the format:
This is off the cuff and should be redesigned. I just want rules to be applied according to matching XPath targets. It may also be useful to look at JSON-LD capabilties for structural ideas.
When the tree is being constructed, each node is matched against all the targets of the concatenated lists of all the ancestors of the node. If the node matches the target XPath then the rules are added.
So the interface should have an input for an XPath then represent visually in the image which elements this selects.
A user should be able to specify a list of DIDs allowed to contribute rules for a given XPath.
Ideally all nodes in the tree should have a globally unique identifying attribute that would allow easy restriction of rulesets to specific parts of the tree.