XML::Schema::Type::Union - union type for XML Schema datatypes
# declare some simple types my $int = XML::Schema::Type::int->new(); my $time = XML::Schema::Type::time->new(); my $float = XML::Schema::Type::float->new(); # declare a union my $union = XML::Schema::Type::Union->new( memberTypes => [ $int, $time, $float ], ); # instantiate a validated member of the union my $i = $union->instance('14'); # ok - int my $t = $union->instance('11:23:36'); # ok - time my $f = $union->instance('1.23'); # ok - float
This module implements the XML Schema union type.
Andy Wardley <abw@kfs.org>
This is version $Revision: 1.1.1.1 $ of the XML::Schema::Type::Union, distributed with version 0.1 of the XML::Schema module set.
Copyright (C) 2001 Canon Research Centre Europe Ltd. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See also XML::Schema and XML::Schema::Type::Simple.
To install XML::Schema, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XML::Schema
CPAN shell
perl -MCPAN -e shell install XML::Schema
For more information on module installation, please visit the detailed CPAN module installation guide.