makeId(this) function makeId(e) { if (e) return makeId(e.selectSingleNode("..")) + absoluteChildNumber(e) + (e.nodeType == 2 ? "@" : "_"); else return ""; }
Simple demonstration of performing queries against an XML document using XSL Patterns.
XSL Pattern:

Some Sample Queries:
authors
authors/author
authors/author/name
authors/*/name
authors/author/*
authors/author[nationality]/name
authors/author[nationality='Russian']/name
authors/author[@period="classical"]
authors/author/@period
XML source document