From 57f793ccc8c2f2fd520c8a2c6fed4c47813d232f Mon Sep 17 00:00:00 2001 From: jez Date: Mon, 27 Oct 2008 22:20:49 +0000 Subject: [PATCH] provided null implementation for unparsed-entity-uri --- include/XSLT/impl/xslt_compilation_context.hpp | 2 ++ include/XSLT/impl/xslt_functions.hpp | 18 ++++++++++++++++++ .../testsuite/TESTS/arabica-expected-fails.xml | 11 ++++++----- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/include/XSLT/impl/xslt_compilation_context.hpp b/include/XSLT/impl/xslt_compilation_context.hpp index dfffe841..669f344b 100755 --- a/include/XSLT/impl/xslt_compilation_context.hpp +++ b/include/XSLT/impl/xslt_compilation_context.hpp @@ -158,6 +158,8 @@ private: if((name == "current") && (current_allowed_)) return new CurrentFunction(argExprs); // unparsed-entity-uri + if(name == "unparsed-entity-uri") + return new UnparsedEntityUriFunction(argExprs); // generate-id if(name == "generate-id") return new GenerateIdFunction(argExprs); diff --git a/include/XSLT/impl/xslt_functions.hpp b/include/XSLT/impl/xslt_functions.hpp index c8e09b0f..6d8116f4 100644 --- a/include/XSLT/impl/xslt_functions.hpp +++ b/include/XSLT/impl/xslt_functions.hpp @@ -83,6 +83,24 @@ public: }; // CurrentFunction // string unparsed-entity-uri(string) +class UnparsedEntityUriFunction : public Arabica::XPath::XPathFunction +{ + typedef Arabica::XPath::XPathFunction baseT; + +public: + UnparsedEntityUriFunction(const std::vector >& args) : + Arabica::XPath::XPathFunction(1, 1, args) { } + + virtual Arabica::XPath::ValueType type() const { return Arabica::XPath::STRING; } + + virtual Arabica::XPath::XPathValue_impl* evaluate(const DOM::Node& context, + const Arabica::XPath::ExecutionContext& executionContext) const + { + // This is a minimal, but I think conformant, implementation + return new Arabica::XPath::StringValue(""); + } // evaluate +}; // UnparsedEntityUri + // string generate-id(node-set?) class GenerateIdFunction : public Arabica::XPath::XPathFunction { diff --git a/tests/XSLT/testsuite/TESTS/arabica-expected-fails.xml b/tests/XSLT/testsuite/TESTS/arabica-expected-fails.xml index a7be8d7b..e5098a95 100644 --- a/tests/XSLT/testsuite/TESTS/arabica-expected-fails.xml +++ b/tests/XSLT/testsuite/TESTS/arabica-expected-fails.xml @@ -215,7 +215,7 @@ - + @@ -252,7 +252,9 @@ + + @@ -262,10 +264,10 @@ - + - - + + @@ -750,7 +752,6 @@ -