content/xul/templates/tests/chrome/test_tmpl_bindingsmultiple.xul

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:926d698fedd9
1 <?xml version="1.0"?>
2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
3 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
4
5 <!--
6 bindings - multiple
7 -->
8
9 <window title="XUL Template Tests" width="500" height="600"
10 onload="test_template();"
11 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
12 <script type="application/javascript"
13 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
14
15 <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
16
17 <data id="output">
18 <button id="http://www.some-fictitious-zoo.com/arachnids" container="true" empty="false" label="Arachnids "/>
19 <button step="-2" id="http://www.some-fictitious-zoo.com/birds" container="true" empty="false" label="Birds Sarah "/>
20 <button step="2" id="http://www.some-fictitious-zoo.com/birds" container="true" empty="false" label="Birds Sarah Yarmouth"/>
21 <button step="-1" id="http://www.some-fictitious-zoo.com/crustaceans" container="true" empty="true" label="Crustaceans Robert Sanderson"/>
22 <button step="1" id="http://www.some-fictitious-zoo.com/crustaceans" container="true" empty="true" label="Crustaceans Robert "/>
23 <button id="http://www.some-fictitious-zoo.com/fish" container="true" empty="false" label="Fish "/>
24 <button id="http://www.some-fictitious-zoo.com/mammals" container="true" empty="false" label="Mammals "/>
25 <button step="-1" id="http://www.some-fictitious-zoo.com/reptiles" container="true" empty="false" label="Reptiles Robert Sanderson"/>
26 <button step="1" id="http://www.some-fictitious-zoo.com/reptiles" container="true" empty="false" label="Reptiles Robert "/>
27 </data>
28
29 <script src="templates_shared.js"/>
30
31 <script>
32 <![CDATA[
33 SimpleTest.waitForExplicitFinish();
34
35 var testid ="bindings - multiple";
36 var queryType = "rdf";
37 var isTreeBuilder = false;
38 var needsOpen = false;
39 var notWorkingYet = false;
40 var notWorkingYetDynamic = false;
41 var expectedOutput = document.getElementById("output");
42
43 var changes = [
44 // step 1
45 function(targetds, root) {
46 targetds.Unassert(RDF.GetResource(ZOO_NS + 'humans/robert'),
47 RDF.GetResource(ZOO_NS + 'rdf#lastName'),
48 RDF.GetLiteral('Sanderson'), true);
49 },
50 // step 2
51 function(targetds, root) {
52 targetds.Assert(RDF.GetResource(ZOO_NS + 'humans/sarah'),
53 RDF.GetResource(ZOO_NS + 'rdf#lastName'),
54 RDF.GetLiteral('Yarmouth'), true);
55 }
56 ];
57 ]]>
58 </script>
59
60 <vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root" datasources="rdf:null" ref="http://www.some-fictitious-zoo.com/all-animals">
61 <template>
62 <query>
63 <content uri="?uri"/>
64 <member container="?uri" child="?child"/>
65 </query>
66 <rule>
67 <bindings>
68 <binding subject="?child" predicate="http://www.some-fictitious-zoo.com/rdf#keeper" object="?keeper"/>
69 <binding subject="?keeper" predicate="http://www.some-fictitious-zoo.com/rdf#name" object="?keepername"/>
70 <binding subject="?keeper" predicate="http://www.some-fictitious-zoo.com/rdf#lastName" object="?lastname"/>
71 <binding subject="?child" predicate="http://www.some-fictitious-zoo.com/rdf#name" object="?name"/>
72 </bindings>
73 <action>
74 <button uri="?child" label="?name ?keepername ?lastname"/>
75 </action>
76 </rule>
77 </template>
78 </vbox>
79
80 </window>

mercurial