<feed xmlns='http://www.w3.org/2005/Atom'>
<title>InputXSLT/src/support/dom, branch master</title>
<subtitle>XSLT extensions for static site generation</subtitle>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/InputXSLT/'/>
<entry>
<title>Fix std::unique_ptr custom deleter issue</title>
<updated>2020-04-25T18:42:08+00:00</updated>
<author>
<name>Adrian Kummerlaender</name>
</author>
<published>2020-04-25T18:42:08+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/InputXSLT/commit/?id=6d353960542e5c95f29d45b9359db25945a414a4'/>
<id>6d353960542e5c95f29d45b9359db25945a414a4</id>
<content type='text'>
Somehow the previous custom deleter for xercesc::DOMDocument fails
invokable assertions planet a compiler update. A lambda function
with the same signature wors for some reason…
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Somehow the previous custom deleter for xercesc::DOMDocument fails
invokable assertions planet a compiler update. A lambda function
with the same signature wors for some reason…
</pre>
</div>
</content>
</entry>
<entry>
<title>Switched member initialization to std::make_unique</title>
<updated>2014-09-14T17:49:15+00:00</updated>
<author>
<name>Adrian Kummerlaender</name>
</author>
<published>2014-09-14T17:49:15+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/InputXSLT/commit/?id=8ebea90f5cee70654ab9f1c19ed4f89dfc8ffb25'/>
<id>8ebea90f5cee70654ab9f1c19ed4f89dfc8ffb25</id>
<content type='text'>
* i.e. InputXSLT now requires a C++14 supporting compiler / standard library implementation
* this was done while enabling the StreamInputSource to handle all kinds of streams
** this in turn is required to enable e.g. stdin as transformation source while preserving the correct filesystem context
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* i.e. InputXSLT now requires a C++14 supporting compiler / standard library implementation
* this was done while enabling the StreamInputSource to handle all kinds of streams
** this in turn is required to enable e.g. stdin as transformation source while preserving the correct filesystem context
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed node list iteration in ResultNodeFacade</title>
<updated>2014-08-06T20:59:54+00:00</updated>
<author>
<name>Adrian Kummerlaender</name>
</author>
<published>2014-08-06T20:59:54+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/InputXSLT/commit/?id=5a38b9e11236c71245ca0609b54157630347e393'/>
<id>5a38b9e11236c71245ca0609b54157630347e393</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Added DomDocumentCache::createDocument overload enabling document naming</title>
<updated>2014-07-09T17:59:32+00:00</updated>
<author>
<name>Adrian Kummerlaender</name>
</author>
<published>2014-07-09T17:59:32+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/InputXSLT/commit/?id=1fbf6a39784b57925ab19df579f487a338e22ba5'/>
<id>1fbf6a39784b57925ab19df579f487a338e22ba5</id>
<content type='text'>
* 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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
</pre>
</div>
</content>
</entry>
<entry>
<title>Added ResultNodeFacade constructor overload for root nodes</title>
<updated>2014-07-08T12:06:47+00:00</updated>
<author>
<name>Adrian Kummerlaender</name>
</author>
<published>2014-07-08T12:06:47+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/InputXSLT/commit/?id=716958c6acb77f4f63cc6f99d741fe0a901a25ba'/>
<id>716958c6acb77f4f63cc6f99d741fe0a901a25ba</id>
<content type='text'>
* 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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
</pre>
</div>
</content>
</entry>
<entry>
<title>Implemented custom xercesc::DOMDocument deleter</title>
<updated>2014-07-07T20:25:03+00:00</updated>
<author>
<name>Adrian Kummerlaender</name>
</author>
<published>2014-07-07T20:25:03+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/InputXSLT/commit/?id=8f05c7de54336daefb214a754de35367098b6510'/>
<id>8f05c7de54336daefb214a754de35367098b6510</id>
<content type='text'>
* 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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
</pre>
</div>
</content>
</entry>
<entry>
<title>Changed FunctionTransform result type to node-set</title>
<updated>2014-07-04T20:41:17+00:00</updated>
<author>
<name>Adrian Kummerlaender</name>
</author>
<published>2014-07-04T20:41:17+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/InputXSLT/commit/?id=f05e742b88e3ebf7401c252332022f1a2f7eb8b0'/>
<id>f05e742b88e3ebf7401c252332022f1a2f7eb8b0</id>
<content type='text'>
* 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&lt;char&gt;&amp;..." 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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&lt;char&gt;&amp;..." 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
</pre>
</div>
</content>
</entry>
<entry>
<title>Revamped external function result trees</title>
<updated>2014-05-31T12:18:48+00:00</updated>
<author>
<name>Adrian Kummerländer</name>
</author>
<published>2014-05-31T12:18:48+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/InputXSLT/commit/?id=1a744712426c9c19019b8ebebdd0c703aae204a6'/>
<id>1a744712426c9c19019b8ebebdd0c703aae204a6</id>
<content type='text'>
* 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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
</pre>
</div>
</content>
</entry>
<entry>
<title>Implemented ResultNodeFacade as a DOM node construction helper</title>
<updated>2014-05-24T11:59:42+00:00</updated>
<author>
<name>Adrian Kummerländer</name>
</author>
<published>2014-05-24T11:59:42+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/InputXSLT/commit/?id=085935ddd577b0c65b4330318b5ba20492d93126'/>
<id>085935ddd577b0c65b4330318b5ba20492d93126</id>
<content type='text'>
* 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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
</pre>
</div>
</content>
</entry>
<entry>
<title>Switched internal DomDocumentCache structure to std::stack</title>
<updated>2014-05-11T18:09:34+00:00</updated>
<author>
<name>Adrian Kummerländer</name>
</author>
<published>2014-05-11T18:09:34+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/InputXSLT/commit/?id=20fca5978b55606062cdaf4c94dec82f5318a62a'/>
<id>20fca5978b55606062cdaf4c94dec82f5318a62a</id>
<content type='text'>
* using std::unordered_map for named cache lookups was a nice idea but is not useful when one keeps in mind that:
** we don't want cached external function responses in a situation where we are able to execute transformations inside transformations
** cached responses mean that we can not read a xml file, overwrite it using another transformation and then read it again
* the currently available InputXSLT frontend only processes a single transformation anyway, so increased memory requirements should not pose a problem
** if a future frontend should offer batch processing of transformation tasks, one could implement a cache reset method to free memory after a transformation has been processed
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* using std::unordered_map for named cache lookups was a nice idea but is not useful when one keeps in mind that:
** we don't want cached external function responses in a situation where we are able to execute transformations inside transformations
** cached responses mean that we can not read a xml file, overwrite it using another transformation and then read it again
* the currently available InputXSLT frontend only processes a single transformation anyway, so increased memory requirements should not pose a problem
** if a future frontend should offer batch processing of transformation tasks, one could implement a cache reset method to free memory after a transformation has been processed
</pre>
</div>
</content>
</entry>
<entry>
<title>Marked DomDocumentCache::item class as private</title>
<updated>2014-05-09T18:24:12+00:00</updated>
<author>
<name>Adrian Kummerländer</name>
</author>
<published>2014-05-09T18:24:12+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/InputXSLT/commit/?id=e83bbb457c98a0b77ca04e2832d7d0601912acd7'/>
<id>e83bbb457c98a0b77ca04e2832d7d0601912acd7</id>
<content type='text'>
* as the xerces document is not instantiated by DomDocumentCache::item and the class only exports a pointer to the converted xalan document, it makes no sense to expose the class to the outside in the first place
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* as the xerces document is not instantiated by DomDocumentCache::item and the class only exports a pointer to the converted xalan document, it makes no sense to expose the class to the outside in the first place
</pre>
</div>
</content>
</entry>
<entry>
<title>Revamped DomDocumentCache with regard to thread safety</title>
<updated>2014-05-03T20:04:16+00:00</updated>
<author>
<name>Adrian Kummerländer</name>
</author>
<published>2014-05-03T20:04:16+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/InputXSLT/commit/?id=261170cc5b6661106877dc2611dab281f4d91348'/>
<id>261170cc5b6661106877dc2611dab281f4d91348</id>
<content type='text'>
* DomDocumentCache::item class now is _finalized_ by default and doesn't perform document instantiation, just lifetime management
** xercesc::DOMDocument is instantiated inside the external function implementations and committed to the document cache for conversion to a xalan document
* added mutex with scoped lock to prevent concurrent write access to the std::unordered_map contained withing DomDocumentCache
* functionality of the _get_ member method was split into _get_ and _create_
** added typedef for std::pair specialization type "optional_item" that functions as the return value of _create_ and _get_
* "locator-&gt;getSystemId()" was leaking memory as xerces doesn't manage the lifetime of the returned heap-allocated char array
** analog to XMLCh* strings
** transformed XercesStringGuard into template class to be instantiated on either XMLCh or char
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* DomDocumentCache::item class now is _finalized_ by default and doesn't perform document instantiation, just lifetime management
** xercesc::DOMDocument is instantiated inside the external function implementations and committed to the document cache for conversion to a xalan document
* added mutex with scoped lock to prevent concurrent write access to the std::unordered_map contained withing DomDocumentCache
* functionality of the _get_ member method was split into _get_ and _create_
** added typedef for std::pair specialization type "optional_item" that functions as the return value of _create_ and _get_
* "locator-&gt;getSystemId()" was leaking memory as xerces doesn't manage the lifetime of the returned heap-allocated char array
** analog to XMLCh* strings
** transformed XercesStringGuard into template class to be instantiated on either XMLCh or char
</pre>
</div>
</content>
</entry>
<entry>
<title>Adapted read-directory tree construction to match the other functions</title>
<updated>2014-04-28T18:03:06+00:00</updated>
<author>
<name>Adrian Kummerländer</name>
</author>
<published>2014-04-28T18:03:06+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/InputXSLT/commit/?id=22cbef9c75aeb58d6c88c9b736526cb9d52a52a2'/>
<id>22cbef9c75aeb58d6c88c9b736526cb9d52a52a2</id>
<content type='text'>
* throwing std::out_of_range exception from DomDocumentCache::get instead of returning nullptr in case of a problem
* moved xalanToString method back into FilesystemContext compilation unit as is only needed there
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* throwing std::out_of_range exception from DomDocumentCache::get instead of returning nullptr in case of a problem
* moved xalanToString method back into FilesystemContext compilation unit as is only needed there
</pre>
</div>
</content>
</entry>
<entry>
<title>Moved DomDocumentCache instances back into external function class</title>
<updated>2014-04-26T13:17:07+00:00</updated>
<author>
<name>Adrian Kummerländer</name>
</author>
<published>2014-04-26T13:17:07+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/InputXSLT/commit/?id=7e7b112e6c00bcce0b339652748079cf7c9f1430'/>
<id>7e7b112e6c00bcce0b339652748079cf7c9f1430</id>
<content type='text'>
* A global DomDocumentCache instance would require key prefixing
* switched internal data structure to std::unordered_map for average constant time access
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* A global DomDocumentCache instance would require key prefixing
* switched internal data structure to std::unordered_map for average constant time access
</pre>
</div>
</content>
</entry>
<entry>
<title>Implemented global DOM document cache</title>
<updated>2014-04-26T09:21:10+00:00</updated>
<author>
<name>Adrian Kummerländer</name>
</author>
<published>2014-04-26T09:21:10+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/InputXSLT/commit/?id=0b611b7bd28851fe8096b3d2c121c68e231ada11'/>
<id>0b611b7bd28851fe8096b3d2c121c68e231ada11</id>
<content type='text'>
* the plan to return XML-nodes from each external function requires a better way to manage the lifetime of many xerces DOM document instances and their support class instances
** this is why DomDocumentCache and DomDocumentCache::item were implemented
** based on std::map so we can easily access the result of old function calls
* changed external read-directory function to return the children of the document node instead of the document node itself
** removes unnecessary cruft in function calls
** will make returning status codes alongside the function result more pleasing to the eye
* updated test transformation to reflect new features
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* the plan to return XML-nodes from each external function requires a better way to manage the lifetime of many xerces DOM document instances and their support class instances
** this is why DomDocumentCache and DomDocumentCache::item were implemented
** based on std::map so we can easily access the result of old function calls
* changed external read-directory function to return the children of the document node instead of the document node itself
** removes unnecessary cruft in function calls
** will make returning status codes alongside the function result more pleasing to the eye
* updated test transformation to reflect new features
</pre>
</div>
</content>
</entry>
</feed>
