summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2012-08-15 22:40:05 +0200
committerDaniel Veillard <veillard@redhat.com>2012-08-16 16:21:13 +0800
commitfaeaa3146cab124628785c4b536ba0b824292f8d (patch)
treeee3e3a3b3a417a217557d010b8cfe1b71183ba2c /tests
parentabb7c65980c7da450f0447dcc6a1821eef99d473 (diff)
downloadlibxslt-faeaa3146cab124628785c4b536ba0b824292f8d.tar.gz
libxslt-faeaa3146cab124628785c4b536ba0b824292f8d.tar.bz2
libxslt-faeaa3146cab124628785c4b536ba0b824292f8d.zip
Forwards-compatible processing of unknown top level elements
Bug #677901
Diffstat (limited to 'tests')
-rw-r--r--tests/docs/bug-175.xml1
-rw-r--r--tests/general/bug-175.err6
-rw-r--r--tests/general/bug-175.out8
-rw-r--r--tests/general/bug-175.xsl30
4 files changed, 45 insertions, 0 deletions
diff --git a/tests/docs/bug-175.xml b/tests/docs/bug-175.xml
new file mode 100644
index 00000000..69d62f2c
--- /dev/null
+++ b/tests/docs/bug-175.xml
@@ -0,0 +1 @@
+<doc/>
diff --git a/tests/general/bug-175.err b/tests/general/bug-175.err
new file mode 100644
index 00000000..70cddd5b
--- /dev/null
+++ b/tests/general/bug-175.err
@@ -0,0 +1,6 @@
+compilation error: file ./bug-175.xsl line 28 element function
+xsltStylePreCompute: unknown xsl:function
+compilation error: file ./bug-175.xsl line 5 element transform
+xsl:version: only 1.0 features are supported
+compilation error: file ./bug-175.xsl line 28 element function
+xsltParseStylesheetTop: ignoring unknown function element
diff --git a/tests/general/bug-175.out b/tests/general/bug-175.out
new file mode 100644
index 00000000..e9cf403b
--- /dev/null
+++ b/tests/general/bug-175.out
@@ -0,0 +1,8 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>xsl:function</title>
+</head>
+<body><p><tt>xsl:function</tt> not supported, but properly handled (ignored)</p></body>
+</html>
diff --git a/tests/general/bug-175.xsl b/tests/general/bug-175.xsl
new file mode 100644
index 00000000..f25e4c94
--- /dev/null
+++ b/tests/general/bug-175.xsl
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:test="#test"
+ exclude-result-prefixes="test"
+ version="2.0">
+ <xsl:output method="html" encoding="iso-8859-1" version="4.0"
+ doctype-public="-//W3C//DTD HTML 4.01//EN"
+ indent="yes"/>
+
+ <xsl:template match="/">
+ <html>
+ <head>
+ <title>xsl:function</title>
+ </head>
+ <body>
+ <xsl:choose>
+ <xsl:when test="function-available('test:test')">
+ <p>Result: <xsl:value-of select="test:test()"/></p>
+ </xsl:when>
+ <xsl:otherwise>
+ <p><tt>xsl:function</tt> not supported, but properly handled (ignored)</p>
+ </xsl:otherwise>
+ </xsl:choose>
+ </body>
+ </html>
+ </xsl:template>
+
+ <xsl:function name="test:test">YES</xsl:function>
+
+</xsl:transform>