view Lib/IMPL/DOM/Schema/Item.pm @ 15:16795016e70b

Dom schema in progress
author Sergey
date Mon, 07 Sep 2009 17:30:55 +0400
parents 94d47b388442
children
line wrap: on
line source

package IMPL::DOM::Schema::Item;
use strict;
use warnings;

use base qw(IMPL::DOM::Node);
use IMPL::Class::Property;
use IMPL::DOM::Property qw(_dom);
use IMPL::Class::Property::Direct;

BEGIN {
    public _dom property minOccur => prop_all;
    public _dom property maxOccur => prop_all;
    public _direct property Schema => prop_get;
}

__PACKAGE__->PassThroughArgs;

sub CTOR {
    my ($this,%args) = @_;
    
    $this->minOccur($args{minOcuur});
    $this->maxOccur($args{maxOccur});
    $this->{$Schema} = $args{Schema} or die new IMPL::InvalidArgumentException("A schema should be specified");
}

1;

__END__
=pod

=head1 SYNOPSIS

package Restriction;
use base qw(IMPL::DOM::Schema::Item);

sub Validate {
    my ($this,$node) = @_;
}

=head1 DESCRIPTION

Базовый класс для элементов схемы. Содержит в себе базовые методы 

=cut