annotate lib/IMPL/DOM/Schema/AnyNode.pm @ 417:3ed0c58e9da3 ref20150831

working on di container, tests
author cin
date Mon, 02 Nov 2015 01:56:53 +0300
parents c6e90e02dd17
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
407
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
1 package IMPL::DOM::Schema::AnyNode;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
2 use strict;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
3 use warnings;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
4
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
5 use IMPL::declare {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
6 base => [
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
7 'IMPL::DOM::Schema::Node' => sub {
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
8 my %args = @_;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
9 $args{nodeName} ||= 'AnyNode';
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
10 $args{name} = '::any';
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
11
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
12 %args;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
13 }
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
14 ]
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
15 };
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
16
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
17 1;
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
18
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
19 __END__
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
20
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
21 =pod
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
22
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
23 =head1 DESCRIPTION
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
24
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
25 Узел с произвольным именем, для этого узла предусмотрена специальная проверка
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
26 в контейнерах.
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
27
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
28 В контейнерах типа C<IMPL::DOM::Schema::NodeSet> этот узел можно использовать только один раз
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
29 причем его использование исключает использование узла C<IMPL::DOM::Schema::SwitchNode>.
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
30
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
31 В контейнерах типа С<IMPL::DOM::Schema::NodeList> данный узел может применяться несколько раз
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
32 для решения таких задач как последовательности разноименных узлов с одним типом.
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
33
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
34 <NodeList>
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
35 <SimpleNode name="firstName"/>
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
36 <SimpleNode name="age"/>
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
37 <AnyNode type="Notes" minOccur="0" maxOccur="unbounded"/>
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
38 <Node name="primaryAddress" type="Address"/>
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
39 <AnyNode/>
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
40 </NodeList>
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
41
c6e90e02dd17 renamed Lib->lib
cin
parents:
diff changeset
42 =cut