







































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An overview of xml query languages, focusing on xql and xml-ql. It covers their goals, usage scenarios, general requirements, xml query functionality, xml query data model, node accessors, value constructors, and examples. These query languages enable users to access, manipulate, and extract data from xml documents.
Typology: Slides
1 / 47
This page cannot be seen from the preview
Don't miss anything!








































3-level hierarchy: table, record and field
Order is not part of the information
Strings in separate fields are separate
Location of data is not generally significant
Linking is far more often part of the data, not part of the schema representing data
Data Model
ļ¹
Based on XML Infoset
Query Operators
Query Language
Syntax Binding
ļ¹
MAY have more than one syntax binding
Declarativity
ļ¹
MUST be declarative
Protocol Independence
ļ¹
MUST be defined independently of any
protocols
Error Conditions
Quantifiers
ļ¹
MUST include support for both Universal and
Existential Quantifiers
Hierarchy and Sequence
ļ¹
MUST support operations on hierarchy and
sequence of document structures
Aggregation
ļ¹
MUST allow computing summary information
Structural Transformation
ļ¹
MUST be able to transform and create new
structures
References
ļ¹
MUST be able to traverse intra- and inter-
document references
Text and Element Boundaries
ļ¹
MUST handle text across element boundaries
Operation on Schemas
ļ¹
MUST be able to access Schemas or DTDs
Extensibility
ļ¹
SHOULD support the use of externally
defined functions
Operation on Names
ļ¹
MUST perform simple operations on names
ļ¹
MAY perform more powerful operations
Datatypes
ļ¹
MUST represent XML 1.0 data as well as
simple and complex types of XML Schema
References
ļ¹
MUST include support for references, both,
internal and external
Schema Availability
ļ¹
MUST query even in the absence of Schema
Trees
ļ¹
Node-labeled
ļ¹
Edge-labeled
XML Query data model is a Node-labeled, tree-constructor representation
Node functions
ļ¹
Constructors
ļ¹
Accessors
Fourteen primitive XML Schema datatypes ļŗ
stringValue
ļŗ
boolValue
ļŗ
floatValue
ļŗ
doubleValue
ļŗ
decimalValue
ļŗ
timeDurValue
ļŗ
recurDurValue
ļŗ
binaryValue
ļŗ
urirefValue
ļŗ
idValue
ļŗ
idrefValue
ļŗ
qnameValue
ļŗ
entityValue
ļŗ
notationValue
Note: ValueNode replaces XPathās TextNode
http://www.mywebsite.com/PartSchemaā
name=ānutboltā>
</p:part>
parent(A1)
= Ref(E1)
prefix(N1)
= Ref(StringValue("p", Ref(Def_string)))
uri(N1)
= URIRefValue("http://www.mywebsite.com/PartSchema",
Ref(Def_uriReference))
parent(N1)
= Ref(E1)
Node References
ļ¹
Defined by the query system NOT by the
query language
Node Identity
ļ¹
The function ref is one-to-one onto
ļ¹
ref_equal(ref(n1), ref(n2))
ļ
equal(n1,n2)
Unique parent
Duplicate-free list of children
Compact, easy to type and read
Simple for common cases
Embeddable in programs, scripts, URLs
Unique identification of each node
Declarative NOT procedural
Evaluation at any level in the document
Result in document order; no repeat node
Superset of XSL
Closure is guaranteed ONLY if the implementation returns well-formed XMLdocuments