Jump to content
Wikipedia The Free Encyclopedia

Zorba (XQuery processor)

From Wikipedia, the free encyclopedia
This article needs additional citations for verification . Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Zorba" XQuery processor – news · newspapers · books · scholar · JSTOR
(February 2024) (Learn how and when to remove this message)
Open-source query processor
Zorba
Initial release2008
Final release
3.1 / June 31, 2015; 10 years ago (2015-06-31)
Repository https://github.com/28msec/zorba
Written inC++
Type XQuery engine
License Apache-2.0 license

Zorba is an open source query processor written in C++,[1] implementing

Zorba is distributed under Apache License, Version 2.0. The project is mainly supported by the FLWOR Foundation, Oracle, and 28msec [usurped ].

Zorba isn't under active development any more. The GitHub repo's last commit is from 2017[2] while the last release 3.1 is from June 2015[3] ; the latest version 2.9.1 on SourceForge dates from May 2013.[4]

Specifications

[edit ]

Zorba provides the implementation of the following W3C specifications:

Zorba also provides implementations of:

Scripting

[edit ]

Scripting Extension Archived 2014年02月21日 at the Wayback Machine is an open specification that provides semantic for side-effects in XQuery or JSONiq programs. It also provides a user-friendly syntax for imperative programming within such programs. The following code snippet is an example of the Scripting syntax. It computes a sequence containing all the Fibonacci numbers that are less than 100.

(: this is a variable declaration statement :)
variable$aasxs:integer:=0;
variable$basxs:integer:=1;
variable$casxs:integer:=$a+$b;
variable$fibseqasxs:integer*:=($a,$b);
while($clt100){
(: this is a variable assignment statement :)
$fibseq:=($fibseq,$c);
$a:=$b;
$b:=$c;
$c:=$a+$b;
}
$fibseq

The following is an example of CRUD operations using Scripting, XQuery, and XQuery Update.

variable$stores:=doc("stores.xml")/stores;
(: Create :)
insertnode<store><store-number>4</store-number><state>NY</state></store> into $stores;
(: Update :)
replacevalueofnode$stores/store[state="NY"]/store-numberwith"5";
(: Delete :)
deletenode$stores/store[state!="NY"];
(: Read :)
$stores

Data Definition Facility

[edit ]

Data Definition Facility Archived 2014年02月21日 at the Wayback Machine provides a semantic for persistent artifacts such as collections and indexes in XQuery or JSONiq programs. For instance, the following code snippets declares a collection named entries and an index on that collection named entry.

modulenamespaceg="http://www.zorba-xquery.com/guestbook";
importmodulenamespacedb="http://www.zorba-xquery.com/modules/store/static/collections/dml";
declarenamespacean="http://www.zorba-xquery.com/annotations";
(: Declares a collection named entries :)
declarecollectiong:entriesaselement(entry);
(: Declares a variable that points to the g:entries collection :)
declarevariable$g:entries:=xs:QName('g:entries');
(: Declares an index named entry on top of the entries collection :)
declare%an:automatic %value-equalityindexg:entry
onnodesdb:collection(xs:QName('g:entries'))
byxs:string(@id)asxs:string;

Storage

[edit ]

Zorba provides a pluggable store so it can be used on different kind of environments: disk, database, browser. By default, Zorba is built with a main memory store. 28msec [usurped ] implements a store on top of MongoDB. The XQuery in the Browser project has built a browser plugin for Zorba and leverages the DOM as its store.

APIs

[edit ]

Zorba is usable through different host languages Archived 2014年02月21日 at the Wayback Machine: C++, C, XQJ / Java, PHP, Python, C#, Ruby, and even XQuery/JSONiq Archived 2014年02月21日 at the Wayback Machine.

Zorba is also available as a command-line tool Archived 2014年02月21日 at the Wayback Machine.

XQDT is an XQuery plugin for the Eclipse (IDE). It fully supports Zorba API and syntax.

Modules

[edit ]

Zorba provides more than 70 XQuery modules for building applications. Some of these modules are:

  • File system, Email, HTTP client, OAuth client
  • XQuery and JSONiq Data Model Processing: typing, atomic items, and nodes.
  • Full-text: tokenizer, stemmer, thesaurus lookup.
  • Data Cleaning: phonetic similarities, set similarities, conversions.
  • Data Conversion: Base64, CSV, HTML, JSON, XML
  • Data Formatting: XSL-FO
  • Introspection and Reflection
  • Cryptography
  • Image processing

References

[edit ]
  1. ^ Changqing, Li; Wang, Ling, Tok (2010年02月28日). Advanced Applications and Structures in XML Processing: Label Streams, Semantics Utilization and Data Query Technologies: Label Streams, Semantics Utilization and Data Query Technologies. IGI Global. p. 40. ISBN 978-1-61520-728-2.{{cite book}}: CS1 maint: multiple names: authors list (link)
  2. ^ "zorba on Github". GitHub. 28msec. Retrieved 3 October 2025.
  3. ^ "Zorba Release 3.1 "Leto" on Github". Github. 28msec. Retrieved 3 October 2025.
  4. ^ "zorba on sourceforge.net". sourceforge.net. zorba. Retrieved 3 October 2025.
[edit ]

AltStyle によって変換されたページ (->オリジナル) /