Mercurial > pub > Impl
diff Lib/IMPL/DOM/Transform/QueryToDOM.pm @ 250:129e48bb5afb
DOM refactoring
ObjectToDOM methods are virtual
QueryToDOM uses inflators
Fixed transform for the complex values in the ObjectToDOM
QueryToDOM doesn't allow to use complex values (HASHes) as values for nodes (overpost problem)
author | sergey |
---|---|
date | Wed, 07 Nov 2012 04:17:53 +0400 |
parents | a02b110da931 |
children | c9c2ec29793f |
line wrap: on
line diff
--- a/Lib/IMPL/DOM/Transform/QueryToDOM.pm Tue Nov 06 20:00:57 2012 +0400 +++ b/Lib/IMPL/DOM/Transform/QueryToDOM.pm Wed Nov 07 04:17:53 2012 +0400 @@ -21,6 +21,22 @@ $this->prefix(''); } +# inflate simple properties +sub TransformPlain { + my ($this,$data) = @_; + + $this->currentNode->nodeProperty( rawValue => $data ); + $this->currentNode->nodeValue( $this->inflateNodeValue($data) ); + return $this->currentNode; +} + +# do not store complex data as node values +sub StoreObject { + my ($this,$node,$data) = @_; + + return $node; +} + sub TransformCGI { my ($this,$query) = @_;