https://github.com/op-ted/efx-toolkit-java
This is an EFX translator written in Java. It supports multiple target languages. It includes an EFX expression translator to XPath. It is used to in the generation of the Schematron rules in the eForms SDK.
https://github.com/op-ted/efx-toolkit-java
antlr4 eforms java library transpiler xpath
Last synced: 6 months ago
JSON representation
This is an EFX translator written in Java. It supports multiple target languages. It includes an EFX expression translator to XPath. It is used to in the generation of the Schematron rules in the eForms SDK.
- Host: GitHub
- URL: https://github.com/op-ted/efx-toolkit-java
- Owner: OP-TED
- License: eupl-1.2
- Created: 2022-05-01T21:37:33.000Z (about 4 years ago)
- Default Branch: develop
- Last Pushed: 2025-10-10T10:20:56.000Z (9 months ago)
- Last Synced: 2025-10-10T12:03:08.985Z (9 months ago)
- Topics: antlr4, eforms, java, library, transpiler, xpath
- Language: Java
- Homepage:
- Size: 7.95 MB
- Stars: 12
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
**[:memo: Latest Release Notes](CHANGELOG.md)** | **[:package: Latest Release Artifacts](https://central.sonatype.com/artifact/eu.europa.ted.eforms/efx-toolkit-java)**
---
# Java toolkit for the eForms Expression Language (EFX)
The **EFX Toolkit[^1] for Java developers** is a library that enables the transpilation of [EFX](https://docs.ted.europa.eu/eforms/latest/efx) expressions and templates to different target languages. It also provides an implementation for translating EFX expressions to XPath.
The documentation is available at: https://docs.ted.europa.eu/eforms/latest/efx-toolkit
## Using the EFX toolkit[^1]
The EFX toolkit requires Java 11 or later.
It is available as a Maven package on Maven Central and can be used by adding the following to the project's `pom.xml`.
```XML
...
eu.europa.ted.eforms
efx-toolkit-java
${efx-toolkit.version}
...
```
Replace `${efx-toolkit.version}` with the latest version available, or define the corresponding property in your `pom.xml`.
The [documentation](https://docs.ted.europa.eu/eforms/latest/efx-toolkit) describes the capabilities of the library, and the interfaces you might need to implement.
## Building
You can build this project as usual using Maven.
The build process uses the grammar files provided in the [eForms SDK](https://github.com/OP-TED/eForms-SDK/tree/develop/efx-grammar) to generate a parser, using [ANTLR4](https://www.antlr.org).
## Testing
Unit tests are available under `src/test/java/`. They show in particular a variety of EFX expressions and the corresponding XPath expression.
After running the unit tests with `mvn test`, you can generate a coverage report with `mvn jacoco:report`.
The report is available under `target/site/jacoco/`, in HTML, CSV, and XML format.
## Download
You can download the latest EFX Toolkit from Maven Central.
[](https://central.sonatype.com/artifact/eu.europa.ted.eforms/efx-toolkit-java)
[^1]: _Copyright 2022 European Union_
_Licensed under the EUPL, Version 1.2 or – as soon they will be approved by the European Commission –
subsequent versions of the EUPL (the "Licence");_
_You may not use this work except in compliance with the Licence. You may obtain [a copy of the Licence here](LICENSE)._
_Unless required by applicable law or agreed to in writing, software distributed under the Licence is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence._