-
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
Elements with same name but different types are not supported #19
Comments
hi @julienadam, thanks for reporting this isuue. I'll try to investigate it as soon as possible. In the meantime the usual workaround may be to use the raw |
hi @julienadam , the issue is tricky but I may provide a quick patch capable of handling your case. |
Hi, thanks for looking into it. There's no rush, I ended up generating C# classes with good old xsd.exe, it is ugly but it does the job. I'll be very happy to switch back to FSharp.Data.Xsd when the issue is fixed though ! I looked at it briefly with a few colleagues, it does look tricky indeed... xsd.exe seems to use variations of the type names defined in the schema instead of elements names, I'm not sure if that's applicable here. |
I think I've found the proper way to fix the issue. Now (in version 1.0.2) an ordinal suffix is appended (2, 3, ...) for different types with the same name |
I hope the issue is now fixed, @julienadam can we close this? |
Yes, I tested this new version and the problem is fixed. Thanks ! |
Description
I am using the library to generate a report based on this schema set :
https://www.esma.europa.eu/sites/default/files/library/2016-_annex_6_firds_reference_data_xml_schema.zip
Specifically, the DRAFT4auth.039.001.01_ESMAUG_DATNWD_1.0.0.xsd schema which has 2 elements with the same name "NonWorkgDay" but different types, one is SecuritiesNonTradingDayReport1, the other is SecuritiesNonTradingDay1.
Repro steps
type Rpt = XmlProvider<Schema = @"DRAFT4auth.039.001.01_ESMAUG_DATNWD_1.0.0.xsd">
Rpt.NonWorkgDay will be defined as self-referencing type instead of referencing the other type.
Expected behavior
Generate 2 distinct types, I guess ?
Actual behavior
Only generates the first type (or at least only one of the types)
Known workarounds
None
Related information
N/A
The text was updated successfully, but these errors were encountered: