For tree-oriented pattern matching syntax, I'd recommend for
inspiration the RELAX NG Compact Syntax, rather than XPath.
Technically, RELAX NG is an XML schema validation language; but the
basic principle that it uses is to describe a tree-oriented pattern,
and to consider the document to be valid if it matches the pattern.

XPath, by contrast, isn't so much about pattern matching as it is
about creating a tree-oriented addressing scheme.

Also note that S05 includes an option near the end about matching
elements of a list rather than characters of a string; IMHO, a robust
"structured data"-oriented pattern-matching technology for perl6 ought
to use that as a starting point.

-- 
Jonathan "Dataweaver" Lang

Reply via email to