I was also shooting from the hip for things I'm interested in, here. I'm not sure it matters. But, if on scanning, you pick relevant rules to apply based on the path to a node, then I could see some trickiness on having to consider both the top down and the bottom up paths to a node.
Siblings.., I don't think has this problem. Not sure why I thought it might.
And javascript is ultimately a different topic. So I wasn't worried about that here.