I've been involved for 3-4 years in development of transaction schemas for use within our industry. More recently I've started using EA to design and document VB.NET development projects and found it to be quite useful. As a result, it occurred to me recently that it would be really neat if I could design a schema in EA and then generate it based on the design.
The difficulty comes in because we already have a library of schemas, including several base (resource) schemas, that we re-use in all of the transaction schemas. As a result I'm expecting to have to import some of these schemas into my model in order to utilize the types defined in them.
I've imported one of these schemas into EA and it seems that some elements have become "disconnected" from their structures. For example: in on of the structures (which deals with terms) the original schema offers a choice between 4 children.
1) discountDescribedDate
2) discountDueDate
3) discountDueDayOfMonth
4a) discountDueDays
4b) discountBasisDate
4a and 4b are used as a pair. The model shows only discountDueDate (#2) and discountBasisDate (#4b) within the choice. The other 3 elements, discountDescribedDate (#1), discountDueDayOfMonth (#3) and discountDueDays (#4a), exist only as simple or complex types with no element in the structure that uses them. Furthermore, if I turn around and regenerate a schema based on the model, it doesn't match the original (it does match the model). I expect that this could be related to the way that we've structured our schemas and it may be that a profile could be created to resolve this.
From there, I decided to see if I could create a model from scratch that would generate an equivalent schema (I've actually started with just one structure within the schema). This has been pretty successfull, if a little time consuming, but there is one issue I haven't been able to find a way around. The discountDescribedDate (#1 above) is an empty element with a single mandatory attribute (description) which is an enumerations. I can create this structure by creating an XSDcomplexType named termsDiscountDescribedDateType and an enumeration (termsDiscountDescribedDateDescriptionType). These can be used in a way that looks correct in the model, but generating the schema results in the following:
<xs:complexType name="termsDiscountDescribedDateType">
<xs:sequence/>
<xs:attribute name="termsDiscountDescribedDateDescriptionType"
type="fnBase:termsDiscountDescribedDateDescriptionType"/>
</xs:complexType>
This would be OK if the empty <xs:sequence/> weren't there. Again, this may be something that could be resolved by a customized profile?
Has anyone run into simmilar problems?
Is there a better way to approach this?
Can anyone recommend any resources that would be helpful?
Thanks!
Mike:o