Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: camzrama on March 27, 2010, 01:34:41 am

Title: XSL Stylesheets for XMI Export
Post by: camzrama on March 27, 2010, 01:34:41 am
Does anyone have examples of XSL Stylesheets that they have used to transform the results of an XMI Export?
Title: Re: XSL Stylesheets for XMI Export
Post by: camzrama on April 02, 2010, 12:18:31 am
Sparx Systems suplied the following information.

If you export a package with the "Format XMI Output" option is not selected, you will see that the resulting XML is .... not formated.

If you apply the following XSL Template while the "Format XMI Output" options is not selected, you will see that the resulting XML is formated by the XSL Template.

Code: [Select]
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="xml" indent="yes" encoding="UTF-8" />
  <xsl:template match="@* | node()">
    <xsl:copy>
      <xsl:apply-templates select="@* | node()" />
    </xsl:copy>
  </xsl:template>
</xsl:stylesheet>