Book a Demo

Author Topic: Cannot post process XMI export with XSLT stylesheet  (Read 2461 times)

mse

  • EA User
  • **
  • Posts: 308
  • Karma: +1/-0
    • View Profile
Cannot post process XMI export with XSLT stylesheet
« on: July 17, 2020, 10:00:59 pm »
I have a stylesheet set up that successfully translates an existing XMI generated in EA. However, when I add the same XSLT to the Project Resources and try using it during Model Package export, the output file is blank. Is the intermediary file somehow different prior to post-processing?

Here is my stylesheet:

Code: [Select]
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.omg.org/spec/UML/20131001">
   <xsl:output method="text" encoding="windows-1252" indent="no" omit-xml-declaration="yes" />
   <xsl:strip-space elements="*" />
   
   <xsl:template match="/">
      root node
      <xsl:apply-templates />
   </xsl:template>
   <xsl:template match="//xmi:XMI">
      <html>
         <xsl:apply-templates />
      </html>
   </xsl:template>
   <xsl:template match="/uml:Model">
      BAR
      <xsl:apply-templates />
   </xsl:template>
   <xsl:template match="uml:Model">
      <xsl:apply-templates />
   </xsl:template>
   <xsl:template match="packagedElement">
      <xsl:apply-templates />
   </xsl:template>
   <xsl:template match="packagedElement[@name='ComponentTypes']">
      s
      <xsl:value-of select="@name" />
      <xsl:apply-templates />
   </xsl:template>
   <xsl:template match="text()"><xsl:apply-templates /></xsl:template>
</xsl:stylesheet>

mse

  • EA User
  • **
  • Posts: 308
  • Karma: +1/-0
    • View Profile
Re: Cannot post process XMI export with XSLT stylesheet
« Reply #1 on: July 17, 2020, 10:03:27 pm »
Here is the log file output:

Code: [Select]
Exporting package to 'C:\Users\cramos3\Documents\xalan-j_2_7_2\connectors25_RT.xml'
Retrieving data for export: diagram elements
Retrieving data for export: links
Retrieving data for export: constraints
Retrieving data for export: attribute tagged values
Retrieving data for export: operation tagged values
Retrieving data for export: operation parameter tagged values
Retrieving data for export: connector tagged values
Completed data retrieval
Pre-processing export tree...
Completed pre-processing
Processing package: AUTOSAR
Processing package: ComponentTypes
Element:0: Class2Type
Element:1: Port1
Element:2: Class3Type
Processing package: CompositeTypes
Diagram: CompositeTypes
Element:3: CompositeType
Processing package: Interfaces
Element:4: Interface1
Sequencing Interaction Diagrams
Transforming XML using Stylesheet...please wait
Export and Transform Complete!