This is a draft cheat sheet. It is a work in progress and is not finished yet.
XSD
Atributs: |
Default |
Fixed |
From |
Id |
Name |
Ref |
Type |
Use |
Types: |
String |
Decimal |
Integer |
Boolean |
Date |
Time |
Repetició: |
Sequence |
Choice |
All |
|
|
XSLT
<template> ---> Sortida
Att:Match de Template---> Arrel
<xsl:for-each select=" ">
<xsl:value-of select=" "/>
(for)Att: order-by="+-" OR---> <xsl:sort select=""/>
<xsl:if test="expression"> --> (After for )
|
|
|
Xpath
Selecció nodes |
/ |
De arrel |
// |
Arrel (no cal direccio) |
. |
Actual |
.. |
Pare del actual |
@ |
Atribut |
Funcions: |
last() |
posicio Ultim node |
position() |
posicio node |
count(node-set) |
nombre de nodes |
number sum(node-set) |
retorna la suma |
number round 8number) |
Predicats: |
/bookstore/book[1] |
el numero indica |
/bookstore/book[last()] |
ultim |
/bookstore/book[last()-1] |
penultim |
/bookstore/book[position()<3] |
tots menys de 3 |
//title[@lang] |
tots atribut lang |
/bookstore/book[price>35.00]/title |
titol de llibre amb condicio |
|
|
Xquery
Variables
let $resultat := "Hola món!"
return $resultat
DOC:
let $d := doc('/Users/palamos/Google Drive/M4-
XML/UF2/material/xquery_intro/videos.xml')
return $d
FOR:
for $a in $doc//actors/actor
WHERE:
where ends-with($a, 'Lisa')
|
|