Download the PHP package mmnewmedia/schematron-parser without Composer

On this page you can find all versions of the php package mmnewmedia/schematron-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package schematron-parser

mmnewmedia/schematron-parser

XPath expression parser and compiler for Schematron rule files in PHP.

The library tokenizes and parses XPath 1.0 expressions into an AST, compiles them into executable PHP code, and can generate one PHP rule class per sch:assert / sch:report from a .sch file. It powers the pure-PHP EN 16931 / Factur-X / ZUGFeRD Schematron validation (no Java required at runtime).

Requirements

Installation

Overview

Parsing and compiling XPath expressions

XPathAstCompiler also accepts the AST directly ($parser->parse(...) + $compiler->compile(...)), and individual XPath functions can be compiled with a plain new XPathAstCompiler([]) if no function library is needed.

The compiler ships implementations for the XPath 1.0 core functions plus the extensions used by EN 16931 schematron (upper-case, lower-case, matches, tokenize, distinct-values, starts-with, ends-with, exists, empty, xs:date, xs:decimal, …) under Compiler/Functions/. Custom functions implement XPathFunctionInterface (or NodeSetAwareFunctionInterface) and are picked up by FunctionLoader.

The discovered class list is cached per directory/namespace, so repeated load() calls do not rescan the filesystem. Call FunctionLoader::clearCache() if the functions directory changes at runtime.

Generating rule classes from a .sch file

Each sch:assert / sch:report becomes a final class with:

CLI

Compiles a single Schematron file: every sch:assert / sch:report is written as a PHP rule class into <outputDir>, using <namespace> as the generated class namespace.

Codedb lookups

Some Factur-X rules resolve codelist entries at runtime via CodedbCodeList::has(), which scans codedb XML files. Point it at your files before evaluating generated rules:

Without configuration it looks in <base>/data/zugferd/{_generated,_preprocessed,_XSLT}.

Tests

Static analysis

Psalm runs with errorLevel="5" (mirroring the original project configuration).

License

This project is licensed under the BSD 3-Clause License. See the LICENSE file for the full text.


All versions of schematron-parser with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4|^8.5
ext-dom Version *
ext-mbstring Version *
symfony/console Version ^7.3 || ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mmnewmedia/schematron-parser contains the following files

Loading the files please wait ...