Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Jim Donnelly IATA

Pages: [1]
1
Hi

Is anyone aware of how to generate XSDcomplexType with simpleContent extending an XSD built-in type such as xs:string, without creating an underlying XSDsimpleType ?

In our xsd file to be produced, we wish to have an XSDcomplexType with simpleContent and extension base = xs:string.  If we were extending an XSDsimpleType, we would in the EA XSD model create a Generalization with stereotype of XSDExtension between the two.  However when wanting to extend an XSD built-in type, we don’t have an artefact to point the Generalization to.  EA offers a package with simple types representing the xsd built-in types. We tried to point the generalization to the simple type ‘String” in that package, but the xsd generator would then generate an extension base =”string” with string being a simple type that it also generates into the xsd file.  This is not what we want, because we want an extension directly on the built-in type, without an artificial simple type string. Below is the xsd code  we want to achieve.
            
<xs:complexType name="FreeTextType">
      <xs:annotation>
            <xs:documentation xml:lang="en">Textual information to provide descriptions and/or additional information.</xs:documentation>
                        </xs:annotation>
                        <xs:simpleContent>
                                    <xs:extension base="xs:string">
                                                <xs:attributeGroup ref="LanguageGroup"/>
                                    </xs:extension>
                        </xs:simpleContent>
            </xs:complexType>

2
Automation Interface, Add-Ins and Tools / Where am I in my model
« on: May 20, 2015, 05:42:26 pm »
Hi

We have a structured model based on a framework. I would like to write a VBScript so that when an element is selected I can get hold of that element's location in the model. i.e.

ElementLocation = MyModel/Package1/Package21/Package31

Is there a quick bit of code to do this, such as GetPath or GetLocation?

Thanks
Jim

3
Automation Interface, Add-Ins and Tools / 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?

Pages: [1]