Fixed "regexp error" when using libxml2 to load the xsd file #118
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm currently working on a template system, where I generate the XML files, and I wanted to validate them. I inderictly use
libxml2
from python vialxml
to validate the generated XML files with theTrustFrameowrkPolicy_0.3.0.0.xsd
schema file, but I get errors saying that line3689
of the xsd file contains an invalid regular expression pattern.From
xmllint
:From python (in WSL/Ubuntu):
You can also reproduce the issue with the command line tools of
libxml2
:sudo apt install libxml2-utils
xmllint --schema TrustFrameworkPolicy_0.3.0.0.xsd TrustFrameworkBase.xml --noout
With python you can reproduce it the following way:
pip install lxml==4.8.0 cython==0.29.28
repro.py
repro.py
file:This PR addresses the issue. I need to test this with VSCode too, but I'm not using it on day to day basis, so it would be great if somebody could test this or point me to the right direction so I can set it up myself.
P.S.: Sorry about the whitespace changes.