All Projects → zadean → Xqerl

zadean / Xqerl

Licence: apache-2.0
Erlang XQuery 3.1 Processor

Programming Languages

erlang
1774 projects

Labels

Projects that are alternatives of or similar to Xqerl

Xom
XOM™ is a new XML object model. It is an open source (LGPL), tree-based API for processing XML with Java that strives for correctness, simplicity, and performance, in that order.
Stars: ✭ 38 (-13.64%)
Mutual labels:  xml, xpath
Xpath
XPath package for Golang, supports HTML, XML, JSON document query.
Stars: ✭ 376 (+754.55%)
Mutual labels:  xml, xpath
Exist
eXist Native XML Database and Application Platform
Stars: ✭ 294 (+568.18%)
Mutual labels:  xml, xpath
Meeseeks
An Elixir library for parsing and extracting data from HTML and XML with CSS or XPath selectors.
Stars: ✭ 252 (+472.73%)
Mutual labels:  xml, xpath
Sirix
SirixDB is a temporal, evolutionary database system, which uses an accumulate only approach. It keeps the full history of each resource. Every commit stores a space-efficient snapshot through structural sharing. It is log-structured and never overwrites data. SirixDB uses a novel page-level versioning approach called sliding snapshot.
Stars: ✭ 638 (+1350%)
Mutual labels:  xml, xpath
XPath2.Net
Lightweight XPath2 for .NET
Stars: ✭ 26 (-40.91%)
Mutual labels:  xml, xpath
Xidel
Command line tool to download and extract data from HTML/XML pages or JSON-APIs, using CSS, XPath 3.0, XQuery 3.0, JSONiq or pattern matching. It can also create new or transformed XML/HTML/JSON documents.
Stars: ✭ 335 (+661.36%)
Mutual labels:  xml, xpath
Jquery Xpath
jQuery XPath plugin (with full XPath 2.0 language support)
Stars: ✭ 173 (+293.18%)
Mutual labels:  xml, xpath
Parsel
Parsel lets you extract data from XML/HTML documents using XPath or CSS selectors
Stars: ✭ 628 (+1327.27%)
Mutual labels:  xml, xpath
Basex
BaseX Main Repository.
Stars: ✭ 515 (+1070.45%)
Mutual labels:  xml, xpath
Ono
A sensible way to deal with XML & HTML for iOS & macOS
Stars: ✭ 2,599 (+5806.82%)
Mutual labels:  xml, xpath
Amazon Mobile Sentiment Analysis
Opinion mining of Mobile reviews on Amazon platform
Stars: ✭ 19 (-56.82%)
Mutual labels:  xml, xpath
Pugixml
Light-weight, simple and fast XML parser for C++ with XPath support
Stars: ✭ 2,809 (+6284.09%)
Mutual labels:  xml, xpath
XPathTools
A Visual Studio Extension which can run any XPath and XPath function; navigates through results at the click of a button. Can show and copy any XPath incl. XML namespaces, avoiding XML namespace induced headaches. Keeps track of the current XPath via the statusbar.
Stars: ✭ 40 (-9.09%)
Mutual labels:  xml, xpath
Xmlquery
xmlquery is Golang XPath package for XML query.
Stars: ✭ 209 (+375%)
Mutual labels:  xml, xpath
Fluentdom
A fluent api for working with XML in PHP
Stars: ✭ 327 (+643.18%)
Mutual labels:  xml, xpath
Graphquery
GraphQuery is a query language and execution engine tied to any backend service.
Stars: ✭ 112 (+154.55%)
Mutual labels:  xml, xpath
Xquery
Extract data or evaluate value from HTML/XML documents using XPath
Stars: ✭ 155 (+252.27%)
Mutual labels:  xml, xpath
Camaro
camaro is an utility to transform XML to JSON, using Node.js binding to native XML parser pugixml, one of the fastest XML parser around.
Stars: ✭ 438 (+895.45%)
Mutual labels:  xml, xpath
Fuzi
A fast & lightweight XML & HTML parser in Swift with XPath & CSS support
Stars: ✭ 894 (+1931.82%)
Mutual labels:  xml, xpath

xqerl

Logo

Erlang XQuery 3.1 Processor and XML Database

New to Erlang?

Check out the Getting Started section

What is xqerl?

xqerl is a self-contained XQuery 3.1 processor and XML database written in Erlang.

  • xqerl can be embedded into Erlang or Elixir applications or be used as a stand-alone.
    • A small example of embedding XQuery into Erlang can be found here.
  • User code is written in XQuery.
  • The XQuery code is compiled to BEAM (the VM that runs Erlang, Elixir, and others).
  • xqerl can use REST to speak to the outside-world. The REST end-points are defined by the user using XQuery and RESTXQ annotations.

xqerl is being actively developed and is not yet to a stable release. Changes can occur without notice. If you save data with it, that data may not be compatible with the most recent version of this repository in the master branch.

The first stable release will be coming soon, but isn't quite there yet.

It is passing 100% of 30,895 test cases it runs. 1,823 other cases that test optional features or unsupported specification versions are skipped. Most of the test cases run are from the W3C QT3 test suite for XPath and XQuery. Others are from the EXPath test suite and the Update Facility test suite for version 1.0.

Modules

The modules statically available to XQuery code in xqerl are documented in the xqerl documentation

Features it has

Features it does not have

  • Schema Aware & Typed Data Features
  • Full-Text Extension

Using

There is no cool GUI or web interface. If you need that, you may want to try out one of the other XQuery processors out there that do have those features. But since this implementation follows the specification, code written in another conforming processor should work just fine here. A GUI may eventually be coming, but that will take some time and quite a bit of effort.

There is also no web-based administration tool. This will also eventually be added.

The main idea with xqerl is to take XQuery code that works in other processors and turn that into scalable, concurrent Erlang applications.

xqerl compiles all code before use. That is, it does not compile on-the-fly. To compile an XQuery module from file, use: xqerl:compile(FileName). The value returned from the xqerl:compile(FileName) call is an atom with the name of the module. This atom is the Erlang module name, and can be used to call Main modules. For example:

(xqerl_node@127.0.0.1)1> M = xqerl:compile("/home/coolperson/coolModule.xq").
file____home_coolperson_coolModule_xq
(xqerl_node@127.0.0.1)2> xqerl:run(M, #{}).

The map parameter is the external context given to the query. This is where external variable values and the context-item can be set.

The return value will depend on the serialization parameters in effect in the source file. With no parameters, an Erlang term will be returned. With a serialization method, a binary containing the serialized return value will be returned.

Library modules must also be pre-compiled before use. Also, modules that have dependencies must be compiled from the bottom-up, that is, those with no imports first.

Loading Data

To load data into the database use the xqldb_dml:insert_doc(DocUri, Filename) function. As the parameter names point out, the first parameter is the URI that will be used in functions like fn:doc or fn:collection, and the second value is the absolute file location to insert. Deleting data is done with function xqldb_dml:delete_doc(DocUri).

Building

rebar3 is the best way to build xqerl (and its dependencies) from source. In the future, release packages will be bundled for easy installation.

Running tests

rebar3 ct --spec "test/test.specs"

Contributing

Yes, please. I've been doing it alone, so any help is much appreciated. This doesn't just mean hacking Erlang, but could include adding documentation, tutorials, or just opening an issue for something you think is missing or would be a really cool thing to have included.

Or maybe you are more the social-media type? Reach out on twitter to @xqerl.

There is also a Slack workspace... named... you guessed it! xqerl.slack.com.

TODO's

  • A query-rewrite phase
  • A cost-based implementation that can be run at the database level would be cool
  • Moving atomic operators over to Rust NIFs (Petaurista)
  • Indexes (indices) could be added for the more common access paths to the data

... and likely more things ...

see "Contributing"

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].