Debian Codegraph @

helper/xsl_to_v74/convert66to67.xsl

raw
1 <?xml version="1.0" encoding="utf-8"?>
2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3 <xsl:output method="xml"
4 indent="yes" omit-xml-declaration="no" encoding="utf-8"/>
5
6 <!-- default rule -->
7 <xsl:template match="*" mode="conv66to67">
8 <xsl:copy>
9 <xsl:copy-of select="@*"/>
10 <xsl:apply-templates mode="conv66to67"/>
11 </xsl:copy>
12 </xsl:template>
13
14 <!-- version update -->
15 <!-- remove kiwirevision attribute from image -->
16 <para xmlns="http://docbook.org/ns/docbook">
17 Changed attribute <tag class="attribute">schemaversion</tag>
18 to <tag class="attribute">schemaversion</tag> from
19 <literal>6.6</literal> to <literal>6.7</literal>.
20 </para>
21 <xsl:template match="image" mode="conv66to67">
22 <xsl:choose>
23 <!-- nothing to do if already at 6.7 -->
24 <xsl:when test="@schemaversion > 6.6">
25 <xsl:copy-of select="."/>
26 </xsl:when>
27 <!-- otherwise apply templates -->
28 <xsl:otherwise>
29 <image schemaversion="6.7">
30 <xsl:copy-of select="@*[local-name() != 'schemaversion' and local-name() != 'kiwirevision']"/>
31 <xsl:apply-templates mode="conv66to67"/>
32 </image>
33 </xsl:otherwise>
34 </xsl:choose>
35 </xsl:template>
36
37 <!-- toplevel processing instructions and comments -->
38 <xsl:template match="processing-instruction()|comment()" mode="conv66to67">
39 <xsl:copy>
40 <xsl:copy-of select="@*"/>
41 <xsl:apply-templates mode="conv66to67"/>
42 </xsl:copy>
43 </xsl:template>
44
45 <!-- delete checkprebuilt and fsnocheck attributes from type -->
46 <para xmlns="http://docbook.org/ns/docbook">
47 Delete checkprebuilt and fsnocheck attributes from type
48 </para>
49 <xsl:template match="type" mode="conv66to67">
50 <type>
51 <xsl:copy-of select="@*[not(local-name(.) = 'checkprebuilt') and not(local-name(.) = 'fsnocheck')]"/>
52 <xsl:apply-templates mode="conv66to67"/>
53 </type>
54 </xsl:template>
55
56 <!-- delete status and prefer-license attributes from repository -->
57 <para xmlns="http://docbook.org/ns/docbook">
58 Delete status and prefer-license attributes from repository
59 </para>
60 <xsl:template match="repository" mode="conv66to67">
61 <repository>
62 <xsl:copy-of select="@*[not(local-name(.) = 'status') and not(local-name(.) = 'prefer-license')]"/>
63 <xsl:apply-templates mode="conv66to67"/>
64 </repository>
65 </xsl:template>
66
67 <!-- delete replaces attribute from package -->
68 <para xmlns="http://docbook.org/ns/docbook">
69 Delete replaces attribute from package
70 </para>
71 <xsl:template match="package" mode="conv66to67">
72 <package>
73 <xsl:copy-of select="@*[not(local-name(.) = 'replaces')]"/>
74 <xsl:apply-templates mode="conv66to67"/>
75 </package>
76 </xsl:template>
77
78 <!-- Delete defaultprebuilt section -->
79 <para xmlns="http://docbook.org/ns/docbook">
80 Delete defaultprebuilt section
81 </para>
82 <xsl:template match="defaultprebuilt" mode="conv66to67">
83 <xsl:apply-templates select="*" mode="conv66to67"/>
84 </xsl:template>
85
86 <!-- Delete defaultdestination section -->
87 <para xmlns="http://docbook.org/ns/docbook">
88 Delete defaultdestination section
89 </para>
90 <xsl:template match="defaultdestination" mode="conv66to67">
91 <xsl:apply-templates select="*" mode="conv66to67"/>
92 </xsl:template>
93
94 <!-- Delete defaultroot section -->
95 <para xmlns="http://docbook.org/ns/docbook">
96 Delete defaultroot section
97 </para>
98 <xsl:template match="defaultroot" mode="conv66to67">
99 <xsl:apply-templates select="*" mode="conv66to67"/>
100 </xsl:template>
101
102 <!-- Delete partitioner section -->
103 <para xmlns="http://docbook.org/ns/docbook">
104 Delete partitioner section
105 </para>
106 <xsl:template match="partitioner" mode="conv66to67">
107 <xsl:apply-templates select="*" mode="conv66to67"/>
108 </xsl:template>
109
110 <!-- Delete rpm-force section -->
111 <para xmlns="http://docbook.org/ns/docbook">
112 Delete rpm-force section
113 </para>
114 <xsl:template match="rpm-force" mode="conv66to67">
115 <xsl:apply-templates select="*" mode="conv66to67"/>
116 </xsl:template>
117
118 </xsl:stylesheet>