Real-world examples demonstrating XML Pipeline Automation features.
File: 01-basic-validation/
Simple validation pipeline for XML documents.
Features:
- Schema validation (Relax NG + Schematron)
- Guardrail rule enforcement
- Error reporting
Usage:
cd 01-basic-validation
xml-lib pipeline run pipeline.yaml sample-input.xmlFile: 02-multi-format-output/
Transform XML into multiple output formats.
Features:
- Single XML source
- Multiple outputs (HTML, JSON, XML)
- Custom XSLT templates
- Report generation
Usage:
cd 02-multi-format-output
xml-lib pipeline run pipeline.yaml document.xml
# Outputs: out/document.html, out/document.json, out/document-clean.xmlFile: 03-schema-migration/
Migrate XML documents from legacy schema to new version.
Features:
- Pre-migration validation
- XSLT-based transformation
- Post-migration validation
- Rollback on failure
- Diff report generation
Usage:
cd 03-schema-migration
xml-lib pipeline run migrate.yaml legacy-data.xml
# Creates: out/migrated.xml, out/diff-report.html, out/audit.jsonlFile: 04-soap-processing/
Process SOAP messages with validation and enrichment.
Features:
- SOAP envelope validation
- WS-Security header verification
- Message enrichment
- Response generation
Usage:
cd 04-soap-processing
xml-lib pipeline run process-request.yaml request.xml
# Creates: out/response.xml, out/audit.jsonlFile: 05-ci-integration/
Automated validation for continuous integration pipelines.
Features:
- Pre-commit hooks
- GitHub Actions workflow
- Quality metrics
- Security checks
- JUnit XML reports
Usage:
cd 05-ci-integration
# Run locally
xml-lib pipeline run ci-pipeline.yaml src/**/*.xml
# Install pre-commit hook
cp pre-commit .git/hooks/
chmod +x .git/hooks/pre-commit
# Use in GitHub Actions (see .github/workflows/validate-xml.yml)# From repository root
make examples
# Or manually
for dir in examples/pipelines/*/; do
cd "$dir"
if [ -f "run.sh" ]; then
bash run.sh
fi
cd -
done- Copy an existing example as template
- Modify
pipeline.yamlfor your use case - Add sample input files
- Test with
xml-lib pipeline dry-run - Document in README.md
- Submit PR!
example-name/
├── README.md # Example documentation
├── pipeline.yaml # Pipeline definition
├── input/ # Sample input files
│ └── sample.xml
├── schemas/ # Validation schemas (if needed)
│ ├── schema.rng
│ └── rules.sch
├── transforms/ # XSLT transforms (if needed)
│ └── transform.xsl
├── templates/ # Output templates (if needed)
│ └── report.xsl
├── expected-output/ # Expected results for testing
│ └── expected.xml
└── run.sh # Run script with explanation
Have a useful example? We welcome contributions!
- Create your example following the structure above
- Test thoroughly with sample data
- Document clearly in README.md
- Submit a pull request
See CONTRIBUTING.md for guidelines.
- Questions: GitHub Discussions
- Issues: GitHub Issues
- Docs: Pipeline Guide