You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an XQuery Function Extension Module for eXist-db. The module provides a CQL (Corpus Query Language) to XML parser based on [exquery/corpusql-parser](https://github.com/exquery/corpusql-parser).
7
+
This is an XQuery Function Extension Module for Elemental or eXist-db. The module provides a CQL (Corpus Query Language) to XML parser based on [exquery/corpusql-parser](https://github.com/exquery/corpusql-parser).
You can install the module into eXist-db in either one of two ways:
10
+
## Installation into Elemental or eXist-db
11
+
You can install the module into Elemental or eXist-db in either one of two ways:
22
12
1. As an EXPath Package (.xar file)
23
13
2. Directly as a XQuery Java Extension Module (.jar file)
24
14
25
-
### EXPath Package Installation into eXist-db (.xar)
26
-
1. If you have compiled yourself (see above), you can take the `cql-module/target/cql-module-1.4.0-SNAPSHOT.xar` file and upload it via eXist's EXPath Package Manager app in its Dashboard
15
+
### Easy Option - EXPath Package Installation into eXist-db (.xar)
16
+
1. Download the latest XAR file from the releases here: https://github.com/BCDH/cql-module/releases/
17
+
* or if you have [compiled](#compiling) the code yourself you can find the `cql-module-1.5.0-SNAPSHOT.xar` file in the `target` subfolder.
18
+
19
+
2. You can take the .xar file and upload it via Elemental or eXist-db's EXPath Package Manager app from its Dashboard
27
20
28
-
2. Otherwise, the latest release version will also be available from the eXist's EXPath Package Manager app in its Dashboard
21
+
3. Restart Elemental (or eXist-db)
29
22
23
+
### Advanced Option - Direct Installation into eXist-db (.jar)
24
+
1. Download the latest Jar file from the releases here: https://github.com/BCDH/cql-module/releases/
25
+
* or if you have [compiled](#compiling) the code yourself you can find the `cql-module-1.5.0-SNAPSHOT-exist.jar` file in the `target` subfolder.
30
26
31
-
### Direct Installation into eXist-db (.jar)
32
-
1. If you have compiled yourself (see above), copy `cql-module/target/cql-module-1.4.0-SNAPSHOT-exist.jar` to `$EXIST_HOME/lib`, or download `cql-module-1.3.0-exist.jar` from Maven Central to `$EXIST_HOME/lib`
27
+
2. Copy the .jar file to either `$ELEMENTAL_HOME/lib` (or substitute `$EXIST_HOME` instead of `$ELEMENTAL_HOME` for eXist-db).
33
28
34
-
2. Edit `$EXIST_HOME/etc/conf.xml` and add the following to the `<builtin-modules>`:
29
+
3. Edit `$ELEMENTAL_HOME/etc/conf.xml` and add the following to the `<builtin-modules>`:
3. Edit `$EXIST_HOME/etc/startup.xml` and add the following to the `<dependencies>`:
34
+
4. Edit `$ELEMENTAL_HOME/etc/startup.xml` and add the following to the `<dependencies>`:
40
35
41
-
```xml
42
-
<dependency>
43
-
<groupId>org.humanistika.exist.module</groupId>
44
-
<artifactId>cql-module</artifactId>
45
-
<version>1.4.0-SNAPSHOT</version> <!-- modify to the version you are using -->
46
-
<relativePath>cql-module-1.4.0-SNAPSHOT-exist.jar</relativePath> <!-- this should reflect the exact filename in lib folder -->
47
-
</dependency>
48
-
```
36
+
```xml
37
+
<dependency>
38
+
<groupId>org.humanistika.exist.module</groupId>
39
+
<artifactId>cql-module</artifactId>
40
+
<version>1.5.0-SNAPSHOT</version> <!-- NOTE: Modify this to the version you are using -->
41
+
<relativePath>cql-module-1.5.0-SNAPSHOT-exist.jar</relativePath> <!-- NOTE: this should reflect the exact filename in lib folder that you copied earlier -->
42
+
</dependency>
43
+
```
44
+
45
+
5. Restart Elemental (or eXist-db)
49
46
50
-
4. Restart eXist-db
51
47
52
48
## Usage
53
49
The module exports a single function for use in your XQuery(s), for example:
@@ -74,3 +70,12 @@ would produce the output:
74
70
```
75
71
76
72
For further examples of the XML that will be produced see [CorpusQLXMLVisitorTest](https://github.com/BCDH/cql-module/blob/master/src/test/java/org/humanistika/exist/module/cqlmodule/CorpusQLXMLVisitorTest.java#L42)
0 commit comments