aboutsummaryrefslogtreecommitdiff
path: root/src/transformer_facade.h
AgeCommit message (Collapse)Author
2014-07-12Marked constructDocument member methods as constAdrian Kummerlaender
* they don't modifiy the class state so there is no reason for them not being marked as const ** all calling methods are also const ** this enables us to remove the const_cast in FunctionBase * modified external function implementations accordingly * inlined handleError method in FunctionTransform as it is not needed in multiple places anymore
2014-07-10Fixed TransformerFacade doctype output for xalan::FormatterToXMLAdrian Kummerlaender
* "xsl:output" was disregarded for xalan::FormatterToXML based output ** the setting contained within this tag have to be passed manually to the constructor... ** the xalan standard implementation includes special handling for this case ** sadly there was no alternative to adding special handling in InputXSLT as well, it is really quite ugly * added "dispatchTransformer" template member method to TransformerFacade ** calls xalan::FormatterToXML augmentation logic if needed, compiles template * this problem also exists for FunctionTransform output to xercesc DOM ** this patch doesn't aim to fix it in that case, it will have to be fixed separately
2014-07-05Revamped implementation to support FunctionTransform XalanNode inputAdrian Kummerlaender
* FunctionTransform now accepts xalan::XalanNode base xalan::XSLTInputSource instances as input parameter ** such xalan::XSLTInputSource instances were already supported for the stylesheet parameter but not for the input parameter ** e.g. it is now possible to generate a DOM inside a transformation, pass the DOM into a embedded transformation as input, modifiy the output of that transformation, pass this modified DOM into another transformation and so on... you get the point * this required a revamp of TransformationFacade ** it is now a transformation independent wrapper for xalan::XalanTransformer *** as such is was renamed to TransformerFacade ** removed error catching template factory method "try_create" as it is not needed anymore ** "std::basic_ostream<char>&" taking "generate" member method overloads were removed ** the set of "generate" member overloads was reduced to two methods accepting xalan::XSLTInputSource and xalan::FormatterListener as parameters * the core problem first documented in 299d0f6 was solved by transforming the input parameter into a xerces DOM and wrapping this DOM inside a xalan::XercesDOMWrapperParsedSource instance * serialization of the transformation result for file / std::cout output is now performed directly by the ixslt frontend * removed 'stylesheet parameter' parameter from FunctionTransform ** the functionality provided by this is easily replicated using the now possible DOM input parameter ** this was done to simplify the interface and reduce unnecessary feature duplication * updated FunctionTransform test case accordingly * added "generate" template function to ixslt frontend ** wraps TransformerFacade and manages ist input arguments ** handles serialization to stream * this commit marks a important milestone towards the goals defined in 741a70f
2014-04-24Changed TransformerFacade into TransformationFacade for single XSLTsAdrian Kummerländer
* contains a single, compiled transformation as specified by its construction argument * uses the transformation's location as the FilesystemContext * allows generation of output documents using _generate_ member method
2014-04-21Extracted filesystem path resolution into InputXSLT::FilesystemContextAdrian Kummerländer
* this class provides methods for resolving paths relative to the contained base path * other filesystem interaction methods will also be implemented in this class ** for instance directory traversal
2014-04-20Implemented support for modifying external function base pathAdrian Kummerländer
* one expects a read-file function to work relative to the directory the transformation is located and not to the executable's location ** from the perspective of the user the transformation is the application, not the actual executable * removed PlattformGuard struct from TransformerGuard (now TransformerFacade) * TransformerFacade is instatiated with the appropriate relative working path ** i.e. it will have to be instantiated for every directory containing one or more transformations