comparison Lib/IMPL/DOM/Navigator/Builder.pm @ 368:010ceafd0c5a

form metadata + tests
author cin
date Wed, 04 Dec 2013 17:31:53 +0400
parents 4ddb27ff4a0b
children 4edd36025051
comparison
equal deleted inserted replaced
367:608e74bc309f 368:010ceafd0c5a
44 $props{schema} = $schemaNode; 44 $props{schema} = $schemaNode;
45 $props{schemaSource} = $schemaSource; 45 $props{schemaSource} = $schemaSource;
46 46
47 my $node; 47 my $node;
48 if (! $this->{$Document}) { 48 if (! $this->{$Document}) {
49 # keep reference to the schema document
50 $props{schemaDocument} = $this->{$_schemaNavi}->schema;
49 $node = $this->{$Document} = $this->{$_docClass}->new(nodeName => $nodeName,%props); 51 $node = $this->{$Document} = $this->{$_docClass}->new(nodeName => $nodeName,%props);
50 $this->_initNavigator($node); 52 $this->_initNavigator($node);
51 } else { 53 } else {
52 die new IMPL::InvalidOperationException('Can\'t create a second top level element') unless $this->Current; 54 die new IMPL::InvalidOperationException('Can\'t create a second top level element') unless $this->Current;
53 $node = $this->{$Document}->Create($nodeName,$class,\%props); 55 $node = $this->{$Document}->Create($nodeName,$class,\%props);