1.1 --- a/examples/Common/VerySimple/Resources/structure_types.xsl Mon Oct 03 00:53:24 2005 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,48 +0,0 @@
1.4 -<?xml version="1.0" encoding="utf-8"?>
1.5 -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
1.6 - version="1.0">
1.7 -
1.8 - <xsl:param name="types"/>
1.9 -
1.10 - <!-- Add or process type elements inside item elements. -->
1.11 -
1.12 - <xsl:template match="item">
1.13 - <!-- Copy the element and its contents. -->
1.14 - <xsl:copy>
1.15 - <xsl:apply-templates select="@*"/>
1.16 - <!-- Look for a type element. -->
1.17 - <xsl:call-template name="type"/>
1.18 - <xsl:apply-templates select="*[local-name() != 'type']"/>
1.19 - </xsl:copy>
1.20 - </xsl:template>
1.21 -
1.22 - <!-- Investigate type elements. -->
1.23 -
1.24 - <xsl:template name="type">
1.25 - <!-- Make the element. -->
1.26 - <type>
1.27 - <xsl:apply-templates select="type/@*"/>
1.28 - <xsl:call-template name="type-enum"/>
1.29 - </type>
1.30 - </xsl:template>
1.31 -
1.32 - <!-- Add to type elements the range of acceptable values. -->
1.33 -
1.34 - <xsl:template name="type-enum">
1.35 - <!-- Find all values in the range and add them. -->
1.36 - <xsl:for-each select="$types/types/type-enum">
1.37 - <xsl:copy>
1.38 - <xsl:apply-templates select="@*"/>
1.39 - </xsl:copy>
1.40 - </xsl:for-each>
1.41 - </xsl:template>
1.42 -
1.43 - <!-- Replicate unknown elements. -->
1.44 -
1.45 - <xsl:template match="@*|*|node()">
1.46 - <xsl:copy>
1.47 - <xsl:apply-templates select="@*|*|node()"/>
1.48 - </xsl:copy>
1.49 - </xsl:template>
1.50 -
1.51 -</xsl:stylesheet>