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

Retrieving xsd annotation and xsd documentation for elements with errors #31

Open
renegadeandy opened this issue Aug 28, 2018 · 3 comments

Comments

@renegadeandy
Copy link

Hi,

If I get an error on a particular element, I get a JSON object back in the validate callback which looks as follows:

{"domain":17,"code":1866,"level":2,"column":0,"line":149,"str1":"tracmaxFiles"}

This error element has xsd:annotations and xsd:documentation tags associated with it. Is is possible to get access to these elements? Are their alternative libraries which could do this if this can't. If not, would it be possible to extend libxml-xsd to make this a capability?

Thanks!

@albanm
Copy link
Owner

albanm commented Aug 30, 2018

You would like to access the element that caused the error ? Seems like a good idea, I don't know if it is doable. I don't maintain this module actively, but I review pull requests, so feel free to look into it and submit a PR.

@renegadeandy
Copy link
Author

hahah 👍 Okay, if I somehow find time i'll look into extending it!

@renegadeandy
Copy link
Author

renegadeandy commented Sep 5, 2018

Actually, it's not quite just access the element, some elements have annotations or documentation, I would like to have these in the response object. I have taken a quick look, and I may be wrong, but I believe that I would need to modify libxmljs-mt in order to achieve what I want with this module. Does that seem / sound right?

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