annotate Lib/IMPL/DOM/Schema/InflateFactory.pm @ 104:196bf443b5e1

DOM::Schema RC0 inflators support, validation and some other things, Minor and major fixes almost for everything. A 'Source' property of the ValidationErrors generated from a NodeSet or a NodeList is subject to change in the future.
author wizard
date Tue, 11 May 2010 02:42:59 +0400
parents
children d1676be8afcc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
104
196bf443b5e1 DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
diff changeset
1 package IMPL::DOM::Schema::InflateFactory;
196bf443b5e1 DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
diff changeset
2 use strict;
196bf443b5e1 DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
diff changeset
3
196bf443b5e1 DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
diff changeset
4 require IMPL::Exception;
196bf443b5e1 DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
diff changeset
5 require IMPL::Object::Factory;
196bf443b5e1 DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
diff changeset
6
196bf443b5e1 DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
diff changeset
7 sub new {
196bf443b5e1 DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
diff changeset
8 my ($self,$value) = @_;
196bf443b5e1 DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
diff changeset
9
196bf443b5e1 DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
diff changeset
10 if ($value =~ /^(\w+(?:::\w+)*)(?:\.(\w+))?$/) {
196bf443b5e1 DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
diff changeset
11 return IMPL::Object::Factory->new($1,undef,$2);
196bf443b5e1 DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
diff changeset
12 } else {
196bf443b5e1 DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
diff changeset
13 die new IMPL::InvalidArgumentException("Expected value in the format PACKAGE::NAME.method_name",$value);
196bf443b5e1 DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
diff changeset
14 }
196bf443b5e1 DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
diff changeset
15 }
196bf443b5e1 DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
diff changeset
16
196bf443b5e1 DOM::Schema RC0 inflators support, validation and some other things,
wizard
parents:
diff changeset
17 1;