|
XQuery occurs as query language (with a select few programming language features) that is designed to query collections of XML data. These are semantically similar to SQL.
XQuery One.Cypher is existence developed per XML Query working class action of the W3C. A work
is closely coordinated using a development of XSLT 2.0 per XSL Working Class action; them groups part responsibility for XPath 2.0, which occurs as subset of XQuery One.Nought.
XQuery One.Cipher has non eventually achieved the status of the W3C Recommendation, however a total of implementations come available within various states of completeness.
Features
XQuery will bring a means to extract & manipulate information from either XML documents or even even any information source that may be hold XML, like relational databases or professional documents.
XQuery utilizes XPath expression syntax to location specific area of an XML document. It supplements this by using the SQL-like FLWOR expression for performing joins. A FLWOR expression is known as fallowing its 5 clauses: FOR, LET, In which, Choose BY, Link to.
A language besides will bring syntax allowing for recently XML documents to become constructed. within which a element & attribute list come known ahead, an XML-rather syntax may be utilized; in more suits, expressions known as dynamic node builder come available. Everthing these constructs come defined when expressions in a language, & may be willy-nilly nested.
the language is according to a tree-structured model of the data content of an XML document, containing septet sort of node: document nodes, elements, attributes, text nodes, comments, processing videos, & namespaces.
the nature and severity body of the language system tons values when sequences (the singleton value is considered to become a sequence of length 1). the things within a sequence may either become nodes or even atomlike values. Atomlike values can be whole number, strings, booleans, and then inside: a to a full listing of types is according to the primitive types defined in XML Schema.
XQuery One.Cipher doesn't include features for even updating XML documents or databases. It also
want full text search capability. These features come two under active development
for the subsequent version of the language.
Examples
A sample XQuery code following lists a unique speakers inside every work of Shakespeare's play Hamlet.
<html><head/><body>
</ul>
</span>
}
</body></html>
XQuery occurs as functional language consisting entirely of expressions. No statements, potentially though occasionally of the keywords come out to indicate statement-prefer behaviors. To execute a work, a expression in the person gets evaluated & its value returned. So to write the work to double an input value, wise shoppers only write:
declare work local:doubler($x)
To write a fully interrogation that says Hi Globe your family write the expression:
"Hello World"
Further information
XQuery from either The Experts: A Decision to the W3C XML Query Language. Howard Katz (ed). Addison-Wesley, 2004. ISBN 0-321-18060-7
|