From f6ff54c492df81018cf48da039ee681508f88e46 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sat, 16 Aug 2014 23:30:36 +0200 Subject: Implemented primitive optional parameter support for external functions * renamed FunctionExternalTextFormatter into FunctionExternalCommand ** the goal is to provide a general interface to a variety of external commands *** e.g. not just text formatters but system utilities for file management and so on ** this requires the stdin parameter to be optional as not all external commands require stdin input * implemented "filter_derived" helper template to determine amount of optional parameters ** optional parameters are defined as "boost::optional" specializations *** they in turn can be detected by checking if "boost::optional_detail::optional_tag" is a base class * "callConstructDocument" member method of "FunctionBase" performs additional bounds checking of parameter vector * "boost::optional" specific member overload was added to "XObjectValue" helper class ** we will have to provide full specializations for all optional types as C++ prohibits partial member function template specialization * renamed the external function in "PlattformGuard" * changed README.md and test cases accordingly --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 8629b9a..0593bb5 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Contrary to popular opinion I actually like XSLT as a content transformation lan - external `read-directory` function for read-only directory traversal - external `transform` function for executing transformations inside transformations - external `generate` function for executing transformations and committing the result directly to the filesystem -- external `external-text-formatter` function for executing text formatters and capturing their XML output +- external `external-command` function for executing external commands such as text formatters and capturing their output - external `write-file` function for writing files ## Examples: @@ -24,7 +24,7 @@ The `test` directory contains black-box test cases for every external function p - [`InputXSLT:read-directory`](test/read_directory/transformation.xsl) - [`InputXSLT:transform`](test/transform/transformation.xsl) - [`InputXSLT:generate`](test/generate/transformation.xsl) -- [`InputXSLT:external-text-formatter`](test/external_text_formatter/transformation.xsl) (requires [markdown.pl](http://daringfireball.net/projects/markdown/)) +- [`InputXSLT:external-command` (text formatting)](test/external_text_formatter/transformation.xsl) (requires [markdown.pl](http://daringfireball.net/projects/markdown/)) - [`InputXSLT:write-file`](test/write_file/transformation.xsl) Concepts of how static sites may be generated using InputXSLT are being evaluated in [TestXSLT](https://github.com/KnairdA/TestXSLT). -- cgit v1.2.3