假设我有三条规则:
- 当Object的foo属性为1时,输出"foo">
- 当Object的条形属性为1时;条">
- 当Object的foo属性为1并且bar属性为1时;foo和bar两者">
在这种情况下,alpha节点的结构会是什么样子?我见过一些例子,给定规则1和2,它可能看起来像:
foo == 1 - "foo"
root<
bar == 1 - "bar"
并且,给定3:
root - foo == 1 - bar == 1 - "both foo and bar"
并且,给定3和1:
"foo"
root - foo == 1 <
bar == 1 - "both foo and bar"
给定3、2和1,它会看起来像吗:
foo == 1 - "foo"
root <
"bar"
bar == 1 <
foo == 1 - "both foo and bar"
或
foo == 1 - "foo"
/
root-- bar == 1 - "bar"
foo == 1 - bar == 1 - "both foo and bar"
或者其他方式?
如果您共享节点并保留测试属性的顺序,则如下所示:
bar == 1 - "bar"
root <
"foo"
foo == 1 <
bar == 1 - "both foo and bar"