Ticket #680: collapse-component-spec.2.xsl

File collapse-component-spec.2.xsl, 635 bytes (added by Twan Goosen, 10 years ago)

draft for stylesheet to collapse an expanded component (version 2)

Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3    xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" version="2.0">
4
5    <xsl:template match="CMD_Component[@ComponentId]">
6        <xsl:copy>
7            <!-- only copy attributes -->
8            <xsl:apply-templates select="@*" />
9        </xsl:copy>       
10    </xsl:template>
11
12    <xsl:template  match="@*|*[not(@ComponentId)]">
13        <xsl:copy>
14            <!-- continue with inner -->
15            <xsl:apply-templates select="@*|node()" />
16        </xsl:copy>
17    </xsl:template>
18</xsl:stylesheet>