logo
MDA < Home 

Map Development Area (MDA)

Location: _/_   markup   _/_   xml   _/_   xpath   _/_   xpath-20  

Index Browse Edit Visualize Statistics Download Help
 
xpath-20
has predecessor:
- XPath 1.0 [ predecessor ]
Other Names:
  • World Wide Web Consortium. XML Path Language (XPath) Version 2.0 (long)
    Comment:
    successor to XPath 1.0 -- becomes recommendation 2004 -- subsets XQuery 1.0 -- subsets XSLT 2.0
    example
    if ($widget1/unit-cost < $widget2/unit-cost) then $widget1 else $widget2
    Comment:
    formal semantics: static: defines what an expression means without any input -- dynamic: include input
    Comment:
    many functions: string, numerics, date/time, sequence manipulation, casting
    example
    some $x in /students/student/name satisfies $x = "Fred" -- every $x in /students/student/name satisfies $x = "Fred"
    example
    sum(for $x in /order/item return $x/price * $x/quantity)
    Comment:
    data model: sequence of nodes -- arbitrary order, can have duplicates, can be heterogenous -- all expressions return sequences -- everything is a sequence -- sequences are shallow
    Comment:
    data model: typed values (as in XPath 1.0) nodes, strings, numbers, booleans -- uses XML Schema type system: simple and complex types