| XML-Schema documentation | view source | Contained in the XML-Schema distribution. |
XML::Schema::Type::Simple - base class for simple XML Schema datatypes
package XML::Schema::Type::whatever;
use base qw( XML::Schema::Type::Simple );
use vars qw( @FACETS );
@FACETS = (
minLength => 10,
maxLength => 30,
otherFacet => {
value => $n,
fixed => 1,
annotation => "a comment",
},
);
package main;
my $type = XML::Schema::Type::whatever->new()
|| die XML::Schema::Type::whatever->error();
my $item = $type->instance('some instance value')
|| die $type->error();
# NOTE: some issues still to resolve on the precise
# nature and structure of instances (currently hash ref).
print $item->{ value };
The XML::Schema::Type::Simple module is a base class for objects that represent XML Schema simple types.
my $pkg = 'XML::Schema::Type::string';
my $obj1 = $pkg->new();
my $class = $pkg->class();
my $obj2 = $class->new();
Andy Wardley <abw@kfs.org>
This is version $Revision: 1.2 $ of the XML::Schema::Type::Simple, 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.
| XML-Schema documentation | view source | Contained in the XML-Schema distribution. |