Difference between revisions of "XQuery"

From BaseX Documentation
Jump to navigation Jump to search
m (Text replace - "='red'" to "='chocolate'")
m (Text replace - "\[\[Category:XQuery\]\]" to "")
(27 intermediate revisions by the same user not shown)
Line 1: Line 1:
Welcome to the Query Portal, which is one of the [[Main Page|main]] sections of this documentation. Here you can find more information on performing XPath and XQuery requests. Apart from standard features, BaseX offers numerous extensions, which are listed on this page.
+
Welcome to the Query Portal, which is one of the [[Main Page|Main Sections]] of this documentation. BaseX provides an implementation of the W3 [http://www.w3.org/TR/xpath-30/ XPath] and [http://www.w3.org/TR/xquery-30 XQuery] languages, which are tightly coupled with the underlying database store. However, the processor is also a flexible general purpose processor, which can access local and remote sources. High conformance with the official specifications is one of our main objectives, as the results of the [http://dev.w3.org/2006/xquery-test-suite/PublicPagesStagingArea/XQTSReportSimple_XQTS_1_0_2.html XQuery Test Suite] demonstrate. This section contains information on the query processor and its extensions:
  
==Overview==
+
<div style="float:left; width:48%;">
* [[Packaging]]: Based on the [http://expath.org/modules/pkg/ EXPath Packaging System]
+
;[[XQuery 3.0]] and [[XQuery 3.1]]
* [[Full-Text]]: full-text features of XQuery
+
Features of the new XQuery Recommendations.
* [[Update]]: update mechanism of XQuery
 
* [[XQuery 3.0]]: supported features of the upcoming [http://www.w3.org/TR/xquery-30/ W3C XQuery 3.0] Recommendation
 
* [[Java Bindings]]: how to call Java code from XQuery
 
* [[XQuery Errors|Errors]]: errors raised by XQuery expressions
 
  
==XQuery Functions==
+
;[[XQuery Extensions]]
 +
Specifics of the BaseX XQuery processor.
  
<onlyinclude>
+
;[[Module Library]]
{| class="wikitable sortable"
+
Additional functions included in the internal modules.
|-
 
! Module
 
! Description
 
! Prefix
 
! Namespace URI
 
|-
 
| [[Database Functions|Database]]
 
| Accessing the database and indexes.
 
| <code>db</code>
 
| <code><nowiki>http://basex.org/db</nowiki></code>
 
|-
 
| [[File Functions|File]]
 
| File handling, based on the upcoming new version of the [http://expath.org/spec/file EXPath File] module.
 
| <code>file</code>
 
| <code><nowiki>http://expath.org/ns/file</nowiki></code>
 
|-
 
| [[Full-Text Functions|Full-Text]]
 
| Functions for performing full-text operations.
 
| <code>ft</code>
 
| <code><nowiki>http://basex.org/ft</nowiki></code>
 
|-
 
| [[HTTP Functions|HTTP]]
 
| Sending HTTP requests, based on the [http://expath.org/spec/http-client EXPath HTTP] module.
 
| <code>http</code>
 
| <code><nowiki>http://expath.org/ns/http-client</nowiki></code>
 
|-
 
| [[JSON Functions|JSON]]
 
| Parsing and serializing [http://www.json.org JSON documents]. <font color="red">Version 6.8</font>
 
| <code>json</code>
 
| <code><nowiki>http://basex.org/json</nowiki></code>
 
|-
 
| [[Map Functions|Map]]
 
| Handling of map structures, based on a preliminary W3C Working Draft.
 
| <code>map</code>
 
| <code><nowiki>http://www.w3.org/2005/xpath-functions/map</nowiki></code>
 
|-
 
| [[Math Functions|Math]]
 
| Mathematical operations, extending the [http://www.w3.org/TR/xpath-functions-30/ W3C Working Draft].
 
| <code>math</code>
 
| <code><nowiki>http://www.w3.org/2005/xpath-functions/math</nowiki></code>
 
|-
 
| [[SQL Functions|SQL]]
 
| JDBC bridge to access relational databases. <font color='chocolate'>Version 6.8</font>
 
| <code>sql</code>
 
| <code><nowiki>http://basex.org/sql</nowiki></code>
 
|-
 
| [[Utility Functions|Utility]]
 
| Utility functions, used for data conversions, profiling and dynamic evaluation.
 
| <code>eval</code>
 
| <code><nowiki>http://basex.org/util</nowiki></code>
 
|-
 
| [[XSLT Functions|XSLT]]
 
| Stylesheet transformations, based on Java’s and Saxon’s XSLT processor.
 
| <code>xslt</code>
 
| <code><nowiki>http://basex.org/xslt</nowiki></code>
 
|-
 
| [[ZIP Functions|ZIP]]
 
| ZIP functionality, based on the [http://expath.org/spec/zip EXPath ZIP] module.
 
| <code>zip</code>
 
| <code><nowiki>http://expath.org/ns/zip</nowiki></code>
 
|}
 
  
Note that all namespace URIs are statically bound in BaseX, i.e., they need not be declared in the query prolog.
+
;[[Java Bindings]]
All XQuery 3.0 functions are listed in the [http://www.w3.org/TR/xpath-functions-30/ XQuery 3.0 Functions and Operators] draft; they are [[XQuery_3.0#Functions|all supported by BaseX]].
+
Accessing and calling Java code from XQuery.
  
==Indexes==
+
;[[Repository]]
Queries will be analyzed and optimized for index access on the fly.
+
Install and manage XQuery and Java modules.
 +
</div><div style="float:left; width:4%;">&nbsp;
 +
</div><div style="float:left; width:48%;">
 +
;[[Full-Text]]
 +
How to use BaseX as a full-fledged full-text processor.
  
*[[Indexes|Overview]]: All indexes and their functionality
+
;[[Updates]]
*[[Execution Plan]]: Execution plans of the queries
+
Updating databases and local resources via XQuery Update.
  
[[Category:XQuery]]
+
;[[Indexes]]
 +
Available index structures and their utilization.
 +
 
 +
;[[Serialization]]
 +
Serialization parameters supported by BaseX.
 +
 
 +
;[[XQuery Errors|Errors]]
 +
Errors raised by XQuery expressions.
 +
</div>
 +
<div>&nbsp;</div>
 +
 
 +
 
 +
__NOTOC__

Revision as of 14:59, 17 January 2016

Welcome to the Query Portal, which is one of the Main Sections of this documentation. BaseX provides an implementation of the W3 XPath and XQuery languages, which are tightly coupled with the underlying database store. However, the processor is also a flexible general purpose processor, which can access local and remote sources. High conformance with the official specifications is one of our main objectives, as the results of the XQuery Test Suite demonstrate. This section contains information on the query processor and its extensions:

XQuery 3.0 and XQuery 3.1

Features of the new XQuery Recommendations.

XQuery Extensions

Specifics of the BaseX XQuery processor.

Module Library

Additional functions included in the internal modules.

Java Bindings

Accessing and calling Java code from XQuery.

Repository

Install and manage XQuery and Java modules.

 
Full-Text

How to use BaseX as a full-fledged full-text processor.

Updates

Updating databases and local resources via XQuery Update.

Indexes

Available index structures and their utilization.

Serialization

Serialization parameters supported by BaseX.

Errors

Errors raised by XQuery expressions.