Debian Codegraph @

helper/xsl_to_v74/convert37to38.xsl

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4 <xsl:output method="xml"
5 indent="yes" omit-xml-declaration="no" encoding="utf-8"/>
6 <xsl:strip-space elements="type"/>
7
8 <!-- default rule -->
9 <xsl:template match="*" mode="conv37to38">
10 <xsl:copy>
11 <xsl:copy-of select="@*"/>
12 <xsl:apply-templates mode="conv37to38"/>
13 </xsl:copy>
14 </xsl:template>
15
16 <!-- version update -->
17 <para xmlns="http://docbook.org/ns/docbook">
18 Changed attribute <tag class="attribute">schemaversion</tag>
19 to <tag class="attribute">schemaversion</tag> from
20 <literal>3.7</literal> to <literal>3.8</literal>.
21 </para>
22 <xsl:template match="image" mode="conv37to38">
23 <xsl:choose>
24 <!-- nothing to do if already at 3.8 -->
25 <xsl:when test="@schemaversion > 3.7">
26 <xsl:copy-of select="."/>
27 </xsl:when>
28 <!-- otherwise apply templates -->
29 <xsl:otherwise>
30 <image schemaversion="3.8">
31 <xsl:copy-of select="@*[local-name() != 'schemaversion']"/>
32 <xsl:apply-templates mode="conv37to38"/>
33 </image>
34 </xsl:otherwise>
35 </xsl:choose>
36 </xsl:template>
37
38 <!-- toplevel processing instructions and comments -->
39 <xsl:template match="processing-instruction()|comment()" mode="conv37to38">
40 <xsl:copy>
41 <xsl:copy-of select="@*"/>
42 <xsl:apply-templates mode="conv37to38"/>
43 </xsl:copy>
44 </xsl:template>
45
46 <!-- update deploy / pxedeploy -->
47 <para xmlns="http://docbook.org/ns/docbook">
48 Change attribute value <tag class="attribute">deploy</tag> to
49 <tag class="attribute">pxedeploy</tag>.
50 </para>
51 <xsl:template match="deploy" mode="conv37to38">
52 <pxedeploy>
53 <xsl:copy-of select="@*"/>
54 <xsl:apply-templates mode="conv37to38"/>
55 </pxedeploy>
56 </xsl:template>
57
58 </xsl:stylesheet>