Debian Codegraph @

helper/xsl_to_v74/convert61to62.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
7 <!-- default rule -->
8 <xsl:template match="*" mode="conv61to62">
9 <xsl:copy>
10 <xsl:copy-of select="@*"/>
11 <xsl:apply-templates mode="conv61to62"/>
12 </xsl:copy>
13 </xsl:template>
14
15 <!-- version update -->
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.1</literal> to <literal>6.2</literal>.
20 </para>
21 <xsl:template match="image" mode="conv61to62">
22 <xsl:choose>
23 <!-- nothing to do if already at 6.2 -->
24 <xsl:when test="@schemaversion > 6.1">
25 <xsl:copy-of select="."/>
26 </xsl:when>
27 <!-- otherwise apply templates -->
28 <xsl:otherwise>
29 <image schemaversion="6.2">
30 <xsl:copy-of select="@*[local-name() != 'schemaversion']"/>
31 <xsl:apply-templates mode="conv61to62"/>
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="conv61to62">
39 <xsl:copy>
40 <xsl:copy-of select="@*"/>
41 <xsl:apply-templates mode="conv61to62"/>
42 </xsl:copy>
43 </xsl:template>
44
45 <!-- add default bootloader if not specified -->
46 <xsl:template match="type[not(@bootloader)]" mode="conv61to62">
47 <xsl:choose>
48 <xsl:when test="@image='oem' or @image='vmx'">
49 <type bootloader="grub2">
50 <xsl:copy-of select="@*[local-name() != 'bootloader']"/>
51 <xsl:apply-templates mode="conv61to62"/>
52 </type>
53 </xsl:when>
54 <xsl:otherwise>
55 <xsl:copy-of select="."/>
56 </xsl:otherwise>
57 </xsl:choose>
58 </xsl:template>
59
60 </xsl:stylesheet>