From 71b7af819fdf561e0e15caaf787afd22a1b17b0b Mon Sep 17 00:00:00 2001
From: jez <>
Date: Sat, 19 Jan 2008 22:45:48 +0000
Subject: [PATCH] xsl:sort - blow up if we get a lang attribute
---
.../XSLT/impl/handler/xslt_sort_handler.hpp | 3 +
tests/XSLT/main.cpp | 4 +-
.../TESTS/arabica-expected-fails.xml | 152 ++++++++++++------
3 files changed, 107 insertions(+), 52 deletions(-)
diff --git a/include/XSLT/impl/handler/xslt_sort_handler.hpp b/include/XSLT/impl/handler/xslt_sort_handler.hpp
index 88927278..b23ac7d8 100755
--- a/include/XSLT/impl/handler/xslt_sort_handler.hpp
+++ b/include/XSLT/impl/handler/xslt_sort_handler.hpp
@@ -43,6 +43,9 @@ public:
datatype = context_.xpath_attribute_value_template(attr["data-type"]);
order = context_.xpath_attribute_value_template(attr["order"]);
+ if(attr["order"].length() != 0)
+ throw SAX::SAXException("Sorry! Don't support xsl:sort lang attribute yet");
+
sort_ = new Sort(select,
lang,
datatype,
diff --git a/tests/XSLT/main.cpp b/tests/XSLT/main.cpp
index 84138145..bedc59fb 100755
--- a/tests/XSLT/main.cpp
+++ b/tests/XSLT/main.cpp
@@ -91,8 +91,8 @@ int main(int argc, const char* argv[])
runner.addTest("Sorting", XSLTTest_suite("Sorting"));
//runner.addTest("Stylesheet", XSLTTest_suite("Stylesheet"));
//runner.addTest("Template", XSLTTest_suite("Template"));
- runner.addTest("Text", XSLTTest_suite("Text"));
- runner.addTest("Valueof", XSLTTest_suite("Valueof"));
+ //runner.addTest("Text", XSLTTest_suite("Text"));
+ //runner.addTest("Valueof", XSLTTest_suite("Valueof"));
//runner.addTest("Variables", XSLTTest_suite("Variables"));
//runner.addTest("Whitespaces", XSLTTest_suite("Whitespaces"));
runner.addTest("XSLTFunctions", XSLTTest_suite("XSLTFunctions"));
diff --git a/tests/XSLT/testsuite/TESTS/arabica-expected-fails.xml b/tests/XSLT/testsuite/TESTS/arabica-expected-fails.xml
index d778d35b..a797f8a2 100644
--- a/tests/XSLT/testsuite/TESTS/arabica-expected-fails.xml
+++ b/tests/XSLT/testsuite/TESTS/arabica-expected-fails.xml
@@ -390,56 +390,108 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+