Closed
Bug 86435
Opened 24 years ago
Closed 19 years ago
Rules for XUL templates should allow inequalities
Categories
(Core Graveyard :: RDF, enhancement, P3)
Core Graveyard
RDF
Tracking
(Not tracked)
RESOLVED
FIXED
Future
People
(Reporter: rogerd, Unassigned)
References
Details
The current XUL templating mechanism only allows rules that match exactly (give
or take the presence of variables specified in bindings). This makes it
difficult or impossible to write rules that match over a range of values (e.g.
for values of an integer literal n in the range 0 <= n <= 60 - unless you are
really willing to write 61 separate <rule> clauses). It would be nice to have a
way of specifying inequalities in XUL template rule matches. A possible
implementation would be something along the following lines:
<rule>
<content uri="?uri" />
<triple subject="?uri"
predicate="http://home.netscape.com/NC-rdf#n"
object="?n" />
<comparison variable1="?n" comparator=">=" variable2="0" />
<comparison variable1="?n" comparator="<=" variable2="60" />
</rule>
A more flexible and powerful alternative would be to allow a Javascript function
to be called, taking an arbitrary number of values and returning a true or false
value: the rule does not match if false is returned, and can match (assuming all
other conditions apply) if true is returned:
<rule>
<content uri="?uri" />
<triple subject="?uri"
predicate="http://home.netscape.com/NC-rdf#n"
object="?n" />
<test script="mytest(?n)" />
</rule>
Obviously for the template to behave well the script should behave in a
consistant fashion and not use pseudorandom numbers or changing global variables
to determine its answer.
Comment 1•24 years ago
|
||
Sounds like a great idea.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P3
Target Milestone: --- → mozilla1.0
Comment 3•23 years ago
|
||
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1
(you can query for this string to delete spam or retrieve the list of bugs I've
moved)
Target Milestone: mozilla1.0 → mozilla1.0.1
Updated•23 years ago
|
Target Milestone: mozilla1.0.1 → Future
Comment 5•21 years ago
|
||
waterson left the building
Assignee: waterson → nobody
Status: ASSIGNED → NEW
QA Contact: nobody → core.rdf
Comment 6•21 years ago
|
||
We could maybe use the expression syntax from
http://www.w3.org/Submission/2004/SUBM-RDQL-20040109/
So something like <expression test="?n >= 0"/>
Comment 8•19 years ago
|
||
Comparisons are now implemented via:
<conditions>
<where subject="?name" rel="before" value="Fred"/>
</conditions>
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•