1Schema::SimpleType(3) User Contributed Perl DocumentationSchema::SimpleType(3)
2
3
4
5 NAME
6 XML::Validator::Schema::SimpleType
7
9 XML Schema simple type system. This module provides objects and class
10 methods to support simple types. For complex types see the ModelNode
11 class.
12
14 # create a new anonymous type based on an existing type
15 my $type = $string->derive();
16
17 # create a new named type based on an existing type
18 my $type = $string->derive(name => 'myString');
19
20 # add a restriction
21 $type->restrict(enumeration => "10");
22
23 # check a value against a type
24 ($ok, $msg) = $type->check($value);
25
27 Hey! The above document had some coding errors, which are explained
28 below:
29
30 Around line 6:
31 '=item' outside of any '=over'
32
33 Around line 10:
34 You forgot a '=back' before '=head1'
35
36
37
38perl v5.34.0 2022-01-21 Schema::SimpleType(3)