-
Notifications
You must be signed in to change notification settings - Fork 11
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
AssertionError on adding a valid schema #1
Comments
Yes, parser is not perfect yet. I mostly implemented stuff needed for me, plus checking the standard a bit. But there are things missing. This is why I added assertions everywhere. :-) Better that it fails than that it says something is parsed but it is not really. Do you know which line it fails on? |
From looking at the schema, it will probably fail at It currently also ignores groups because I didn't have a need to use that. So referencing a group will probably also fail. Can you make a pull request with a test of this schema and some valid data? I could then look into it (or we could do it together, I do not have much time this days). Add it to |
It seems we could just delete |
Ping? |
Can you provide me with an example XML and schema? |
Sorry, I was offline for some time. Do we really need example XML if there adding the schema to parser fails? Don't get me wrong, I've got a bunch of schemas and XML (several hundreds of gigabytes namely), but I just didn't get that far yet. |
Example XML is needed to create a test so that in the future there will be no regression. It can be a small XML, with just problematic parts. It does not have to be a XML with real data. |
I don't know if it'll be appropriate for the current project stage, but the schema mensioned (http://www.w3.org/2001/XMLSchema.xsd) is in fact can be considered an XML document that should pass itself considered as a schema. As far as I understand. |
Good idea. I can try that as well. :-) |
I am having the same issue, according to this link, complexType can have id, name, abstract, mixed, block, final... but you are only checking name and abstract: https://github.com/peerlibrary/node-xml4js/blob/master/lib/xsd.js#L311 |
On which value does it fail? I think it would be easy to ignore |
it fails on literally any value on any property other than |
Because I have not went through the whole list of other properties which can be there and think if they do or do not contribute to the resulting type. |
Fails to add this schema to parser:
XMLSchema.xsd
An AssertionError dumps to console.
P.S. Thank you for the library and idea. Never found time to implement it myself.
The text was updated successfully, but these errors were encountered: