GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - xmlvalid/validate-action: GitHub Action: validate XML against XSD, DTD, RelaxNG and Schematron with xmlvalid.com

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
BranchesTags
Open more actions menu

Latest commit

 

History

6 Commits
6 Commits

Folders and files

NameName
Last commit message
Last commit date
LICENSE
LICENSE
 
 
README.md
README.md
 
 
action.yml
action.yml
 
 

Repository files navigation

xmlvalid GitHub Action

Validates XML files and e-invoices in your repository with xmlvalid.com and marks the failing lines in the pull request: XSD 1.0, DTD and RelaxNG schemas, your own Schematron rules, and the business rules of EN 16931, Peppol BIS and PINT, XRechnung, Factur-X / ZUGFeRD and national e-invoicing formats from the schema catalog.

name: XML
on: [push, pull_request]

jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: xmlvalid/validate-action@v1
        with:
          files: |
            invoices/**/*.xml
          schema: ubl-2.1-invoice
          api-key: ${{ secrets.XMLVALID_API_KEY }}

E-invoices of several formats, each checked against the profile it names (Peppol, XRechnung, Factur-X…), with an HTML report kept as an artifact:

      - uses: xmlvalid/validate-action@v1
        with:
          files: invoices/**/*.xml
          schema: auto
          report: xmlvalid-report.html
          api-key: ${{ secrets.XMLVALID_API_KEY }}
      - uses: actions/upload-artifact@v4
        if: always()
        with:
          name: xmlvalid-report
          path: xmlvalid-report.html

Make a key under Dashboard → API keys and store it as the XMLVALID_API_KEY secret. Each file is one API validation (Free: 100 a month, Pro: 10,000).

Input
files files or globs, one per line or space-separated
urls public URLs, one per line
schema a catalog slug (atom-1.0), a saved schema (@orders-v3), or auto for the profile each e-invoice names
schema-file an XSD, DTD or RelaxNG file in the repository
rules your own Schematron (.sch) file in the repository, run after the schema check
rules-version pins such as [email protected], one per line: fail when the business rules are at another release
doctype true to validate against each document's DOCTYPE
fail-on-warnings true to fail on warnings
report also write an HTML report of every document to this path (keep it with actions/upload-artifact)
share true to also make a public link to the report, open for 30 days (Pro); in the job summary and the report-url output
api-key required
api-url the API base URL, default https://xmlvalid.com/api/v1
cli-version the @xmlvalid/cli version to run, default 1

A schema that spans several files (imports, includes) is easiest to save once in the dashboard and use by its @… name.

The step runs @xmlvalid/cli with npx; the runner needs Node.js 20 or newer (GitHub-hosted runners have it).

About

GitHub Action: validate XML against XSD, DTD, RelaxNG and Schematron with xmlvalid.com

xmlvalid.com/docs/ci

Topics

cie-invoicingen16931factur-xgithub-actionpeppolschematronxmlxml-validationxrechnungxsdzugferd

Resources

Readme
MIT license
Activity
Custom properties

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.