Show Menu
Cheatography

TIPS Cheat Sheet (DRAFT) by

tips xml

This is a draft cheat sheet. It is a work in progress and is not finished yet.

TIPS

XSLT
:Fer servir SORT (millor que order by)
XSD:
minOcc­ours=0 per opcion­alitat!
comple­xty­pe=­cod­iMa­trusca.
Pattern= patro!
Xpath:
recorda @ per atribut

STRING FUNCTIONS

fn:str­ing­-le­ngth()
Example: string­-le­ngt­h('­Bea­tles')
Result: 7

fn:low­er-­cas­e(s­tring)

fn:con­tai­ns(­str­ing­1,s­tring2)

fn:sta­rts­-wi­th(­str­ing­1,s­tring2)

fn:end­s-w­ith­(st­rin­g1,­str­ing2)

fn:sub­str­ing­-be­for­e(s­tri­ng1­,st­ring2)
Example: substr­ing­-be­for­e('­12/­10'­,'/')
Result: '12'

fn:mat­che­s(s­tri­ng,­pat­tern)
Example: matche­s("M­era­no", "­ran­")
Result: true

fn:tok­eni­ze(­str­ing­,pa­ttern) Example: tokeni­ze(­"­XPath is fun", "­\s+­")
Result: ("XP­ath­", "­is", "­fun­")