sysmodellibs/sysmodelgen/extra/output-sysdef.xsl
author Bob Rosenberg <bob.rosenberg@nokia.com>
Wed, 13 Oct 2010 16:21:25 +0100
changeset 7 3c36c452f013
parent 6 sysmodellibs/sysmodelgen/src/old/svg/output-sysdef.xsl@5b32dc297d05
permissions -rw-r--r--
Version 2.0 release of System Model Generator, which draws 3.x syntax system definition files

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" indent="yes"/>
<!-- strip out build-related stuff and just leave the model + added attributes -->

<xsl:param name="everything" select="1"/>

<xsl:template match="@*">
	<xsl:if test="$everything">
		<xsl:copy-of select="."/>
	</xsl:if>
</xsl:template>


<xsl:template match="unit|@id|@name|@href|@before|layer/@levels|package/@levels | layer/@span | package/@span |
	package/@version | package/@tech-domain | @level | 
	 component/@deprecated |   component/@introduced|   component/@target  |   component/@purpose |  component/@class |  component/@filter | component/@origin-model ">
	<xsl:copy-of select="."/>
</xsl:template>


<xsl:template match="meta"/> <!-- should make conditional based on param -->

<xsl:template match="layer|package|collection|component">
	<xsl:copy>
		<xsl:apply-templates select="@*"/>
		<xsl:apply-templates select="*"/>
	</xsl:copy>
</xsl:template>

<xsl:template match="SystemDefinition">
	<xsl:copy><xsl:copy-of select="@schema|@id-namespace"/>
		<xsl:apply-templates select="systemModel | layer | package | collection | component"/>
	</xsl:copy>
</xsl:template>

<xsl:template match="systemModel">
	<xsl:copy><xsl:copy-of select="@name"/>
	<xsl:apply-templates select="layer|meta"/>
	</xsl:copy>
</xsl:template>


</xsl:stylesheet>