Check in the Generate Sample XML Files dialog in the Options tab if you have enabled the "Generate optional elements" option. If there's a recursivity of the nested elements you should also increase the "Maximum recursivity level" to 2 or 3.
This can also depend on how the namespaces are connected in the schema. In ns2:element2 do you mention explicitly ns1:element1, or do you simply allow any element?
Could you please provide the snippets of the schema with the elements that connect the namespaces (ns1 -> ns2 and ns2 -> ns1).
If possible, please send your XML schemas and the exported settings from the Generate Sample XML Files dialog to email@example.com.
Thanks for replying Adrian! Answers to your suggestions/questions:
1. I have the recursivity set to 15 in some cases which is probably more than is needed, but wanted to ensure the Generator drilled down enough
2. This is the area I'm unsure about. Here's a snippet from the schema:
Code: Select all
<xs:element name="aircraftMeteorologicalObservation" type="wxxm:aircraftMeteorologicalObservationType" substitutionGroup="om:OM_Observation"/>
<xs:element name="result" type="wxxm:aircraftMeteorlogicalObservationRecordPropertyType"/>
So, here I'm attempting to extend the om:OM_Observation and it has a global element called "result". So when sample XML is generated, the desired outcome is to have the wxxm:aircraftMeteorlogicalObservationRecord nested under om:result. However, what's happening is that the "result" above is really wxxm:result inherited by wxxm:aircraftMeteorologicalObservation from OM_Observation:
Code: Select all
So, not sure how to point the parent result to the child record within the schema and probably my UML as well which is where the schema is generated from. And I've tried a few different ways, with my last attempt being to include a copy of the parent and point it to the child instead of having the aircraftMeteorologicalObservation after observation. But, the generator just gave me the <om:result></om:result> instead and no aircraftMeteorlogicalObservationRecord. I just don't have it connected properly and hence my question.
3. Super! I'll send what you requested.
Thanks again! Suggestions from others are welcome as well!