Book a Demo

Author Topic: Transforming to xsd simple type  (Read 2896 times)

Jim Donnelly IATA

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Transforming to xsd simple type
« 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?
« Last Edit: February 20, 2015, 10:50:51 pm by anaXaIATA »