summaryrefslogtreecommitdiff
path: root/examples/xsl
diff options
context:
space:
mode:
Diffstat (limited to 'examples/xsl')
-rw-r--r--examples/xsl/cat.xsl7
-rw-r--r--examples/xsl/hello1.xsl13
-rw-r--r--examples/xsl/param1.xsl16
-rw-r--r--examples/xsl/sum1.xsl12
4 files changed, 48 insertions, 0 deletions
diff --git a/examples/xsl/cat.xsl b/examples/xsl/cat.xsl
new file mode 100644
index 0000000..b328ba2
--- /dev/null
+++ b/examples/xsl/cat.xsl
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method="xml" encoding="utf-8" indent="no"/>
+ <xsl:template match="node()|@*">
+ <xsl:copy-of select="/"/>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/examples/xsl/hello1.xsl b/examples/xsl/hello1.xsl
new file mode 100644
index 0000000..cfb3eb0
--- /dev/null
+++ b/examples/xsl/hello1.xsl
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method="text"/>
+<xsl:param name="inputFile">-</xsl:param>
+<xsl:template match="/">
+ <xsl:call-template name="t1"/>
+</xsl:template>
+<xsl:template name="t1">
+ <xsl:for-each select="/">
+ <xsl:value-of select="/html/body/div"/>
+ </xsl:for-each>
+</xsl:template>
+</xsl:stylesheet>
diff --git a/examples/xsl/param1.xsl b/examples/xsl/param1.xsl
new file mode 100644
index 0000000..ab306f6
--- /dev/null
+++ b/examples/xsl/param1.xsl
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method="text"/>
+<xsl:param name="Text"/>
+<xsl:param name="Count"/>
+<xsl:template match="/">
+ <xsl:call-template name="t1"/>
+</xsl:template>
+<xsl:template name="t1">
+ <xsl:for-each select="/xml">
+ <xsl:value-of select="$Text"/>
+ <xsl:value-of select="$Count"/>
+ <xsl:value-of select="'&#10;'"/>
+ </xsl:for-each>
+</xsl:template>
+</xsl:stylesheet>
diff --git a/examples/xsl/sum1.xsl b/examples/xsl/sum1.xsl
new file mode 100644
index 0000000..a595171
--- /dev/null
+++ b/examples/xsl/sum1.xsl
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method="text"/>
+<xsl:param name="inputFile">-</xsl:param>
+<xsl:template match="/">
+ <xsl:call-template name="t1"/>
+</xsl:template>
+<xsl:template name="t1">
+ <xsl:value-of select="sum(/xml/table/rec/numField)"/>
+ <xsl:value-of select="'&#10;'"/>
+</xsl:template>
+</xsl:stylesheet>