+ <!-- rules depending on multiple attribute combinations -->
+
+ <!-- whenever there is a <apt> containing an @attr 7 and an @attr 8,
+ rewrite these and drop all @attr 3 .
+ Notice that the selection rules can equally either be written
+ 'attr/@type=7' or 'attr[@type=8]' with no difference -->
+ <!--
+ <xsl:template match="apt[attr/@type=7 and attr[@type=8]]">
+ <apt>
+ <xsl:apply-templates select="attr[@type=1]"/>
+ <xsl:apply-templates select="attr[@type=2]"/>
+ <xsl:apply-templates select="attr[@type=4]"/>
+ <xsl:apply-templates select="attr[@type=5]"/>
+ <xsl:apply-templates select="attr[@type=6]"/>
+ <attr type="7" value="2"/>
+ <attr type="8" value="5"/>
+ <xsl:apply-templates select="attr[@type=9]"/>
+ <xsl:apply-templates select="term"/>
+ </apt>
+ </xsl:template>
+ -->
+
+ <!-- whenever there is an apt containing an @attr 7=1, an @attr 8=4, and
+ an @attr 1=? (of any value), let @attr 1=? pass unaltered, drop
+ @attr 3=? totally, and rewrite @attr 7=1 and @attr 8=4 .
+ Notice that this rule can equally be written either with 'and'
+ connecting the attribute type and value, or with a double '[]'.-->
+ <!--
+ <xsl:template match="apt[attr[@type=7 and @value=1]
+ and attr[@type=8][@value=4]
+ and attr[@type=1]] ">
+ <apt>
+ <xsl:apply-templates select="attr[@type=1]"/>
+ <xsl:apply-templates select="attr[@type=2]"/>
+ <xsl:apply-templates select="attr[@type=4]"/>
+ <xsl:apply-templates select="attr[@type=5]"/>
+ <xsl:apply-templates select="attr[@type=6]"/>
+ <attr type="7" value="2"/>
+ <attr type="8" value="5"/>
+ <xsl:apply-templates select="attr[@type=9]"/>
+ <xsl:apply-templates select="term"/>
+ </apt>
+ </xsl:template>
+ -->
+