Inconsistent Path Detection for XML IDEs
Pierre Genevès Nabil Layaïda
CNRS INRIA
May 25th, 2011 33rd International Conference on Software Engineering Honolulu, HI, USA
.
Inconsistent Path Detection for XML IDEs Pierre Genevs Nabil Layada - - PowerPoint PPT Presentation
Inconsistent Path Detection for XML IDEs Pierre Genevs Nabil Layada CNRS INRIA May 25 th , 2011 33 rd International Conference on Software Engineering Honolulu, HI, USA . A Simple XQuery Program Generate alerts for news related to stocks
CNRS INRIA
.
for $s in doc("portfolio.xml")//stocks/stock for $line in doc("news.xml")/news/headline where contains($line, $s/name) return <alert>{$s/ticker, $line/parent::*/summary}</alert>
Pierre Genevès (CNRS, France) Inconsistent Path Detection for XML IDEs 05.25.2011 – ICSE’11 2 / 7
a selected node context node
self a n c e s t
descendant preceding f
l
i n g following-sibling preceding-sibling child parent
Pierre Genevès (CNRS, France) Inconsistent Path Detection for XML IDEs 05.25.2011 – ICSE’11 3 / 7
a/b[following-sibling::c/parent::d] self::a/child::e a[b*,c,d+]
Pierre Genevès (CNRS, France) Inconsistent Path Detection for XML IDEs 05.25.2011 – ICSE’11 4 / 7
Pierre Genevès (CNRS, France) Inconsistent Path Detection for XML IDEs 05.25.2011 – ICSE’11 5 / 7
CXPath expression e Schema s Parsing and compilation (linear time) ϕe ∧ ϕs Logical formula ϕ Satisfiability check (2O(|ϕ|) time) ϕ is satisfiable ϕ is unsatisfiable: e is inconsistent in the presence of s
Pierre Genevès (CNRS, France) Inconsistent Path Detection for XML IDEs 05.25.2011 – ICSE’11 6 / 7
for $x in //news[article]/headline return { ... }
Pierre Genevès (CNRS, France) Inconsistent Path Detection for XML IDEs 05.25.2011 – ICSE’11 7 / 7