You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using xmlschema for validating (and only for that). I am currently authoring a few schemas to fit a complex xml format that has not previously had a schema of any kind. For this purpose line numbers for each violation is very helpful.
It seems xmlschema can do validation on both lxml.etree and xml.etree.ElementTree. The latter is default, and is used whenever any of the functions receive a file/filepath. Only if the application code parses the tree with lxml and passes that argument onto xmlschema, will it use lxml. And only in that case will schema violations be printed with a source line number (lxml retains source line number for each element, while xml does not).
Im sure there is a good reason that the code defaults to the native xml package instead of lxml. Could you possibly share those reasons?
I already changed the xmlschema code on my own machine so the cli tools use lxml. If I modify the code, and add a cli parameter (e.g. --lxml) to the cli tools, would you consider such a pull request (no offense if prefer not to get such a PR, and no offence you evaluate the PR and decide not to adopt it or modify it extensively).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using xmlschema for validating (and only for that). I am currently authoring a few schemas to fit a complex xml format that has not previously had a schema of any kind. For this purpose line numbers for each violation is very helpful.
It seems xmlschema can do validation on both
lxml.etreeandxml.etree.ElementTree. The latter is default, and is used whenever any of the functions receive a file/filepath. Only if the application code parses the tree with lxml and passes that argument onto xmlschema, will it use lxml. And only in that case will schema violations be printed with a source line number (lxml retains source line number for each element, while xml does not).Im sure there is a good reason that the code defaults to the native
xmlpackage instead oflxml. Could you possibly share those reasons?I already changed the xmlschema code on my own machine so the cli tools use lxml. If I modify the code, and add a cli parameter (e.g.
--lxml) to the cli tools, would you consider such a pull request (no offense if prefer not to get such a PR, and no offence you evaluate the PR and decide not to adopt it or modify it extensively).Sincerely, Thomas
Beta Was this translation helpful? Give feedback.
All reactions