Project

Profile

Help

Maintenance: Planio will be observing a scheduled maintenance window this Sunday, November 10, 2024 from 20:00 UTC until 21:00 UTC to perform important network maintenance in our primary data center. Your Planio account will be unavailable for a few minutes during this maintenance window.

Bug #5198 » test.xsl

stylesheet - Philip Fearon, 2022-01-08 11:29

 
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:array="http://www.w3.org/2005/xpath-functions/array"
xmlns:map="http://www.w3.org/2005/xpath-functions/map"
xmlns:math="http://www.w3.org/2005/xpath-functions/math"
xmlns:saxon="http://saxon.sf.net/"
exclude-result-prefixes="#all"
expand-text="yes"
version="3.0">
<xsl:output method="xml" indent="yes"/>
<xsl:mode on-no-match="shallow-copy"/>
<xsl:template name="main">
<xsl:message select="system-property('xsl:product-name')"/>
<xsl:message select="system-property('xsl:product-version')"/>
<xsl:variable name="doc" select="doc('input.xml')"/>
<xsl:message expand-text="yes">
==== Watch Variables ====
doc: {name($doc/*)}
</xsl:message>
<xsl:for-each select="$doc/*">
<result>
<xsl:copy>
<xsl:apply-templates select="@*, node()" mode="#current"/>
</xsl:copy>
</result>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
(1-1/2)