Mercurial > pub > Impl
comparison Lib/IMPL/DOM/Schema.pm @ 100:df6b4f054957
Schema in progress
Added simple mailer
author | wizard |
---|---|
date | Thu, 06 May 2010 00:54:17 +0400 |
parents | 00d88c5e8203 |
children | d8dc6cad3f55 |
comparison
equal
deleted
inserted
replaced
99:6dd659f6f66c | 100:df6b4f054957 |
---|---|
32 } | 32 } |
33 | 33 |
34 sub Create { | 34 sub Create { |
35 my ($this,$nodeName,$class,$refArgs) = @_; | 35 my ($this,$nodeName,$class,$refArgs) = @_; |
36 | 36 |
37 die new IMPL::Exception('Invalid node class') unless $class->isa('IMPL::DOM::Schema::Node'); | 37 die new IMPL::Exception('Invalid node class') unless $class->isa('IMPL::DOM::Node'); |
38 | 38 |
39 goto &SUPER::Create; | 39 goto &SUPER::Create; |
40 } | 40 } |
41 | 41 |
42 sub Process { | 42 sub Process { |
136 new IMPL::DOM::Schema::Property(name => 'name') | 136 new IMPL::DOM::Schema::Property(name => 'name') |
137 ), | 137 ), |
138 IMPL::DOM::Schema::ComplexType->new(type => 'Validator', nativeType => 'IMPL::DOM::Schema::Validator')->appendRange( | 138 IMPL::DOM::Schema::ComplexType->new(type => 'Validator', nativeType => 'IMPL::DOM::Schema::Validator')->appendRange( |
139 IMPL::DOM::Schema::NodeList->new()->appendRange( | 139 IMPL::DOM::Schema::NodeList->new()->appendRange( |
140 IMPL::DOM::Schema::AnyNode->new(maxOccur => 'unbounded', minOccur => 0) | 140 IMPL::DOM::Schema::AnyNode->new(maxOccur => 'unbounded', minOccur => 0) |
141 ), | 141 ) |
142 new IMPL::DOM::Schema::Property(name => 'name') | |
143 ) | 142 ) |
144 ); | 143 ); |
145 | 144 |
146 $schema->Process; | 145 $schema->Process; |
147 | 146 |
179 | 178 |
180 =back | 179 =back |
181 | 180 |
182 =head1 META SCHEMA | 181 =head1 META SCHEMA |
183 | 182 |
184 Схема для описания схемы, эта схема используется для постороения других схем | 183 Схема для описания схемы, эта схема используется для постороения других схем, выглядит приблизительно так |
185 | 184 |
186 =begin code xml | 185 =begin code xml |
187 | 186 |
188 <schema> | 187 <schema> |
189 <ComplexNode name="schema"> | 188 <ComplexNode name="schema"> |