From b31f9170c2bc2330442070968d3cb334cadb5faa Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Mon, 18 Aug 2014 20:11:18 +0200 Subject: Renamed FunctionExternalCommand result root node * this change was implemented to match the naming scheme of all other external functions * updated external text formatter test case accordingly --- src/function/external_command.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/function/external_command.cc b/src/function/external_command.cc index bd2bf84..7d91a9a 100644 --- a/src/function/external_command.cc +++ b/src/function/external_command.cc @@ -41,7 +41,7 @@ namespace InputXSLT { DomDocumentCache::document_ptr FunctionExternalCommand::constructDocument( std::string command, - boost::optional stdinText + boost::optional input ) const { DomDocumentCache::document_ptr domDocument( DomDocumentCache::createDocument("content") @@ -56,18 +56,18 @@ DomDocumentCache::document_ptr FunctionExternalCommand::constructDocument( boost::process::launch_shell(command, context) ); - if ( stdinText ) { + if ( input ) { boost::process::postream& inputStream = commandProcess.get_stdin(); - inputStream << *stdinText; + inputStream << *input; inputStream.close(); } boost::process::pistream& outputStream = commandProcess.get_stdout(); boost::process::status status = commandProcess.wait(); - ResultNodeFacade result(domDocument.get(), "output"); - result.setAttribute("command", command); - result.setAttribute("code", std::to_string(status.exit_status())); + ResultNodeFacade result(domDocument.get(), "command"); + result.setAttribute("executed", command); + result.setAttribute("code", std::to_string(status.exit_status())); if ( status.exited() ) { try { -- cgit v1.2.3