Removed excessive spaces from enum values - #1054
Conversation
|
@Micovec while they are not pretty, they are not wrong right? I think your parser should handle this. |
|
@skinkie I guess you're right. I did not look up the type of these enumerations. They are xsd:NMTOKEN which allows leading and triling spaces. I'm closing this PR and will try to resolve it in the parser. |
|
@thbar @TuThoThai I think we should fix this, but leave open an example to tests parsers. |
|
The reason I closed this PR was due to the fact that C# class for deserializing xml files does not support xsd:NMTOKEN for enumerations. I could circumvent it in the parser if the owner of XmlSchemaClassGenerator would approve my suggestion (I have not yet created an issue in that repo). I use that project to generate files for parsing. Another fix would be to ask .NET developers for a support of xsd:NMTOKEN but I doubt that will go anywhere. It's an unusual request. Besides the class for deserializing definitely does not support the whole xsd. If you are willing to fix it I would be more than happy. |
The point is, your parser needs to be able to parse valid XML. Otherwise it will be again a specialistic attempt having too many limitations. I'll try to send you an email. |
While testing my parser for NeTEx I have found these enum values that contain extra spaces. Because of that the parser cannot parse the files.
Fixes: #1053