Book a Demo

Author Topic: Export Package to XMI / XSLT Publish  (Read 3299 times)

arphex

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-1
    • View Profile
Export Package to XMI / XSLT Publish
« on: October 09, 2012, 04:25:01 pm »
Hello,

i want to create my own Stylesheet in Resources to make a post process transformation.

How can i iterate through the Export?
I saw, that all exports have a similar structure.

Now i tried this XSLT:

Code: [Select]
<xsl:stylesheet version="2.0"
                xmlns:html="http://www.w3.org/TR/REC-html40"
                xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  
<xsl:output name="text" method="text" omit-xml-declaration="yes" encoding="ISO-8859-1"/>

  <!-- Root template -->    
  <xsl:template match="/">
  
  <xsl:result-document href="variables.py" format="text">
  <xsl:for-each select="/uml:Model/packagedElement[xmi:type='uml:Activity']">
  
  <xsl:value-of select="name"/>
  
<xsl:text><![CDATA[]]></xsl:text>
  
  </xsl:for-each>
  
  </xsl:result-document>
  
  </xsl:template>
</xsl:stylesheet>

I testet this here: http://xslttest.appspot.com/

When the Postprocess Transformation works i would make http://www.sparxsystems.com/enterprise_architect_user_guide/9.3/standard_uml_models/add_import_export_scripts.html

Could you please help me, because i dont know how to step through the XML structure.

Best Regards and Thanks

arpehx