| 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="conv55to56"> |
| 8 |
<xsl:copy> |
| 9 |
<xsl:copy-of select="@*"/> |
| 10 |
<xsl:apply-templates mode="conv55to56"/> |
| 11 |
</xsl:copy> |
| 12 |
</xsl:template> |
| 13 |
|
| 14 |
<!-- version update --> |
| 15 |
<para xmlns="http://docbook.org/ns/docbook"> |
| 16 |
Changed attribute <tag class="attribute">schemaversion</tag> |
| 17 |
to <tag class="attribute">schemaversion</tag> from |
| 18 |
<literal>5.5</literal> to <literal>5.6</literal>. |
| 19 |
</para> |
| 20 |
<xsl:template match="image" mode="conv55to56"> |
| 21 |
<xsl:choose> |
| 22 |
<!-- nothing to do if already at 5.6 --> |
| 23 |
<xsl:when test="@schemaversion > 5.5"> |
| 24 |
<xsl:copy-of select="."/> |
| 25 |
</xsl:when> |
| 26 |
<!-- otherwise apply templates --> |
| 27 |
<xsl:otherwise> |
| 28 |
<image schemaversion="5.6"> |
| 29 |
<xsl:copy-of select="@*[local-name() != 'schemaversion']"/> |
| 30 |
<xsl:apply-templates mode="conv55to56"/> |
| 31 |
</image> |
| 32 |
</xsl:otherwise> |
| 33 |
</xsl:choose> |
| 34 |
</xsl:template> |
| 35 |
|
| 36 |
<!-- toplevel processing instructions and comments --> |
| 37 |
<xsl:template match="processing-instruction()|comment()" mode="conv55to56"> |
| 38 |
<xsl:copy> |
| 39 |
<xsl:copy-of select="@*"/> |
| 40 |
<xsl:apply-templates mode="conv55to56"/> |
| 41 |
</xsl:copy> |
| 42 |
</xsl:template> |
| 43 |
|
| 44 |
<!-- transform the pwd attribute of the instrepo element to password --> |
| 45 |
<xsl:template match="instsource/instrepo" mode="conv55to56"> |
| 46 |
<instrepo> |
| 47 |
<xsl:choose> |
| 48 |
<xsl:when test="@pwd"> |
| 49 |
<xsl:attribute name="password"> |
| 50 |
<xsl:value-of select="@pwd"/> |
| 51 |
</xsl:attribute> |
| 52 |
</xsl:when> |
| 53 |
</xsl:choose> |
| 54 |
<xsl:copy-of select="@*[not(local-name(.) = 'pwd')]"/> |
| 55 |
<xsl:apply-templates mode="conv55to56"/> |
| 56 |
</instrepo> |
| 57 |
</xsl:template> |
| 58 |
|
| 59 |
<!-- transform the pwd attribute of the users element to password --> |
| 60 |
<xsl:template match="users/user" mode="conv55to56"> |
| 61 |
<user> |
| 62 |
<xsl:choose> |
| 63 |
<xsl:when test="@pwd"> |
| 64 |
<xsl:attribute name="password"> |
| 65 |
<xsl:value-of select="@pwd"/> |
| 66 |
</xsl:attribute> |
| 67 |
</xsl:when> |
| 68 |
</xsl:choose> |
| 69 |
<xsl:copy-of select="@*[not(local-name(.) = 'pwd')]"/> |
| 70 |
<xsl:apply-templates mode="conv55to56"/> |
| 71 |
</user> |
| 72 |
</xsl:template> |
| 73 |
|
| 74 |
<!-- transform the pwd attribute of the repository element to password --> |
| 75 |
<xsl:template match="repository" mode="conv55to56"> |
| 76 |
<repository> |
| 77 |
<xsl:choose> |
| 78 |
<xsl:when test="@pwd"> |
| 79 |
<xsl:attribute name="password"> |
| 80 |
<xsl:value-of select="@pwd"/> |
| 81 |
</xsl:attribute> |
| 82 |
</xsl:when> |
| 83 |
</xsl:choose> |
| 84 |
<xsl:copy-of select="@*[not(local-name(.) = 'pwd')]"/> |
| 85 |
<xsl:apply-templates mode="conv55to56"/> |
| 86 |
</repository> |
| 87 |
</xsl:template> |
| 88 |
|
| 89 |
</xsl:stylesheet> |