You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am have an XSD generated code where there are a lot elements which have only have one sequence type child (and no attributes).
Example:
Library -> Symbols -> Symbol::List
In this example (I think) it would be very convenient if the Symbol::List could be accessed directly from the Library itself.
(Currently I access them with
I have to ask... how about simplifying the XSD instead? ;-)
Also, this means that if the Symbols element is modified later to gain attributes or other children, the existing code won't compile anymore... which breaks the X in XML (extensible).
Well I am generating code from XSD for an existing XML file format.
If attributes/childs added to the parsed XML the parser (generated with this simplified method) will still parse the XML, just leaving out the new elements/attributes. BTW. the current code has the same scenario.
If new attributes/childs added to the schema the generated code will be the same as it is generated by the current code.
The patch adds this feature together with a command line option (which is disabled by default).
In my use case I am parsing XML files generated with an existing software where the format of the mentioned sections will unlikely to be changed. It might be the case that someone else has the similar needs.
What do you think shall I merge it upstream or not?
Hi guys,
I am have an XSD generated code where there are a lot elements which have only have one sequence type child (and no attributes).
Example:
Library -> Symbols -> Symbol::List
In this example (I think) it would be very convenient if the Symbol::List could be accessed directly from the Library itself.
(Currently I access them with
I have implemented it in my simplify_single_child_lists:
https://github.com/cornelius/kode/compare/master...martonmiklos:simplify_single_child_lists?expand=1
If you have a bit time and find this feature useful please take a look on it.
Any review comment is welcome!
The text was updated successfully, but these errors were encountered: