Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Paolo F Cantoni on November 12, 2018, 05:08:38 pm

Title: Missing documentation entries in xs:annotation?
Post by: Paolo F Cantoni on November 12, 2018, 05:08:38 pm
Hi,

We reverse engineered an XSD containing the following:
Code: [Select]
<xs:simpleType name="ISO_3166-1_Alpha-2-Code">
<xs:annotation>
<xs:documentation xml:lang="en">AF AFG Afghanistan</xs:documentation>
<xs:documentation xml:lang="en">AX ALA Aland Islands</xs:documentation>
<xs:documentation xml:lang="en">AL ALB Albania</xs:documentation>
<xs:documentation xml:lang="en">DZ DZA Algeria</xs:documentation>
<xs:documentation xml:lang="en">AS ASM American Samoa</xs:documentation>
<xs:documentation xml:lang="en">AD AND Andorra</xs:documentation>
<xs:documentation xml:lang="en">AO AGO Angola</xs:documentation>
<xs:documentation xml:lang="en">AI AIA Anguilla</xs:documentation>
<xs:documentation xml:lang="en">AQ ATA Antarctica</xs:documentation>
</xs:annotation>
</xs:simpleType>
We found only the first <xs:documentation> entry was imported (into the Notes field).  I'm not an XSD guru. Should the other entries have been imported (as additional lines in the field)?

TIA,
Paolo

[Edit:  I checked locally and I've been informed that the notation is invalid.  However, I'd like some corroboration that this is indeed invalid.]
Title: Re: Missing documentation entries in xs:annotation?
Post by: Geert Bellekens on November 12, 2018, 05:55:42 pm
I would be inclined to indeed believe this to be invalid, or at least not logical, but to be sure you should validate it against it's XSD or even check the additional documentation that defines the rules for the xs:annotation tag. There might be a rule that cannot be enforced using an XSD.
I would expect there to be only one documentation tag for each language (and I guess that is what Sparx expects as well).

Geert