๐ฎ Validation of PCDH files
Why ?โ
- Check if XML files are valid PCDH messages ?
info
This project does it on each git change : ( Source code )
Prerequisitesโ
- Local XSDs of the soa-farmaflux you would like to use (e.g
2.0.2
) - XMLLint, which is an Open Source tool you can download on your platform :
- Debian based Linux
- RHEL based Linux (such as CentOS)
- MacOS
- Windows
sudo apt-get update -qq
sudo apt-get install -y libxml2-utils
sudo yum update -qq
sudo yum install -y xmlstarlet
# Should be built in to MacOS, but in case of :
brew install libxml2
# Use "Chocolatey" package manager (https://community.chocolatey.org/)
choco install xsltproc
Stepsโ
- Download & unzip your soa-farmaflux XSD files
- Check if XML file is valid KMEHR file, by running a command similar to this one :
xmllint --catalogs --noout --schema ./soa-farmaflux/maindoc/single-message-oa-1.0.xsd ./path/to/your/file/test-PCDH.xml
- If it is valid, you will receive a status 0 of this command. Otherwise, you have an error somewhere ...