code.progysm.com

xpath

Chemin
	child::para
	child::*
	child::text()
	child::node()
	attribute:name
	attribute::*
	descendant:para
	ancestor::div
	ancestor-or-self::div
	descendant-or-self::para
	self::para
	child::chapter/descendant
	child::*/child::para
	/
	/descendant::para
	/descendant::olist/child::item
	child::para[position()=1]
	child::para[position()=last()]
	child::para[position()=last()-1]
	child::para[position()>1]
	following-sibling::chapter[position()=1]
	preceding-sibling::chapter[position()=1]
	/decendant::figure[position()=42]
	child::para[attribute::type="warning"]
	child::para[attribute::type='warning'][position()=5]
	child::para[position()=5][attribute::type="warning"]
	child::chapter[child::title='Introduction']
	child::chapter[child::title]
	child::*[self::chapter or self::appendix]
	child::*[self::chapter or self::appendix][position()=last()]

Abréviation:
	para
	*
	text()
	@name
	@*
	para[1]
	para[last()]
	*/para
	/doc/chapter[5]/select[2]
	chapter//para
	//para
	//olist/item
	.
	.//para
	..
	../@lang
	para[@type="warning"]
	para[@type="warning"][5]
	para[5][@type="warning"]
	chapter[title="Introduction"]
	chapter[title]
	employee[@secretary and @assistant]

Booléen
	or
	and
	=
	!=
	<
	>
	<=
	>=

Fonctions
	Object
		number last()
		number position()
		number count(node-set)
		node-set id(object)
		string local-name(node-set?)
		string namespace-uri(node-set?)
		string name(node-set?)
	String
		string string(object)?
		string concat(string, string, string*)
		boolean-starts-with(string, string)
		boolean contains(string, string)
		string substring-before(string, string)
		string substring-after(string, string)
		string substring(string, number, number?)
		number string-length(string?)
		string normalize-space(string?)
		string translate(string, string, string)
	Boolean
		boolean boolean(bobject)
		boolean not(boolean)
		boolean not()
		boolean false()
		boolean lang(string)
	Number
		number number(object)
		number sum(node-set)
		number floor(number)
		number ceiling(number)
		number round(number)

Liens
	XML Path Language (XPath) Version 1