As the subject suggests, I am having issues when trying to import my existing XML schema into EA. I am encountering problems even with very simple schema; the documentation in the help file is very straight forward, and I can't find any posts on the forum regarding this issue. So maybe I'm missing something fundamental about how this feature works.
Below is a very simple version of one of the XSD files I am trying to import, followed by a print out of the status report given by EA. I have tried it with both the 'using XSD elements and attributes as UML Attributes' and 'using XSD elements and attributes as UML Associations' options; both produce errors. Why is it going wrong?
And one final question. My schema is separated out into 6 different files. Within the schema files, the xsd:include tag is used to declare dependencies on other schema. When importing all of these schema into EA, will the references between types that exist in different schema files be resolved?
Any help on these issues will be much appreciated.
Regards
Trevor.
------------------------------------------------
XSD Schema :
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:xs="
http://www.w3.org/2001/XMLSchema"
xmlns:sfr="
http://www.keytraffic.com/StreetFeatureRules"
targetNamespace="
http://www.keytraffic.com/StreetFeatureRules"
elementFormDefault="qualified"
version="0.7.1">
<xs:simpleType name="KRLStringNotEmpty">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="KRLParameterName">
<xs:restriction base="xs:string">
<xs:pattern value="[a-zA-Z_]{1}[a-zA-z0-9_]*"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="KRLGUID">
<xs:restriction base="xs:string">
<xs:pattern value="[a-fA-F0-9]{8}[\-][a-fA-F0-9]{4}[\-][a-fA-F0-9]{4}[\-][a-fA-F0-9]{4}[\-][a-fA-F0-9]{12}"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="KRLRule" abstract="true">
<xs:attribute name="id" type="sfr:KRLGUID" use="required"/>
</xs:complexType>
<xs:simpleType name="KRLShapeSide">
<xs:restriction base="xs:string">
<xs:enumeration value="NEARSIDE"/>
<xs:enumeration value="OFFSIDE"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="KRLDirection">
<xs:restriction base="xs:string">
<xs:enumeration value="POSITIVE"/>
<xs:enumeration value="NEGATIVE"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="KRLDoubleRule" abstract="true">
<xs:sequence>
<xs:element name="min" type="xs:double" minOccurs="1" maxOccurs="1" />
<xs:element name="max" type="xs:double" minOccurs="1" maxOccurs="1" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="KRLDoubleRange">
<xs:complexContent>
<xs:extension base="sfr:KRLDoubleRule">
<xs:sequence>
<xs:element name="default" type="xs:double" minOccurs="1" maxOccurs="1" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
---------------------------------------------------------------------------------------------------
Progress output using XSD elements and attributes as UML Attributes :
Loading XSD File....OK
Gathering Class Information
Creating Package : KTS_SFRBasicTypes_test....OK
Adding Schema Header Information....OK
Adding Class : KRLStringNotEmpty....OK
Adding Class : KRLParameterName....OK
Adding Class : KRLGUID....OK
Adding Class : KRLRule....OK
Adding Class : KRLShapeSide....OK
Adding Class : KRLDirection....OK
Adding Class : KRLDoubleRule....OK
Adding Class : KRLDoubleRange....OK
Adding Connectors
Adding Generalization : KRLDoubleRange->KRLDoubleRule
Adding Attributes
Failed : id [ KRLRule ]
Failed : NEARSIDE [ KRLShapeSide ]
Failed : OFFSIDE [ KRLShapeSide ]
Adding : POSITIVE [ KRLDirection ]
Adding : NEGATIVE [ KRLDirection ]
Adding : min [ KRLDoubleRule ]
Adding : max [ KRLDoubleRule ]
Adding : default [ KRLDoubleRange ]
Layout Diagram....OK
Schema Import Complete.
---------------------------------------------------------------------------------------------------
Progress output using XSD elements and attributes as UML Associations :
Loading XSD File....OK
Gathering Class Information
Creating Package : KTS_SFRBasicTypes_test....OK
Adding Schema Header Information....OK
Adding Class : KRLStringNotEmpty....OK
Adding Class : KRLParameterName....OK
Adding Class : KRLGUID....OK
Adding Class : KRLRule....OK
Adding Class : KRLShapeSide....OK
Adding Class : KRLDirection....OK
Adding Class : KRLDoubleRule....OK
Adding Class : KRLDoubleRange....OK
Adding Connectors
Adding Association : KRLRule->KRLGUID [Element : id]
Adding Generalization : KRLDoubleRange->KRLDoubleRule
Adding Attributes
Adding : NEARSIDE [ KRLShapeSide ]
Adding : OFFSIDE [ KRLShapeSide ]
Adding : POSITIVE [ KRLDirection ]
Adding : NEGATIVE [ KRLDirection ]
Failed : min [ KRLDoubleRule ]
Failed : max [ KRLDoubleRule ]
Adding : default [ KRLDoubleRange ]
Layout Diagram....OK
Schema Import Complete.
---------------------------------------------------------------------------------------------------