XML processing languages can be classified according to whether they extract XML data by paths or patterns. The strengths of one category correspond to the weaknesses of the other. In this work, we propose to bridge the gap between these two classes by considering two languages, one in each class: XQuery (for path-based extraction) and
(for pattern-based extraction). To this end, we extend
so as it can be seen as a succinct core
-calculus that captures XQuery 3.0. The extensions we consider essentially allow
to implement XPath-like navigational expressions by pattern matching and precisely type them. The elaboration of XQuery 3.0 into the extended
provides a formal semantics and a sound static type system for XQuery 3.0 programs.