Age | Commit message (Collapse) | Author |
|
* a single file may be passed to the XSLT processor as input
** the file is read once and stored within a xalan::XalanParsedSource to be reused by all calls to "TransformationFacade::generate"
* added appropriate TranformationFacade constructor overload
** this new constructor overload which is taking a path to both the transformation and the input file is the main constructor
*** the old constructor is now only a alias for this new constructor
* adapted static "try_create" TransformationFacade factory method into variadic template factory method
* added optional "--input" argument to ixslt
** expanded option handling accordingly
|
|
* extracted system id handling into separate "resolve" method overload of "IncludeEntityResolver" class
* paths to be resolved against the include path vector are enclosed by square brackets
** FilesystemContext for external functions was instantiated using the unmodified systemId provided by xalan::Locator
** this commit adds include path resolution to that step
*** exceptions were thrown as the program tried to instantiate a FilesystemContext instance without resolving the square bracket syntax
* changed FunctionTransform "target" attribute content to the target path filename instead of the full path
|
|
* replaced std::tuple constructing Mapper template methods with direct XObjectArgVectorType unpacking
** XObjectValue::get template method is applied directly using parameter pack unpacking
* implemented custom IndexSequence / Sequence type to provide vector indexes
* modified all external functions to provide matching constructDocument overloads
|
|
* in difference to ErrorCapacitor this class doesn't throw an exception on "discharge" but returns the gathered warnings
* adapted FunctionTransform and frontend error handling to include warnings
* added static "try_create" method to TransformationFacade
** wraps construction error handling
** custom logic may be embedded using the std::function argument
*** this was implemented to prevent unneccessary code duplication for handling both construction and generation errors
* adapted FunctionTransform to return warning as "warning" nodes in the result tree
** added functional lambda expression factory method "handleErrors"
*** returns a error handling lambda expression for a given ResultNodeFacade
* implemented WarningGuard class in frontend executable
** guarantees warnings to be printed to std::cerr independent of any exceptions
|
|
* ErrorMultiplexer is derived from both xercesc::ErrorHandler and xalan::ProblemListener
* registers itself as XalanTransformer's ErrorHandler and ProblemListener
* distributes captured errors and warnings to all registered ErrorMultiplexer::Receiver instances
** ErrorCapacitor implements the ErrorMultiplexer::Receiver interface and as such registers itself in a given ErrorMultiplexer instance
** ErrorMultiplexer reduces the different xalan and xercesc internal error classifications into either warnings or errors
* this was implemented to make it possible to easily differentiate between warnings and errors
** previously warnings were treated as errors
** ErrorCapacitor ignores warnings and only captures errors
** WarningCapacitor will be implemented to handle warnings during XSLT processing
|
|
* the root node of the result tree of each function is a domain element
** i.e. the root node of "read-xml-file" is "file", the root node of "read-directory" is "directory"
* the root node contains the result state of the function call encoded in a "result" attribute
** possible values are "success" and "error"
** the root node may contain additional attributes such as the target path of a called transformation
* the actual function result is contained within the child nodes of the function root node
** i.e. the XML file tree returned by "read-xml-file" is a child of the function root node
** if specific errors occured they are also returned as child nodes of the function root node
*** this is currently only the case for "transform" where transformation errors are returned as "error" value node childs of the function root node
* updated test cases accordingly
|
|
* ErrorHandler is replaced by ErrorCapacitor
** temporarily registers itself as both the ProblemListener and ErrorHandler of a given XalanTransformer instance
** deregisters itself on destruction
** collects all problems and errors during its lifetime inside a internal std::vector<std::string> instance
** if this instance is not empty it is thrown contained within a ErrorCapacitor::exception by the member method ErrorCapacitor::discharge
* this enables using the same code for handling transformation compilation and generation errors and problems
* updated test frontend accordingly
|
|
* ErrorHandler class created in 5859cb6 now caches all errors instead of pushing them to std::cerr
** cached errors are retrieved by TransformationFacade's "generate" member method
* test frontend pushes all errors to std::cerr
* FunctionTransform returns errors to the calling template as XML
** FunctionTransform test case demonstrates how one may test for successful transformation
* "generate" member method returns std::string vector wrapped in a std::unique_ptr
** this is used as a kind of optional pointer, as the std::unique_ptr instance only wraps a vector if errors where actually generated
|
|
* std::string specialization of "get" template method
* replaces FunctionTransform local input trimming implemented in 5859cb6
|
|
* InputXSLT::ErrorHandler is derived from xercesc::ErrorHandler and enables contextual printing of transformation errors
** currently this means that the error messages passed to std::cerr contain the full path of the offending transformation
* added input trimming to the external transform function
** calls to this function from inside a transformation may contain unnecessary whitespace characters which disrupt further processing
|
|
* wraps result node construction and appends it to root node on destruction
* offers a simpler interface for common node construction patterns
* simplifies result node construction in all external function implementations
** most noticeable in FunctionReadDirectory
* expanded FunctionReadDirectory result nodes by name, extension, and full-path nodes
|
|
* if a given file can not be located relative to the transformation's location both "read-file" and "read-xml-file" will now try to resolve the path using the IncludeEntityResolver
* all external functions based on the FunctionBase template are now provided with a pointer to a IncludeEntityResolver instance
* it is determined by the external function implementation whether include path resolution will be used
|
|
* xalan / xerces offers the possibility of implementing custom entity resolvers which are called upon by "<xsl:include..."
** such a custom resolver was implemented to resolve include path entities
* this is a much better way to support include paths than offering a custom external "resolve-include" function
* as entity paths are expanded before they are passed to the entity resolver, a special "[path]" syntax simmilar to "#include <path>" had to be implemented
|
|
* names matter, from now on parameters to external functions will be called parameters uniformly instead of mixing arguments and parameters
|
|
* the given XObject is passed to the called transformation
** this was done to enable templates to pass information to each other
** this should support any type usable in a XPath context to be passed as an argument
* expanded FunctionTransform test case accordingly
|
|
* FunctionBase::argument_tuple is a std::tuple specialization type specialized on the argument types passed inside the variadic template argument of FunctionBase
* added tuple Mapper and XObjectValue helper namespaces containing recursive tuple construction and XObjectPtr value extraction logic
* changed all external function implementations accordingly
* this change was implemented to uniformly support different external function argument types than std::string
|
|
* external functions may expect arguments with a type different from boost::filesystem::path so they are only provided raw string values
* moved xalan string conversion logic into separate compilation unit
|
|
* constructDocument member method is provided with a FunctionBase::argument_array instance
* improved argument validation in FunctionBase
* this parameter was added to support FunctionBase as a base class for FunctionTransform
|
|
* "InputXSLT:transform" expects two input arguments and executes the given transformation into the given target file
** this function respresents a important step in the direction of making it possible to write an actual static site generator on top of InputXSLT using XSLT
* added basic "transform" test case
* updated README.md to include this new function
|