diff --git a/NOTIZEN.md b/NOTIZEN.md new file mode 100644 index 0000000000000000000000000000000000000000..f95335a185b9c67b1f343d62254bf7739c014ec9 --- /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 20380f3193321e416b60ece570bcd7259281da4b..cb4e8952b1788c774fb51e96bf9c5cb530b437b3 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 dc070caf5a03e7bc60ffb950d195c8c622ef2071..226343dbd974c05d0d4d5d7e8acc890e8e756e92 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)