content/xul/templates/tests/chrome/test_tmpl_extendedsyntaxtworulesrecurse.xul

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/xul/templates/tests/chrome/test_tmpl_extendedsyntaxtworulesrecurse.xul	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,81 @@
     1.4 +<?xml version="1.0"?>
     1.5 +<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
     1.6 +<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
     1.7 +
     1.8 +<!--
     1.9 +  extended syntax - two rules recurse
    1.10 +-->
    1.11 +
    1.12 +<window title="XUL Template Tests" width="500" height="600"
    1.13 +        onload="test_template();"
    1.14 +        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
    1.15 +  <script type="application/javascript"
    1.16 +          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
    1.17 +
    1.18 +  <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
    1.19 +
    1.20 +  <data id="output">
    1.21 +    <vbox id="http://www.some-fictitious-zoo.com/humans/sarah">
    1.22 +      <label value="The favorite animals of Sarah"/>
    1.23 +      <label id="http://www.some-fictitious-zoo.com/birds/emu" class="indent" value="Emu which belongs to the class Birds"/>
    1.24 +      <label id="http://www.some-fictitious-zoo.com/mammals/polarbear" class="indent" value="Polar Bear which belongs to the class Mammals"/>
    1.25 +      <label id="http://www.some-fictitious-zoo.com/arachnids/tarantula" class="indent" value="Tarantula which belongs to the class Arachnids"/>
    1.26 +    </vbox>
    1.27 +    <vbox id="http://www.some-fictitious-zoo.com/humans/robert">
    1.28 +      <label value="The favorite animals of Robert"/>
    1.29 +      <label id="http://www.some-fictitious-zoo.com/arachnids/tarantula" class="indent" value="Tarantula which belongs to the class Arachnids"/>
    1.30 +      <label id="http://www.some-fictitious-zoo.com/reptiles/anaconda" class="indent" value="Anaconda which belongs to the class Reptiles"/>
    1.31 +      <label id="http://www.some-fictitious-zoo.com/reptiles/chameleon" class="indent" value="Chameleon which belongs to the class Reptiles"/>
    1.32 +      <label id="http://www.some-fictitious-zoo.com/mammals/africanelephant" class="indent" value="African Elephant which belongs to the class Mammals"/>
    1.33 +    </vbox>
    1.34 +  </data>
    1.35 +
    1.36 +<script src="templates_shared.js"/>
    1.37 +
    1.38 +<script>
    1.39 +<![CDATA[
    1.40 +SimpleTest.waitForExplicitFinish();
    1.41 +
    1.42 +var testid ="extended syntax - two rules recurse";
    1.43 +var queryType = "rdf";
    1.44 +var isTreeBuilder = false;
    1.45 +var needsOpen = false;
    1.46 +var notWorkingYet = false;
    1.47 +var notWorkingYetDynamic = false;
    1.48 +var expectedOutput = document.getElementById("output");
    1.49 +
    1.50 +var changes = [];
    1.51 +]]>
    1.52 +</script>
    1.53 +
    1.54 +<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">
    1.55 +<template>
    1.56 +<rule>
    1.57 +<conditions>
    1.58 +<content uri="?uri"/>
    1.59 +<member container="?uri" child="?child"/>
    1.60 +<triple subject="?child" predicate="http://www.some-fictitious-zoo.com/rdf#name" object="?name"/>
    1.61 +</conditions>
    1.62 +<action>
    1.63 +<vbox uri="?child">
    1.64 +<label value="The favorite animals of ?name"/>
    1.65 +</vbox>
    1.66 +</action>
    1.67 +</rule>
    1.68 +<rule>
    1.69 +<conditions>
    1.70 +<content uri="?uri"/>
    1.71 +<triple subject="?uri" predicate="http://www.some-fictitious-zoo.com/rdf#favoriteAnimal" object="?child"/>
    1.72 +<member container="?animalClass" child="?child"/>
    1.73 +<triple subject="?animalClass" predicate="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" object="http://www.some-fictitious-zoo.com/rdf#Class"/>
    1.74 +<triple subject="?child" predicate="http://www.some-fictitious-zoo.com/rdf#name" object="?name"/>
    1.75 +<triple subject="?animalClass" predicate="http://www.some-fictitious-zoo.com/rdf#name" object="?animalClassName"/>
    1.76 +</conditions>
    1.77 +<action>
    1.78 +<label uri="?child" class="indent" value="?name which belongs to the class ?animalClassName"/>
    1.79 +</action>
    1.80 +</rule>
    1.81 +</template>
    1.82 +</vbox>
    1.83 +
    1.84 +</window>

mercurial