CS433,Fall2001 1
XQuery:AnXMLQueryLanguage CS433 Acknowledgment:Manyoftheslides borrowedfromDonChamberlin
CS433,Fall2001 2
WhydoweneedanXMLquery language?
❖ XMLemergingasdominantstandardfordata
representationandexchangeintheInternet
– Flexibleandself-describing
❖ Torealizepotential,XMLneedsaquery
languageofcomparableflexibility
– Quilt, XPath,XQL,XML-QL,Lorel,YATL,… – …andXQuery
CS433,Fall2001 3
XQuery
❖ XMLQueryWGwascharteredinOctober1999 ❖ About50membersfromabout35companies ❖ Publicwebsite:www.w3.org/XML/Query ❖ Publiccomments:www-xml-query-
comments@w3.org
CS433,Fall2001 4
WorkingDrafts(6/7/01)
❖ Requirements ❖ XQuery(with102openissues!) ❖ UseCases(10applications,manyqueries) ❖ DataModel(forbothXQueryandXPath2.0) ❖ FormalSemantics(with99openissues!) ❖ XQueryX(XMLSyntaxforXQuery)
CS433,Fall2001 5
Terminology
❖ Quilt ❖ XQuery ❖ XPath ❖ XSLT ❖ XMLSchema ❖ XMLQueryAlgebra("Core") ❖ XQueryX
CS433,Fall2001 6
Antecedents:XPath andXQL
❖ Closelyrelatedlanguagesfornavigatingahierarchy ❖ Apathexpression isaseriesofsteps ❖ Eachstepmovesalonganaxis (children,ancestors,
attributes,etc.)andmayapplyapredicate
❖ XPathhasanabbreviatedsyntax,adaptedfromXQL
/book[title=“WarandPeace”] /chapter[title=“War”] //figure[contains(caption,“Guns”)]
❖ XQLhassomeadditionaloperators(BEFORE,AFTER,…)