From 5df42f14da6191a94a09e86bc73a9e7442c2001d Mon Sep 17 00:00:00 2001 From: wactbprot <wactbprot@gmail.com> Date: Tue, 11 Dec 2018 07:48:58 +0100 Subject: [PATCH] xsd 1.8.3 --- NOTIZEN.md | 26 ++++++++++++++++++++++++++ README.md | 28 ++-------------------------- server.py | 2 +- 3 files changed, 29 insertions(+), 27 deletions(-) create mode 100644 NOTIZEN.md diff --git a/NOTIZEN.md b/NOTIZEN.md new file mode 100644 index 0000000..f95335a --- /dev/null +++ b/NOTIZEN.md @@ -0,0 +1,26 @@ +## Notizen + +### Hinweise zur Python-Bibliothek »lxml« + +Tests ergaben Schwierigkeiten beim https-Zugriff. + +»lxml« und »xmllint« verwenden beide die Linux/Unix-Bibliotheken »libxml2« und +»libxslt«. + +* [Home-Page](https://lxml.de/) +* [Einfache Beispiele](https://stackoverflow.com/questions/299588/validating-with-an-xml-schema-in-python) + + + +### Hinweise zur Python-Bibliothek »xmlschema« + +Die hier benutzte Bibliothek. + +* [Home-Page](https://xmlschema.readthedocs.io/en/latest/usage.html) +* [Einfache Beispiele](https://stackoverflow.com/questions/299588/validating-with-an-xml-schema-in-python) + +### Hinweise zu »xmllint« +``` +xmllint --noout --schema DCC_v1.8.1.xsd 11044_17_DCC_v1.8.1_Au.xml +xmllint --valid --noout 11044_17_DCC_v1.8.1_Au.xml +``` diff --git a/README.md b/README.md index 20380f3..cb4e895 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,9 @@ # xml-validation -HTML-Server written in Python for validation of xml (e.g. DCC xml) against a +HTTP-Server written in Python for validation of xml (e.g. DCC xml) against a XML Schema. -## Notizen - -»lxml« und »xmllint« verwenden beide die Linux/Unix-Bibliotheken »libxml2« und -»libxslt«. - -### Hinweise zur Python-Bibliothek »lxml« - -* [Home-Page](https://lxml.de/) -* [Einfache Beispiele](https://stackoverflow.com/questions/299588/validating-with-an-xml-schema-in-python) - - -### Hinweise zur Python-Bibliothek »xmlschema« - -* [Home-Page](https://xmlschema.readthedocs.io/en/latest/usage.html) -* [Einfache Beispiele](https://stackoverflow.com/questions/299588/validating-with-an-xml-schema-in-python) - -### Hinweise zu »xmllint« -``` -xmllint --noout --schema DCC_v1.8.1.xsd 11044_17_DCC_v1.8.1_Au.xml -xmllint --valid --noout 11044_17_DCC_v1.8.1_Au.xml -``` - -### Installation +## Installation ``` > git clone git@a75436.berlin.ptb.de:vaclab/xml-validation.git @@ -40,8 +18,6 @@ xmllint --valid --noout 11044_17_DCC_v1.8.1_Au.xml ### /validate endpoint [POST] - - ``` > curl -X POST -H "Content-Type: text/xml" -d @valid_xml_matches_xsd http://localhost:5005/validate > <ok/> diff --git a/server.py b/server.py index dc070ca..226343d 100644 --- a/server.py +++ b/server.py @@ -6,7 +6,7 @@ config = utils.get_config_dict() git_cmd = utils.git_cmd(config) ## kommt später vom server -xsd_file_name = 'DCC_v1.8.1.xsd' +xsd_file_name = 'DCC_v1.8.3.xsd' app = Flask(__name__) CORS(app) -- GitLab