Prev | Next |
Add Import/Export Scripts
In Enterprise Architect, it is possible to import Packages from and export (or Publish) Packages to external files in a range of XMI and XML formats. You can also incorporate this facility in your MDG Technology, adding a script that contains your own Extensible Stylesheet Language Transformation (XSLT) to convert between the file formats.
Incorporate an Export (Publish) script
Step |
Description |
See also |
---|---|---|
1 |
In your preferred editor, create an XSLT to convert from the source format (as listed on the 'Publish Model Package' dialog) into the target format you are generating. |
|
2 |
In Enterprise Architect, open the Scripter window and create a script under your preferred script engine as a Normal script. Cut and paste the XSLT into the script editor. |
Scripting |
3 |
Add the script to your MDG Technology, in the MDG Technology Creation Wizard. |
Add Scripts |
4 |
Make any additions to the technology .mts file you require, then use the MDG Technology Creation Wizard again to fully generate the technology .xml file. Open the technology .xml file (not the .mts file) in a text editor and locate the <Script section. |
Working with MTS Files Create MDG Technology File |
5 |
Edit the <Script line to set the appropriate name, type and language:
For example: <Script name="YourTechnology" type="Publish-UML 2.1(XMI 2.1)" language="XSLT"> <Content xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64"> </Content> </Script> |
|
6 |
Save the MDG Technology .xml file, and deploy it on your system. |
Deploy An MDG Technology |
Incorporate an Import script
Step |
Description |
See also |
---|---|---|
1 |
In your preferred editor, create an XSLT to convert from the source format into the target XMI format. |
|
2 |
In Enterprise Architect, open the Scripter window and create a script under your preferred script engine as a Normal script. Cut and paste the XSLT into the script editor. |
Scripting |
3 |
Add the script to your MDG Technology, in the MDG Technology Creation Wizard. |
Add Scripts |
4 |
Make any additions to the technology .mts file you require, then use the MDG Technology Creation Wizard again to fully generate the technology .xml file. Open the technology .xml file (not the .mts file) in a text editor and locate the <Script section. |
Working with MTS Files Create MDG Technology File |
5 |
Edit the <Script line to set the appropriate name, type and language:
For example: <Script name="YourTechnology" type="Import-UML 2.1(XMI 2.1)" language="XSLT"> <Content xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64"> </Content> </Script> |
|
6 |
Save the MDG Technology .xml file, and deploy it on your system. |
Deploy An MDG Technology |
Notes
- Create the content of your scripts in XSLT 1.0