annotate Lib/IMPL/DOM/Schema/Node.pm @ 19:1ca530e5c9c5

DOM схема, требует переработки в части схемы для описания схем. Автоверификация не проходит
author Sergey
date Fri, 11 Sep 2009 16:30:39 +0400
parents 818c74b038ae
children 267460284fb3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
1 package IMPL::DOM::Schema::Node;
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
2 use strict;
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
3 use warnings;
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
4
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
5 use base qw(IMPL::DOM::Node);
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
6 use IMPL::Class::Property;
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
7 use IMPL::DOM::Property qw(_dom);
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
8 use IMPL::Class::Property::Direct;
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
9
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
10 BEGIN {
19
1ca530e5c9c5 DOM схема, требует переработки в части схемы для описания схем. Автоверификация не проходит
Sergey
parents: 18
diff changeset
11 public property minOccur => prop_all;
1ca530e5c9c5 DOM схема, требует переработки в части схемы для описания схем. Автоверификация не проходит
Sergey
parents: 18
diff changeset
12 public property maxOccur => prop_all;
1ca530e5c9c5 DOM схема, требует переработки в части схемы для описания схем. Автоверификация не проходит
Sergey
parents: 18
diff changeset
13 public property type => prop_all
18
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
14 }
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
15
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
16 __PACKAGE__->PassThroughArgs;
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
17
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
18 sub CTOR {
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
19 my ($this,%args) = @_;
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
20
19
1ca530e5c9c5 DOM схема, требует переработки в части схемы для описания схем. Автоверификация не проходит
Sergey
parents: 18
diff changeset
21 $this->minOccur(defined $args{minOcuur} ? $args{minOcuur} : 1);
1ca530e5c9c5 DOM схема, требует переработки в части схемы для описания схем. Автоверификация не проходит
Sergey
parents: 18
diff changeset
22 $this->maxOccur(defined $args{maxOccur} ? $args{maxOccur} : 1);
18
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
23 $this->type($args{type});
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
24 }
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
25
19
1ca530e5c9c5 DOM схема, требует переработки в части схемы для описания схем. Автоверификация не проходит
Sergey
parents: 18
diff changeset
26 sub Validate {
1ca530e5c9c5 DOM схема, требует переработки в части схемы для описания схем. Автоверификация не проходит
Sergey
parents: 18
diff changeset
27 my ($this,$node) = @_;
1ca530e5c9c5 DOM схема, требует переработки в части схемы для описания схем. Автоверификация не проходит
Sergey
parents: 18
diff changeset
28
1ca530e5c9c5 DOM схема, требует переработки в части схемы для описания схем. Автоверификация не проходит
Sergey
parents: 18
diff changeset
29 if (my $schemaType = $this->type ? $this->rootNode->resolveType($this->type) : undef ) {
1ca530e5c9c5 DOM схема, требует переработки в части схемы для описания схем. Автоверификация не проходит
Sergey
parents: 18
diff changeset
30 return $schemaType->Validate($node);
1ca530e5c9c5 DOM схема, требует переработки в части схемы для описания схем. Автоверификация не проходит
Sergey
parents: 18
diff changeset
31 }
1ca530e5c9c5 DOM схема, требует переработки в части схемы для описания схем. Автоверификация не проходит
Sergey
parents: 18
diff changeset
32 }
1ca530e5c9c5 DOM схема, требует переработки в части схемы для описания схем. Автоверификация не проходит
Sergey
parents: 18
diff changeset
33
18
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
34 1;
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
35
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
36 __END__
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
37 =pod
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
38
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
39 =head1 SYNOPSIS
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
40
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
41 package Restriction;
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
42 use base qw(IMPL::DOM::Schema::Item);
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
43
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
44 sub Validate {
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
45 my ($this,$node) = @_;
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
46 }
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
47
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
48 =head1 DESCRIPTION
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
49
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
50 .
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
51
818c74b038ae DOM Schema + tests
Sergey
parents:
diff changeset
52 =cut