summaryrefslogtreecommitdiffstats
path: root/xml/upgrade-2.10-roundtrip.xsl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 06:53:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 06:53:20 +0000
commite5a812082ae033afb1eed82c0f2df3d0f6bdc93f (patch)
treea6716c9275b4b413f6c9194798b34b91affb3cc7 /xml/upgrade-2.10-roundtrip.xsl
parentInitial commit. (diff)
downloadpacemaker-e5a812082ae033afb1eed82c0f2df3d0f6bdc93f.tar.xz
pacemaker-e5a812082ae033afb1eed82c0f2df3d0f6bdc93f.zip
Adding upstream version 2.1.6.upstream/2.1.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'xml/upgrade-2.10-roundtrip.xsl')
-rw-r--r--xml/upgrade-2.10-roundtrip.xsl47
1 files changed, 47 insertions, 0 deletions
diff --git a/xml/upgrade-2.10-roundtrip.xsl b/xml/upgrade-2.10-roundtrip.xsl
new file mode 100644
index 0000000..18d73c8
--- /dev/null
+++ b/xml/upgrade-2.10-roundtrip.xsl
@@ -0,0 +1,47 @@
+<!--
+ Copyright 2018 Red Hat, Inc.
+ Author: Jan Pokorny <jpokorny@redhat.com>
+ Part of pacemaker project
+ SPDX-License-Identifier: GPL-2.0-or-later
+ -->
+<!--
+ For experimenting and maintenance purposes only, pacemaker shall
+ split the transformation pipeline on its own.
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:cibtr="http://clusterlabs.org/ns/pacemaker/cibtr-2"
+ xmlns:exsl="http://exslt.org/common">
+<!-- NOTE: this is an exception from rule forbidding EXSLT's usage -->
+
+<xsl:import href="upgrade-2.10.xsl"/>
+<xsl:import href="upgrade-2.10-enter.xsl"/>
+<xsl:import href="upgrade-2.10-leave.xsl"/>
+
+<xsl:output method="xml" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/>
+
+
+<!--
+
+ ACTUAL TRANSFORMATION
+
+ Extra modes: cibtr:roundtrip
+
+ -->
+<xsl:template match="/"
+ mode="cibtr:roundtrip">
+ <xsl:variable name="pre-upgrade">
+ <xsl:apply-templates mode="cibtr:enter"/>
+ </xsl:variable>
+ <xsl:variable name="upgrade">
+ <xsl:apply-templates select="exsl:node-set($pre-upgrade)/node()" mode="cibtr:main"/>
+ </xsl:variable>
+
+ <xsl:apply-templates select="exsl:node-set($upgrade)/node()" mode="cibtr:leave"/>
+</xsl:template>
+
+<!-- mode-less, easy to override kick-off -->
+<xsl:template match="/">
+ <xsl:apply-templates select="." mode="cibtr:roundtrip"/>
+</xsl:template>
+
+</xsl:stylesheet>