Appendix B. XSLT Pattern Grammar
Table B-1 lists the entire grammar for patterns in XSLT 1.0, straight from the XSLT 1.0 Recommendation at http://www.w3.org/TR/xslt. The syntax for patterns is a subset of the syntax for XPath expressions.
Table B-1. Patterns
|
|
LocationPathPattern | Pattern '|' LocationPathPattern |
---|---|---|
|
|
'/' RelativePathPattern? | IdKeyPattern (('/'|'//') RelativePathPattern)? | '//'? RelativePathPattern |
|
|
'id' '(' Literal ')' | 'key' '(' Literal ',' Literal ')' |
|
|
StepPattern | RelativePathPattern '/' StepPattern | RelativePathPattern '//' StepPattern |
|
|
ChildOrAttributeAxisSpecifier NodeTest Predicate* |
|
|
AbbreviatedAxisSpecifier | ('child' | 'attribute') '::' |
The AbbreviatedAxisSpecifier
, NodeTest
, Predicate
, and Literal
productions are defined in the XPath grammar. See Appendix A.
Get XSLT 1.0 Pocket Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.