Exemple |
<?xml version='1.0' encoding='ISO-8859-1' standalone='no' ?> <!DOCTYPE passacaille SYSTEM "Danse.dtd" > <?play audio armide.avi?> <passacaille> ... </passacaille> <!-- fin du document --> |
Exemple |
<RDC> <?play "QuicktimeVR" "rdc.mov" ?> Rez de chaussée au même niveau que la rue, vaste et bien éclairé. <cuisine> Evier inox. Mobilier encastré. </cuisine> <WC> Lavabo. Cumulus 200L. </WC> <séjour> Cheminée en pierre. Poutres au plafond. Carrelage terre cuite. Grande baie vitrée. </séjour> <bureau> Bibliothèque encastrée. </bureau> <garage/> <!-- pas de données disponibles sur le garage --> Dans la cour : palmier en zinc, figurant le désert (démontable). </RDC> |
valeur textuelle de <RDC> |
Rez de chaussée au même niveau que la rue, vaste et bien éclairé. Evier inox. Mobilier encastré. Lavabo. Cumulus 200L. Cheminée en pierre. Poutres au plafond. Carrelage terre cuite. Grande baie vitrée. Bibliothèque encastrée. Dans la cour : palmier en zinc, figurant le désert (démontable). |
Exemple |
<cuisine surface='12m2'> ... </cuisine> |
Exemple |
<résumé xmlns="http://www.w3c.org/xml/schemas/Basic-text.dtd" > ... <jur:alinea numero="12.2.3.5" xmlns:jur="http://www.duralex.fr/salariés/cdd.html"> <texte> <alinea> ... <alinea> <texte> </jur:alinea> ... </résumé> |
Exemple |
<passacaille> <?play audio armide.avi?> ... </passacaille> |
Exemple |
<passacaille> <!-- début de la passacaille --> ... </passacaille> |
Exemple |
<xxx> blabla <yyy> ... </yyy> suite du blabla </xxx> |
<xxx> <yyy> <zzz a="12"/> </yyy> </xxx> |
Maison.xml |
<maison> <RDC> <cuisine surface='12m2'> Evier inox. Mobilier encastré. </cuisine> <WC> Lavabo. Cumulus 200L. </WC> <séjour surface='40m2'> Cheminée en pierre. Poutres au plafond. Carrelage terre cuite. Grande baie vitrée. </séjour> <bureau surface='15m2'> Bibliothèque encastrée. </bureau> <garage/> </RDC> <étage> <terrasse> Palmier en zinc figurant le désert </terrasse> <chambre surface='28m2' fenêtre='3'> Carrelage terre cuite poncée. <alcôve surface='8m2' fenêtre='1'> Lambris. </alcôve> </chambre> <chambre surface='18m2'> Lambris. </chambre> <salleDeBains surface='15m2'> Douche, baignoire, lavabo. </salleDeBains> </étage> </maison> |
Exemple d'expressions numériques |
$b * 100 + $d - 4800 + floor($m div 10) $J + 31741 - ($J mod 7)) mod 146097 mod 36524 mod 1461 (($d4 - $L) mod 365) + $L |
Exemple d'expression booléenne |
($somme < 3000) and ($devise = 'Franc') and ($fini or not( $trouvé)) |
LocationPath |
LocationPath = "/"?, LocationStep, ( "/", LocationStep )* |
LocationStep |
LocationStep = Axis, "::", NodeTest, Predicate* |
LocationStep |
child::figure[attribute::type='gif'] |
<1>
<2>
<3/>
<4/>
<5>
<6>
<7/>
</6>
<8/>
<9>
<? processing-instruction ?>
<10>
<11/>
<12/>
</10>
<!-- commentaire -->
<13>
<14/>
<15/>
<13/>
un texte
</9>
<16/>
<17>
<18/>
</17>
</5>
<19/>
<20/>
</2>
</1> |
Axis::NodeTest |
Node Test = nom |
Axis::nom |
child::figure |
Node Test = * |
Axis::* |
child::* |
attribute::* |
Node Test = type |
Axis::type |
child::text() |
child::comment() |
child::processing-instruction() |
child::processing-instruction( "play" ) |
child::node() |
Prédicat |
[ Boolean-Expression ] |
$les-étages[ terrasse = "Palmier en zinc figurant le désert" ] |
Prédicats en cascade |
Axis::NodeTest[Boolean-Expression][Boolean-Expression] ... [Boolean-Expression] |
Prédicat utilisant l'indice de proximité conservé dans le contexte d'évaluation |
child::figure[ position() = 3 ] |
Prédicat utilisant le nombre total de nœuds conservé dans le contexte d'évaluation |
child::figure[ position() = last() ] |
Prédicat utilisant le nœud contexte temporaire conservé dans le contexte d'évaluation |
child::figure[ attribute::type = 'gif' ] |
Exemple |
child::figure[ attribute::scale ] |
child::figure[ attribute::scale ] |
Autres exemples |
child::figure[ parent::paragraphe ] child::*[ self::figure or self::image ] |
Exemple |
child::figure[ attribute::scale = "0.5" ] |
child::figure |
child::paragraphe[ child::figure ] |
child::chapitre[ descendant::figure ] |
child::paragraphe[ child::* ] |
child::*[ child::figure ] |
child::*[ self::chapitre or self::annexe ] |
child::paragraphe[ child::figure[position() = 2] ] |
child::paragraphe[ child::*[position() = 2][self::figure] ] |
child::paragraphe[ child::node()[position() = 2][self::figure] ] |
child::paragraphe[ child::node()[self::figure][position() = 2] ] |
child::*[ self::chapitre or self::annexe ][position() = last()] |
/descendant::text()[ start-with( self::node(), "Horaires" ) ] |
child::mohican[ position() = last() ] |
Chemin de localisation |
LocationPath = "/"?, LocationStep, ( "/", LocationStep )* |
Exemple de chemin de localisation relatif |
child::chapitre/child::section |
Exemple de chemin de localisation absolu |
/child::chapitre/child::section |
parent::chapitre/child::section[position() = 3]/attribute::niveau |
etape1/etape2/etape3/.../etapeN |
étape1/étape2/étape3/.../étapeN |
(I) (E)(S) ... (E)(S) (E)(S) (E) (F) étapeN étape3 étape2 étape1 |
child::chapitre/child::section/attribute::niveau |
parent::chapitre/child::section/attribute::niveau |
.../a::b[c]/etapeN |
child::chapitre/child::section[child::figure]/attribute::niveau |
child::chapitre/child::section[position()=2]/attribute::niveau |
child::paragraphe[ child::figure/attribute::scale ] |
child::paragraphe[ child::figure/attribute::scale = "0.5" ] |
child::paragraphe[ child::figure/attribute::scale ] child::paragraphe[ child::figure[ attribute::scale ] ] |
child::bloc/descendant::figure |
child::bloc[position()=3]/child::figure[position()=1][attribute::type='gif'] |
parent::node()/child::figure |
/descendant::figure[position() = 42] |
/child::doc/child::chapitre[position()=5]/child::section[position()=2] |
child::chapitre[ descendant::note/child::paragraphe/ attribute::alignement = "centré" ] |
/descendant::*[ not( child::* ) ] |
figure Forme longue : child::figure |
text() Forme longue : child::text() |
//figure Forme longue : /descendant-or-self::node()/child::figure |
bloc//figure Forme longue : child::bloc/descendant-or-self::node()/child::figure |
bloc[3]/figure[@type = 'gif'][1] Forme longue : child::bloc[position()=3]/child::figure[position()=1] [attribute::type='gif'] |
../figure Forme longue : parent::node()/child::figure |
.//paragraphe Forme longue : self::node()/descendant-or-self::node()/child::paragraphe |
//*[not(*)] Forme longue : /descendant-or-self::node()/child::*[not(child::*)] |
(/descendant::figure[position() = 42]) |
/descendant::figure | /descendant::image |
/ | document( 'charteGraphique.xml' ) |
/descendant::figure[ @type = 'gif' ] | $mesImages |
document( 'charteGraphique.xml')/descendant::figure[ @type = 'gif' ] |
(/descendant::figure | /descendant::image)/attribute::scale |
$monDocument/child::chapitre/section |
Enumération imposée par indices de proximité |
preceding-sibling::figure |
Enumération par défaut, suivant l'ordre de lecture du document |
(preceding-sibling::figure) |
preceding-sibling::figure[ position() = 1 ] |
(preceding-sibling::figure)[ position() = 1 ] |
(//paragraphe | //noteBasDePage)[ child::text() [ contains( self::node(), "prédicat" ) ] ] |
$mesImages[@type = 'gif'] |
$p[ count( self::node() | $q ) = count( $q ) ] |
preceding-sibling::*[1] | Table | following-sibling::*[1] |