-
Notifications
You must be signed in to change notification settings - Fork 71
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
Add XML Schema Validation #171
Comments
@kehoecj Looking into this and see what’s possible. |
@kehoecj Can you please assign it to me? Just so I don't lose track :) |
@kehoecj Do you have a specific file naming convention for the schema and syntax validators to differentiate them? Or should I create a new directory of schema validators? Just getting some information to keep it maintainable for everyone. Thanks 😄 |
Schema validation should be in the validator package and inside the |
@kehoecj Sorry if I'm bombarding you, but I need some guidance. If we want to enable validation against XSD or DTD, we would also need to provide a way for the user to specify a path to the schema file, right? But this would end up in a new flag? Or am I thinking the wrong way? |
@kehoecj Just tagging you so that you can give me a little hint as to how I might do it. Thanks :) |
You're on the right track. With XML the XSD/DTD URL or local path can be declared in the XML. We may want to just start with that as the MVP/POC. It's likely one of the go XML libraries already does some of this. Here's what I'm thinking:
@timwehrle Does that help? |
@kehoecj Ah, yes. Thank you. I was probably overthinking it and missed the simpler solution. |
@kehoecj So basically my code can retrieve the XSD/DTD schema file (had to implement a custom function using regex because the go xml libraries don't provide a way). But the problem is that I can't read the file because I would need to locate it first. But I can't manage to use the already implemented FileFinder that is in the project because it would resolve in import cycle errors. How would you proceed from here? Should I implement a function myself? Thanks for helping out :) |
Breaking #40 into smaller chunks for Hacktoberfest. We'd really like to start adding schema validation in addition to syntax validation. XML seems like a good one to start with. We'd like to support validation against DTD as well as XSD.
The text was updated successfully, but these errors were encountered: