Salut,
mon avanture dans XUL continu tant si mal que bien.
J'usqu'ici j'ai dejà renontré des tas de problemes, que j'ai pu trouver la solution.
Mon prochain defit reste su l puplement des arbres à partir des ressources tirées d'un RDF.
J'ai lu des Tutos, en tant que Bon apprenti j'ai voulu tester l'exemple que j'ai trouvé sur
http://xulfr.org.
voici mon fichier.xul
Code xml :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
| <?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type"text/css" ?>
<?xml-stylesheet href="chrome://global/skin/treeStyle.css" type"text/css" ?>
<?xml-stylesheet href="chrome://skin/globale/treeStyle.css" type"text/css" ?>
<?xml-stylesheet href="chrome://browser/skin/browser.css" type="text/css" ?>
<!DOCTYPE page SYSTEM "chrome://XULexample1/locale/XULexample1.dtd">
<page id="sbEmptySidebar" title="&emptysidebar.title;"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" >
<vbox flex="1">
<spacer flex="0.5"/>
<groupbox id="MenuGroupBox" flex="1"><caption label="&emptysidebar.title;"/>
<hbox align='center'>
<spacer width="60"/>
</hbox>
<spacer/>
<tree flex="1" width="200" height="200" datasources="animals.rdf"
ref="http://www.some-fictitious-zoo.com/all-animals">
<treecols>
<treecol id="name" label="Nom" primary="true" flex="1"/>
<treecol id="species" label="Espèces" flex="1"/>
</treecols>
<template>
<rule>
<treechildren>
<treeitem uri="rdf:*">
<treerow>
<treecell label="rdf:http://www.some-fictitious-zoo.com/rdf#name"/>
<treecell label="rdf:http://www.some-fictitious-zoo.com/rdf#species"/>
</treerow>
</treeitem>
</treechildren>
</rule>
</template>
</tree>
</groupbox>
</vbox>
</page> |
voici mon RDF
Code xml :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
| <?xml version="1.0" encoding="iso-8859-1"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:ANIMALS="http://www.some-fictitious-zoo.com/rdf#">
<RDF:Description RDF:about="http://www.some-fictitious-zoo.com/arachnids">
<ANIMALS:name>Arachnides</ANIMALS:name>
</RDF:Description>
<RDF:Description RDF:about="http://www.some-fictitious-zoo.com/arachnids/tarantula" ANIMALS:specimens="0">
<ANIMALS:name>Tarantule</ANIMALS:name>
<ANIMALS:species>Avicularia avicularia</ANIMALS:species>
</RDF:Description>
<RDF:Description RDF:about="http://www.some-fictitious-zoo.com/birds">
<ANIMALS:name>Oiseaux</ANIMALS:name>
</RDF:Description>
<RDF:Description RDF:about="http://www.some-fictitious-zoo.com/birds/emu" ANIMALS:specimens="12">
<ANIMALS:name>Emu</ANIMALS:name>
<ANIMALS:species>Dromaius novaehollandiae</ANIMALS:species>
</RDF:Description>
<RDF:Description RDF:about="http://www.some-fictitious-zoo.com/birds/barnowl" ANIMALS:specimens="4">
<ANIMALS:name>Chouette</ANIMALS:name>
<ANIMALS:species>Tyto alba</ANIMALS:species>
</RDF:Description>
<RDF:Description RDF:about="http://www.some-fictitious-zoo.com/birds/raven" ANIMALS:specimens="0">
<ANIMALS:name>Corbeau</ANIMALS:name>
<ANIMALS:species>Corvus corax</ANIMALS:species>
</RDF:Description>
<RDF:Description RDF:about="http://www.some-fictitious-zoo.com/fish">
<ANIMALS:name>Poissons</ANIMALS:name>
</RDF:Description>
<RDF:Description RDF:about="http://www.some-fictitious-zoo.com/fish/cod" ANIMALS:specimens="0">
<ANIMALS:name>Morue</ANIMALS:name>
<ANIMALS:species>Gadus morhua</ANIMALS:species>
</RDF:Description>
<RDF:Description RDF:about="http://www.some-fictitious-zoo.com/fish/swordfish" ANIMALS:specimens="3">
<ANIMALS:name>Espadon</ANIMALS:name>
<ANIMALS:species>Xiphias gladius</ANIMALS:species>
</RDF:Description>
<RDF:Description RDF:about="http://www.some-fictitious-zoo.com/mammals">
<ANIMALS:name>Mammifères</ANIMALS:name>
</RDF:Description>
<RDF:Description RDF:about="http://www.some-fictitious-zoo.com/mammals/lion" ANIMALS:specimens="4">
<ANIMALS:name>Lion</ANIMALS:name>
<ANIMALS:species>Panthera leo</ANIMALS:species>
</RDF:Description>
<RDF:Description RDF:about="http://www.some-fictitious-zoo.com/mammals/hippopotamus" ANIMALS:specimens="2">
<ANIMALS:name>Hippopotame</ANIMALS:name>
<ANIMALS:species>Hippopotamus amphibius</ANIMALS:species>
</RDF:Description>
<RDF:Description RDF:about="http://www.some-fictitious-zoo.com/mammals/africanelephant" ANIMALS:specimens="4">
<ANIMALS:name>Elephant d'afrique</ANIMALS:name>
<ANIMALS:species>Loxodonta africana</ANIMALS:species>
</RDF:Description>
<RDF:Description RDF:about="http://www.some-fictitious-zoo.com/mammals/llama" ANIMALS:specimens="3">
<ANIMALS:name>Lama</ANIMALS:name>
<ANIMALS:species>Lama glama</ANIMALS:species>
</RDF:Description>
<RDF:Description RDF:about="http://www.some-fictitious-zoo.com/mammals/polarbear" ANIMALS:specimens="0">
<ANIMALS:name>Ours Polaire</ANIMALS:name>
<ANIMALS:species>Thalarctos maritimus</ANIMALS:species>
</RDF:Description>
<RDF:Description RDF:about="http://www.some-fictitious-zoo.com/mammals/aardvark" ANIMALS:specimens="2">
<ANIMALS:name>Oryctérope</ANIMALS:name>
<ANIMALS:species>Orycteropus afer</ANIMALS:species>
</RDF:Description>
<RDF:Description RDF:about="http://www.some-fictitious-zoo.com/mammals/ninebandedarmadillo" ANIMALS:specimens="0">
<ANIMALS:name>Tatoo</ANIMALS:name>
<ANIMALS:species>Dasypus novemcinctus</ANIMALS:species>
</RDF:Description>
<RDF:Description RDF:about="http://www.some-fictitious-zoo.com/reptiles">
<ANIMALS:name>Reptiles</ANIMALS:name>
</RDF:Description>
<RDF:Description RDF:about="http://www.some-fictitious-zoo.com/reptiles/anaconda" ANIMALS:specimens="1">
<ANIMALS:name>Anaconda</ANIMALS:name>
<ANIMALS:species>Eunectes murinus</ANIMALS:species>
</RDF:Description>
<RDF:Description RDF:about="http://www.some-fictitious-zoo.com/reptiles/chameleon" ANIMALS:specimens="2">
<ANIMALS:name>Caméléon</ANIMALS:name>
<ANIMALS:species>Chamaeleo chamaelon</ANIMALS:species>
</RDF:Description>
<RDF:Seq RDF:about="http://www.some-fictitious-zoo.com/all-animals">
<RDF:li>
<RDF:Seq RDF:about="http://www.some-fictitious-zoo.com/arachnids">
<RDF:li RDF:resource="http://www.some-fictitious-zoo.com/arachnids/tarantula"/>
</RDF:Seq>
</RDF:li>
<RDF:li>
<RDF:Seq RDF:about="http://www.some-fictitious-zoo.com/birds">
<RDF:li RDF:resource="http://www.some-fictitious-zoo.com/birds/emu"/>
<RDF:li RDF:resource="http://www.some-fictitious-zoo.com/birds/barnowl"/>
<RDF:li RDF:resource="http://www.some-fictitious-zoo.com/birds/raven"/>
</RDF:Seq>
</RDF:li>
<RDF:li>
<RDF:Seq RDF:about="http://www.some-fictitious-zoo.com/fish">
<RDF:li RDF:resource="http://www.some-fictitious-zoo.com/fish/cod"/>
<RDF:li RDF:resource="http://www.some-fictitious-zoo.com/fish/swordfish"/>
</RDF:Seq>
</RDF:li>
<RDF:li>
<RDF:Seq RDF:about="http://www.some-fictitious-zoo.com/mammals">
<RDF:li RDF:resource="http://www.some-fictitious-zoo.com/mammals/lion"/>
<RDF:li RDF:resource="http://www.some-fictitious-zoo.com/mammals/hippopotamus"/>
<RDF:li RDF:resource="http://www.some-fictitious-zoo.com/mammals/africanelephant"/>
<RDF:li RDF:resource="http://www.some-fictitious-zoo.com/mammals/llama"/>
<RDF:li RDF:resource="http://www.some-fictitious-zoo.com/mammals/polarbear"/>
<RDF:li RDF:resource="http://www.some-fictitious-zoo.com/mammals/aardvark"/>
<RDF:li RDF:resource="http://www.some-fictitious-zoo.com/mammals/ninebandedarmadillo"/>
</RDF:Seq>
</RDF:li>
<RDF:li>
<RDF:Seq RDF:about="http://www.some-fictitious-zoo.com/reptiles">
<RDF:li RDF:resource="http://www.some-fictitious-zoo.com/reptiles/anaconda"/>
<RDF:li RDF:resource="http://www.some-fictitious-zoo.com/reptiles/chameleon"/>
</RDF:Seq>
</RDF:li>
</RDF:Seq>
</RDF:RDF> |
Malheuresement mon arbre est tout vide à l'affichage!!!
Ca je ne comprends pas