XPath pattern
From http://www.w3.org/TR/xslt
section 5
Here are some examples of patterns:
paramatches anyparaelement*matches any elementchapter|appendixmatches anychapterelement and anyappendixelementolist/itemmatches anyitemelement with anolistparentappendix//paramatches anyparaelement with anappendixancestor element/matches the root nodetext()matches any text nodeprocessing-instruction()matches any processing instructionnode()matches any node other than an attribute node and the root nodeid("W11")matches the element with unique IDW11para[1]matches anyparaelement that is the firstparachild element of its parent*[position()=1 and self::para]matches anyparaelement that is the first child element of its parentpara[last()=1]matches anyparaelement that is the onlyparachild element of its parentitems/item[position()>1]matches anyitemelement that has aitemsparent and that is not the firstitemchild of its parentitem[position() mod 2 = 1]would be true for anyitemelement that is an odd-numbereditemchild of its parent.div[@class="appendix"]//pmatches anypelement with adivancestor element that has aclassattribute with valueappendix@classmatches anyclassattribute (not any element that has aclassattribute)@*matches any attribute
