Age | Commit message (Collapse) | Author |
|
* otherwise one has to pass the full path to the command
** additionally it is much easier to enable passing arguments to the external formatter this way
* modified external function parameter accordingly
* updated external text formatter test case
|
|
* FilesystemContext was returning absolute paths in nearly every situation
** even when a path relative to the current working directory might be easier on the eyes
* new _soft_ base path resolution logic is implemented in a local "determineBasePath" method
|
|
|
|
* i.e. they now create the directory tree required to contain their respective output files automatically
* this is needed so TestXSLT is able to create the target directory implicitly
|
|
* entities in transformations passed by DOM to FunctionGenerate or FunctionTransform require a valid system id as a FilesystemContext base to be resolved
* added getBase member method to FilesystemContext
|
|
* its called a "platform" and not a "plattform" as in German...
|
|
* TestXSLT is a playground for testing static site generation concepts based on InputXSLT
* replaced xalan::FormatterToXML indent amount with its default value
|
|
* the base path of entities resolved through square bracket include paths was not resolved correctly due to missing extraction
|
|
* added custom deleter for xalan::XalanCompiledStylesheet specific std::unique_ptr specialization
* added previously missing check for successful stylesheet compilation
|
|
* this function essentially provides the same functionality as FunctionTransform with the addition of directly committing the result to the filesystem
** this is needed if one wants to generate doctype-containing transformations from inside a transformation as "write-file" is not able to infer the doctype of a given xalan::XalanNode pointer
** this is a integral limitation of (at least) XSLT 1.0 as implemented in Apache Xalan
*** a document can of course only have a single document type
*** e.g. we can not include a doctype node in the result tree of FunctionTransform
* implemented test case for FunctionGenerate
* transformation "test.xsl" is shared between the FunctionTransform and FunctionGenerate test cases
* modified README.md accordingly
|
|
* 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
|
|
* "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
|
|
* previous createDocument method used default name "content"
** this led to problems when using xalan::XalanNode as transformation input
** the parameter-less createDocument overload now creates a unnamed xercesc::DOMDocument
* changed external function implementations accordingly
|
|
* paths that can not be resolved against the include-path vector were passed on as they were instead of first removing the "file://" prefix
* this caused all normal entity paths passed to "xsl:import" and "xsl:include" statements to be unresolvable
|
|
* the common use case of ResultNodeFacade inside external function implementations is managing the result root node
** this root node can be fetched through the xercesc::DOMDocument instance
** the new alias overload automatically fetches the root node pointer and as such doesn't require a root node parameter
* changed external function implementations accordingly
|
|
* pointers to xercesc::DOMDocument were manually released
** this is now solved using a custom deleter for the appropriate std::unqiue_ptr template specialization
* added matching factory method to DomDocumentCache
* updated external function implementations accordingly
** "constructDocument" is now expected to return a DomDocumentCache::document_ptr instance
* updated TransformerFacade accordingly
* this change was implemented to get rid of the manual memory management required by xalan / xerces
|
|
* 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
|
|
* using xalan::FormatterToXercesDOM internally
** this required changes to the TransformationFacade::generate member method overloads
* TransformationFacade::generate now accepts references to xalan::FormatterListener instances
** "generate(std::basic_ostream<char>&..." instantiates a xalan::FormatterToXML and passes it to the actual generate member method
* changed ResultNodeFacade's "getNode" method into a "getResultElement" method
** xalan::FormatterToXercesDOM requires a xercesc::DOMElement instance instead of the previously available xercesc::DOMNode instance
** changed FunctionReadDirectory accordingly
* adapted FunctionTransform test case accordingly
|
|
* neither the constructor nor the generate member methods need to be templatized
** only supported "output" argument is now a reference to a "std::basic_ostream<char>" instance
** the caller is responsible for e.g. writing the output to disk
* this was done to simplify the basic interface of InputXSLT
* removed "default_params" testcase along with default parameter generation
** this feature is neither used nor required
|
|
* this increases consistency accross all external functions
* enables usage of non-global formatter executables
|
|
* i.e. "write-file" now supports the serialization of given DOM structures
** this will be needed e.g. if FunctionTransform returns the result as a DOM tree instead of as a plain string
** enables the creation of multiple XML documents from within a single transformation
*** i.e. backports the functionality provided in XSLT 2.0 by "xsl:result-document" to xalan's XSLT 1.0
* changed test cases accordingly
|
|
* the external "transform" function now expects a input document as its first parameter
** this input parameter is resolved and passed as input to the transformation
** changed and expanded test case accordingly
* because of xalan internal problem this currently only supports input DOMs loaded directly from the fs
** passing result trees or node sets analog to how the transformation may be passed into the function leads to parsing and assert failures
** parsing node-based input DOMs using xalanc::XalanTransformer::parseSource produces errors concerning base entity resolution
** if the error capacitor instance is temporarily disabled it works correctly as long as one doesn't try to access the input document
*** this causes a assert failure in the XPath implementation (seems to be related to XALANC-540)
|
|
* outdated documentation led me to believe that one has to free compiled stylesheets and input sources manually
** while xalan::XalanTransformer offers the required methods it also calls them by itself on destruction
|
|
* accepts a path parameter and the content to be written
* removed target parameter form FunctionTransform
** transformation result is now returned as a string
*** nodeset return value is planned
** e.g. writing the result to the fs is optional and has to be achieved using FunctionWriteFile
* changed "transform" test case accordingly
* this marks a paradigm shift and is the continuation of the changes described in 741a70f
** InputXSLT now also implements a output function
* added basic io error handling to FunctionReadFile
|
|
* previous logic for resolving boost::filesystem::path parameters in the XObjectValue class actively tried to resolve existing files
** this contradicts the planned introduction of e.g. a external "write-file" function
* callers of external functions with path arguments now have to enclose them in square brackets if include path resolution is required
** analog to the usage of the "xsl:import" tag
* moved "getPathFromSystemId" from compilation local method into static method of IncludeEntityResolver
* changed test cases accordingly
|
|
* added support for defining boost::filesystem::path as a external function parameter
** boost::filesystem::path parameters are resolved against the appropriate FilesystemContext and IncludeEntityResolver instances
* xalan::XSLTInputSource parameter source paths are also resolved
* removed need for passing a reference FilesystemContext to "constructDocument" methods
** they now only accept the parameters of the external function implemented by them
** all path resolution logic is wrapped by the newly created XObjectValue class
* converted XObjectValue namespace into class
** the "get" template method is now a template member method
** this was needed to enable value casting logic to access the appropriate FilesystemContext and IncludeEntityResolver instances
* this commit marks the next step towards the goals defined in 741a70f
|
|
* FunctionTransform was adapted to support passing the transformation as either a string path or directly as a node-set / result-tree
** this in turn required changes to the TransformationFacade
** the implementation of a xalan::XSLTInputSource specialization for the XObjectValue::get template method was also required
* changed ixslt executable to match TransformationFacade constructor changes
* these changes were implemented in preparation for a restructuring of how the separate external functions provided by InputXSLT operate and work together
** the approach up until now was to provide non-combinable external functions for distinct task such as "read a file" and "transform that transformation using these parameters into that file"
** if you think about the areas of operations of these functions are overlapping quite a bit
*** e.g. FunctionTransform reads files, transforms DOM structures and writes files instead of only transforming things
** the new approach will be to limit the feature set of each function in the attempt of making the clearer and increasing their combinability
*** e.g. FunctionTransform won't read or write files but expect both the input-DOM and the transformation-DOM as node-sets or result trees and return the transformed document as a node-set to be written using FunctionWriteFile (to be implemented)
|
|
* FunctionReadFile is now able to distinguish between XML files and plain text files
** it selects the appropriate course of action automatically
** reading the file as XML into the DOM or reading it as a string
* the current selection criteria is the file extension
** I am thinking about trying to import every file into the DOM and using the result state of that action as selection criteria
* Updated README.md and test cases accordingly
|
|
* "unsigned" type led to a compiler error on 64bit systems
** the Sequence template uses std::size_t which resolves to "unsigned long" instead of "unsigned int" on 64bit systems
** as "unsigned" is resolved to "unsigned int" by the compiler this situation produced a type conflict
* added recommendation for using a xalan library version built with ICU flags to README.md
** otherwise e.g. the "format-number" function is not fully supported
|
|
* if a square bracket enclosed path can be extracted but not resolved against the include path vector we should return at least the extracted path and not the raw path
* otherwise the system has no chance of correctly resolving things
** additionally error messages were showing the square bracket syntax instead of the actual path
|
|
* 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
|
|
* external DOM may cause xercesc::DOMException's to be thrown instead of passing all errors to the custom error handlers
** these exceptions are handled by this commit by setting the "result" attribute to "error" and adding "error" value nodes with further information
|
|
* implemented for commit 5f6fc45 but not included into that commit
|
|
* 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
|
|
* removes xalan and boost::filesystem::fstream dependencies from FunctionReadXmlFile
* xercesc provides a solution for loading files into it's XercesDOMParser class
** this should be used instead of building a custom replacement using boost's fstream and xalan::XSLTInputSource
|
|
* added entity, line and column information
* formatting analog to ErrorCapacitor warning messages
** i.e. this commit implements functionality similar to "xalanc::ProblemListenerBase::defaultFormat" for "xercesc::ErrorHandler" exceptions
|
|
* 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
|
|
* xalan::ProblemListenerBase provides a static member method called "defaultFormat"
** this method provides formatting of problem messages into xalan::XalanDOMString instances when combined with xalan::DOMStringPrintWriter
* there is no need for implementing custom message formatting
** the only reason why ErrorCapacitor exists is so we are able to capture and print messages at our own volition
|
|
* 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
|
|
* xalan is segfaulting in XalanDOMString constructor when the static member "XalanLocator::getSystemId" is returning null-pointer
** this should seemingly be handled by passing a pointer to the static constant m_dummy but this sadly fails to prevent the segfault
** the patch provided by this commit fixes the problem for now but I cannot guarantee that this wont cause any side effects in a other context
* Adapted TransformationFacade to handle errors during transformation compilation
** errors generated during transformation compilation are returned through the generate member method
** throwing an exeception during TransformationFacade construction would require additional error handling in the calling code
* Added xalan::ProblemListener functionality to the ErrorHandler class
** XSLT problems passed to the ProblemListener are returned alongside to and treated as all other transformation errors
|
|
* 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
|
|
* importing XML output of a called executable into the result document required special logic which clashed with a general execute function
* general execute function may be implemented in the future
** support for external text formatters with XML output has a higher priority
* current implementation enables calling a markdown parser and including the XHTML output into the document
|
|
* enables execution of external programs
** second parameter is passed to stdin
** stdout is captured and returned
** based on booost::process
* this was implemented to enable access to external content preprocessors such as markdown
|
|
* there are situations where one may pass absolute paths to external functions which should not be resolved against the context path
** for example when reading files found by "read-directory" through its "full" value node
* this could be checked by the external functions themself
** but as this check is required by all of them it is better implemented in the FilesystemContext
|
|
* 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
|