Query Languages
December 20, 1999
As many of you know, there is no one single XML query language at this point.
In December 1998, the
W3C Query Languages Workshop (QL'98)
resulted in 66 different proposals. In general, these fall into two categories:
- structure preserving - relative hierarchy, relative sequence
Example: XQL: XML Query Language
- Microsoft et al
- structure transforming - collecting all or some of the nodes,
constructing new nodes, changing the hierarchy and structure.
Example: XML-QL: A Query Language for XML
- AT&T et al
XPath was an outgrowth of early query language efforts.
XQL can be performed against multiple documents at once.
Some of patterns and constructs that can be used for queries are:
| Filter |
//product[@maker="Sears"] |
| Position |
//product[1] |
Boolean, Precedence, Set Operators |
no example |
| Sequence |
//(Chapter union Section) |
| After or Before |
//Observation after Inclusion[1] |
| Mixed Model/Rich Reporting |
no example |
| Node Creation |
<customers> {
<customer> (unique $c=//customer) {
$c
}
|
| Sorting |
<customers> {
<customer> (unique $c=//customer) {
$c
} sortby prod_name, $price
|
XLink/XPointer Tool: X2X
What Happened at XML'99
CommerceOne
|