aboutsummaryrefslogtreecommitdiff
path: root/src/read_file_command.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/read_file_command.h')
-rw-r--r--src/read_file_command.h62
1 files changed, 0 insertions, 62 deletions
diff --git a/src/read_file_command.h b/src/read_file_command.h
deleted file mode 100644
index 5e47c36..0000000
--- a/src/read_file_command.h
+++ /dev/null
@@ -1,62 +0,0 @@
-#include <xalanc/Include/PlatformDefinitions.hpp>
-#include <xercesc/util/PlatformUtils.hpp>
-#include <xalanc/XalanTransformer/XalanTransformer.hpp>
-#include <xalanc/XPath/XObjectFactory.hpp>
-#include <xalanc/XPath/Function.hpp>
-#include <xalanc/XPath/XObject.hpp>
-
-#include "utility.h"
-
-namespace InputXSLT {
-
-class FunctionReadFile : public xalan::Function {
- public:
- virtual xalan::XObjectPtr execute(
- xalan::XPathExecutionContext& executionContext,
- xalan::XalanNode* context,
- const xalan::Function::XObjectArgVectorType& arguments,
- const xalan::Locator* locator
- ) const {
- if ( arguments.size() != 1 ) {
- xalan::XPathExecutionContext::GetAndReleaseCachedString guard(
- executionContext
- );
-
- generalError(executionContext, context, locator);
- }
-
- xalan::CharVectorType fileNameVector;
- std::string fileNameString;
-
- arguments[0]->str().transcode(fileNameVector);
-
- std::move(
- fileNameVector.begin(),
- fileNameVector.end(),
- fileNameString.begin()
- );
-
- return executionContext.getXObjectFactory().createString(
- xalan::XalanDOMString(
- InputXSLT::readFile(fileNameString).data()
- )
- );
- }
-
- virtual FunctionReadFile* clone(xalan::MemoryManager& manager) const {
- return xalan::XalanCopyConstruct(manager, *this);
- }
-
- FunctionReadFile& operator=(const FunctionReadFile&) = delete;
- bool operator==(const FunctionReadFile&) const = delete;
-
- private:
- const xalan::XalanDOMString& getError(xalan::XalanDOMString& result) const {
- result.assign("The read-file() function expects one argument.");
-
- return result;
- }
-
-};
-
-}