summaryrefslogtreecommitdiff
path: root/tests/namespaces
diff options
context:
space:
mode:
authorWilliam M. Brack <wbrack@src.gnome.org>2004-08-15 04:55:29 +0000
committerWilliam M. Brack <wbrack@src.gnome.org>2004-08-15 04:55:29 +0000
commitfb46ba79d47c7c7816e78a5f088ab54a057d51be (patch)
treec8a1da7c2405d80eb521c45289481321e11cba0c /tests/namespaces
parenta2536bc4046f41fa7a67cf282b40459aba7fbc66 (diff)
downloadlibxslt-fb46ba79d47c7c7816e78a5f088ab54a057d51be.tar.gz
libxslt-fb46ba79d47c7c7816e78a5f088ab54a057d51be.tar.bz2
libxslt-fb46ba79d47c7c7816e78a5f088ab54a057d51be.zip
fixed handling of #default in namespace-alias for default namespace (bug
* libxslt/namespaces.[ch], transform.c, xslt.c, xsltInternals.h: fixed handling of #default in namespace-alias for default namespace (bug 149659) * tests/namespaces/tst7.* tst8.*: added regression tests for above
Diffstat (limited to 'tests/namespaces')
-rw-r--r--tests/namespaces/Makefile.am4
-rw-r--r--tests/namespaces/tst7.out13
-rw-r--r--tests/namespaces/tst7.xml2
-rw-r--r--tests/namespaces/tst7.xsl21
-rw-r--r--tests/namespaces/tst8.out7
-rw-r--r--tests/namespaces/tst8.xml2
-rw-r--r--tests/namespaces/tst8.xsl18
7 files changed, 66 insertions, 1 deletions
diff --git a/tests/namespaces/Makefile.am b/tests/namespaces/Makefile.am
index ebb95810..4c58bd72 100644
--- a/tests/namespaces/Makefile.am
+++ b/tests/namespaces/Makefile.am
@@ -11,7 +11,9 @@ EXTRA_DIST = \
tst3.xml tst3.xsl tst3.out \
tst4.xml tst4.xsl tst4.out \
tst5.xml tst5.xsl tst5.out \
- tst6.xml tst6.xsl tst6.out
+ tst6.xml tst6.xsl tst6.out \
+ tst7.xml tst7.xsl tst7.out \
+ tst8.xml tst8.xsl tst8.out
all:
diff --git a/tests/namespaces/tst7.out b/tests/namespaces/tst7.out
new file mode 100644
index 00000000..b86f605e
--- /dev/null
+++ b/tests/namespaces/tst7.out
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>
+ A title
+ </title>
+ </head>
+ <body>
+ Some text
+ </body>
+</html>
diff --git a/tests/namespaces/tst7.xml b/tests/namespaces/tst7.xml
new file mode 100644
index 00000000..ac9ac8fd
--- /dev/null
+++ b/tests/namespaces/tst7.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" ?>
+<adoc />
diff --git a/tests/namespaces/tst7.xsl b/tests/namespaces/tst7.xsl
new file mode 100644
index 00000000..1ce238bd
--- /dev/null
+++ b/tests/namespaces/tst7.xsl
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:html="http://http://www.w3.org/1999/xhtml">
+ <xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"
+doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
+doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" />
+ <xsl:namespace-alias stylesheet-prefix="html" result-prefix="#default" />
+ <xsl:strip-space elements="*" />
+ <xsl:template match="/adoc">
+ <html:html>
+ <html:head>
+ <html:title>
+ A title
+ </html:title>
+ </html:head>
+ <html:body>
+ Some text
+ </html:body>
+ </html:html>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/tests/namespaces/tst8.out b/tests/namespaces/tst8.out
new file mode 100644
index 00000000..5eabde58
--- /dev/null
+++ b/tests/namespaces/tst8.out
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<bb:root xmlns:bb="http://bbrack.org">
+ <element1 xmlns="http://delightful.com.hk">
+ <element2>Content 2</element2>
+ </element1>
+ <bb:element3>Content 3</bb:element3>
+</bb:root>
diff --git a/tests/namespaces/tst8.xml b/tests/namespaces/tst8.xml
new file mode 100644
index 00000000..ac9ac8fd
--- /dev/null
+++ b/tests/namespaces/tst8.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" ?>
+<adoc />
diff --git a/tests/namespaces/tst8.xsl b/tests/namespaces/tst8.xsl
new file mode 100644
index 00000000..52f2caa1
--- /dev/null
+++ b/tests/namespaces/tst8.xsl
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:bb="http://bbrack.org">
+ <xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/>
+ <xsl:namespace-alias
+ stylesheet-prefix="#default"
+ result-prefix="bb" />
+ <xsl:strip-space elements="*" />
+ <xsl:template match="/adoc">
+ <root>
+ <element1 xmlns="http://delightful.com.hk">
+ <element2>Content 2</element2>
+ </element1>
+ <element3>Content 3</element3>
+ </root>
+ </xsl:template>
+</xsl:stylesheet>