Mercurial > pub > Impl
annotate Lib/IMPL/DOM/Navigator/Builder.pm @ 32:56cef8e3cda6
+1
author | Sergey |
---|---|
date | Mon, 09 Nov 2009 01:39:31 +0300 |
parents | 7f00786f8210 |
children | a8086f85a571 |
rev | line source |
---|---|
11 | 1 package IMPL::DOM::Navigator::Builder; |
2 use strict; | |
3 use warnings; | |
4 | |
5 use base qw(IMPL::DOM::Navigator); | |
6 use IMPL::Class::Property; | |
7 use IMPL::Class::Property::Direct; | |
24 | 8 require IMPL::DOM::Navigator::SchemaNavigator; |
11 | 9 |
10 BEGIN { | |
24 | 11 protected _direct property _schemaNavi => prop_all; |
11 | 12 public _direct property Document => prop_get | owner_set; |
13 } | |
14 | |
15 | 15 our %CTOR = ( |
16 'IMPL::DOM::Navigator' => sub { $_[0] } # IMPL::DOM::Navigator($domDocument) | |
17 ); | |
11 | 18 |
19 sub CTOR { | |
20 my ($this,$domDocument,$schema) = @_; | |
21 | |
22 $this->{$Document} = $domDocument; | |
24 | 23 $this->{$_schemaNavi} = $schema; |
11 | 24 } |
25 | |
26 sub NavigateCreate { | |
27 my ($this,$nodeName,%props) = @_; | |
28 | |
24 | 29 |
11 | 30 } |
31 | |
15 | 32 sub Back { |
33 my ($this) = @_; | |
34 | |
35 } | |
36 | |
11 | 37 1; |
15 | 38 |
39 __END__ | |
40 =pod | |
41 | |
42 =head1 SYNOPSIS | |
43 | |
44 my $builder = new IMPL::DOM::Navigator::Builder(new MyApp::Document,$schema); | |
45 my $reader = new IMPL::DOM::XMLReader(Navigator => $builder); | |
46 | |
47 $reader->ParseFile("document.xml"); | |
48 | |
49 my @errors = $schema->Validate($builder->Document); | |
50 | |
51 =head1 DESCRIPTION | |
52 | |
53 DOM . | |
54 C<IMPL::DOM::XMLReader>. | |
55 | |
56 =head1 METHODS | |
57 | |
58 =over | |
59 | |
60 =item C<CTOR($domDocument,$schema)> | |
61 | |
62 , ( ) | |
63 . | |
64 | |
65 =item C<< $obj->NavigateCreate($nodeName) >> | |
66 | |
67 . | |
68 , . | |
69 | |
70 , | |
71 , | |
72 | |
73 =over | |
74 | |
75 =item C<type> , | |
76 | |
77 =item C<type> , , | |
78 . | |
79 | |
80 =item | |
81 | |
82 =back | |
83 | |
16
75d55f4ee263
Окончательная концепция описания схем и построения DOM документов
Sergey
parents:
15
diff
changeset
|
84 C<nodeName>. |
15 | 85 |
86 .. C<< <ComplexNode nodeName="Box" type="Container"> >> | |
87 C<< Container->new(nodeName => 'Box') >>. | |
88 | |
89 =back | |
90 | |
91 =cut |