-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Abstract stuff has not fully been filtered #629
Comments
The filter I applied was for the field type annoations, not from generating those abstract classes |
Would it be feasible to filter them as well? |
I am open to suggestions, other schemas actually depend on abstract types |
How do they depend on them? Are they instantiated from an abstract type? |
The are used as extensions: <xs:complexType name="GlobalDateTimeType">
<xs:complexContent>
<xs:extension base="DateTimeType">
<xs:attribute name="DateTime" type="IntDateTime" use="required">
<xs:annotation>
<xs:documentation>This date should be of the form YYYY-MM-DDTHH:MM:SS.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DateTimeType" abstract="true">
<xs:attribute name="TimeWindowStart" type="TimeWindowBoundaryType">
<xs:annotation>
<xs:documentation>Allowed amount of time before specified time.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="TimeWindowEnd" type="TimeWindowBoundaryType">
<xs:annotation>
<xs:documentation>Allowed amount of time after specified time.</xs:documentation>
</xs:annotation>
</xs:attribute>
...
...
... One idea would be to go around and filter completely unused abstract types, because that's really your use case... Netex is using the abstract elements as placeholders for substitution groups, which works but I am not sure if that was a goal of the design of xsd |
Thanks for reporting @skinkie I added a more strict check as to what models should be generated, now only global non abstract types will be generated and any complex type, or enumerations that are actually referened in the other models That should remove another ~2k lines from the netex output 🚀 |
From the NeTEx schema;
The text was updated successfully, but these errors were encountered: