|
|
“RE: XUL Templates with Multiple Rules” |
|||
| From: | Seth Dillingham | In Response To: | 4365 RE: XUL Templates with Multiple Rules |
| Date Posted: | Tuesday, November 2, 2004 11:15:16 AM | Replies: | 0 |
| Enclosures: | None. | ||
Thanks for responding, Neil, especially as I didn't tell you about my article so I'm not even sure how you knew about it already. ;-)
(To everybody else: Neil is one of the XUL/Mozilla supermen, and is the man behind the curtain at XUL Planet.)
On 11/2/04, Neil Deakin said:
>Only the container and member variables are required to be the >same in all rules. The container variable is the one defined in ><content uri="?blah"> and the member variable is the uri="?fred" >in the action. They both need to be the same variables in all the >rules due to the manner in which the template builder connects the >rules for rebuilding. (when the rdf changes, the builder only >examines the parts of the rules that might be affected.) > >Other variables besides those two can be whatever you want and can >be different in every rule.
I understand what you're saying, but in practice doesn't this mean that you need to use the same variables in every rule?
Since the member variables need to be the same in all the rules, and the member variables are initialized in the conditions, what can you do with different variable names?
Consider the examples I used. The first rule uses ?groups, ?group, ?text, and ?groupid variables in the conditions, and three of them are used as member variables: ?group, ?text, and ?groupid.
What you're saying is that in the second rule, I could use ?files instead of ?groups, but all the rest would have to remain the same. Right?
Obviously, that means one must use very generic variable names, or have variables in the secondary rules which do not at all describe the data they contain.
Have I misunderstood anything?
Seth
There are no trackbacks.
|
TruerWords
is Seth Dillingham's personal web site. Read'em and weep, baby. |