|
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 query - triple and member merge |
|
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" unordered="true"> |
|
18 <label id="http://www.some-fictitious-zoo.com/reptiles/chameleon" value="Chameleon"/> |
|
19 <label id="http://www.some-fictitious-zoo.com/arachnids/tarantula" value="Tarantula"/> |
|
20 </data> |
|
21 |
|
22 <script src="templates_shared.js"/> |
|
23 |
|
24 <script> |
|
25 <![CDATA[ |
|
26 SimpleTest.waitForExplicitFinish(); |
|
27 |
|
28 var testid ="query - triple and member merge"; |
|
29 var queryType = "rdf"; |
|
30 var isTreeBuilder = false; |
|
31 var needsOpen = false; |
|
32 var notWorkingYet = false; |
|
33 var notWorkingYetDynamic = false; |
|
34 var expectedOutput = document.getElementById("output"); |
|
35 |
|
36 var changes = []; |
|
37 ]]> |
|
38 </script> |
|
39 |
|
40 <vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root" datasources="rdf:null" ref="http://www.some-fictitious-zoo.com/humans/robert"> |
|
41 <template id="template"> |
|
42 <query id="query"> |
|
43 <content uri="?uri"/> |
|
44 <triple subject="?uri" predicate="http://www.some-fictitious-zoo.com/rdf#favoriteAnimal" object="?child"/> |
|
45 <triple subject="?uri" predicate="http://www.some-fictitious-zoo.com/rdf#pets" object="?pets"/> |
|
46 <member container="?pets" child="?child"/> |
|
47 <triple subject="?child" predicate="http://www.some-fictitious-zoo.com/rdf#name" object="?name"/> |
|
48 </query> |
|
49 ,<action> |
|
50 <label uri="?child" value="?name"/> |
|
51 </action> |
|
52 </template> |
|
53 </vbox> |
|
54 |
|
55 </window> |