Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Jim Donnelly IATA on February 20, 2015, 10:49:45 pm

Title: Transforming to xsd simple type
Post by: Jim Donnelly IATA on February 20, 2015, 10:49:45 pm
Hi

I have a custom transformation and I’m trying to get at XSDSimpleType Type when I transform in a custom template that I have called Class__TransformTo SimpleType

stereotype="XSDsimpleType"
$NewName=%REPLACE(className," ","")%
name=%qt%$NewName%qt%
%list="Attribute__CreateReferencedTypeClass"%
%TRANSFORM_CURRENT("name","stereotype")%
%TRANSFORM_REFERENCE("XXXX_XSDClass")%

I wish to be able to set the XMLsimpleType type to integer so that the XSD generated is:
<xs:simpleType name="JimsClass">
            <xs:restriction base="xs:integer">
                  <xs:pattern value=" "/>
                  <xs:length value=" "/>
                  <xs:totalDigits value=" "/>
                  <xs:whiteSpace value=" "/>
            </xs:restriction>
      </xs:simpleType>

I do not wish adjust the XML Model. I wish this to be automated.
Is this possible?