Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Support for URN mappings for XML Schema #27

Open
dfelton opened this issue Aug 25, 2022 · 2 comments
Open

Feature Request: Support for URN mappings for XML Schema #27

dfelton opened this issue Aug 25, 2022 · 2 comments

Comments

@dfelton
Copy link

dfelton commented Aug 25, 2022

Scenario:

If the XML Schema defined in a file utilizes an URN value as opposed to a path or URL, validation against the schema currently fails. Reviewing the output of --help, as well as this repository's README.md, it does not appear there is any ability to specify a map value for URNs. This leaves us to be forced to pass -s and never perform XSD validation despite having an XML Schema to validate against.

Feature Request:

Support for URN mappings to specify the location of an XSD file when a given URN value is encountered.

Misc Note: It would be nice if this feature were introduced by implementing support for some sort of .xml-lint.xml configuration file (as a default value), or option to specify a configuration file in the command. This XML file could then contain multiple mappings in the event that a directory of XML files contains files that follow more than one XSD. As opposed to having to always know the URN value of an XML file prior to validation, and always having to then pass the appropriate path/url to the XSD for each and every file.

Final Thoughts:

The "misc note" above could in turn be expanded upon in future new features, so that users can configure their entire test suite (all files / directories to be scanned, files / directories to be ignored, etc). Doing so would then simplify CI efforts if someone wants to implement this XML linter into their automated code quality checks.

@m-bymike
Copy link
Contributor

Hi @dfelton ,

this is a great request. I ran into the same issue already in the past, but retreated to -s and didn't think of a missing feature.

Unfortunately my time is very limited at the moment, as you might have already guessed by looking at the response time. Sorry for that.

I'm always happy for PRs, otherwise I'll pick it up as soon as I can :)

br

@dfelton
Copy link
Author

dfelton commented Sep 12, 2022

Unfortunately my time is very limited at the moment, as you might have already guessed by looking at the response time. Sorry for that.

As a father of a 3 and 1 year old I absolutely understand haha

I'm always happy for PRs, otherwise I'll pick it up as soon as I can :)

I'll see what I can do, as you can probably suspect from my prior comment, "as soon as I can" can be a rather vague timeline here too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants