Modules Index

XML Schema Home

# XML::Schema::Type

This module implements a base class for XML Schema datatypes.

## Table of Contents

Synopsis |  |  |
Description |  |  |
Methods | : | base(), name(), namespace() |

## Synopsis

    package XML::Schema::Type::MyType;
    use base qw( XML::Schema::Type );

    package main;
    my $type = XML::Schema::Type::MyType->new(
        name      => 'MyTypeName',
        namespace => 'http://my.namespace.com/xyz',
    );

    print $type->name(), ", ", $type->namespace(), "\n";

## Description

The XML::Schema::Type module is a base class for objects that represent XML Schema types. The module also loads the XML::Schema::Type::Simple and XML::Schema::Type::Complex modules (which may go on to load further modules of their own). Thus, it should usually be sufficient to `use XML::Schema::Type;` and expect all relevant datatype related modules to be loaded.

## Methods

- base()
  Returns the value for the internal `base` item which may be set as a configuration parameter passed to the `new()` constructor method to represent a base class type.

- name()
  Returns the name of the type.

- namespace()
  Returns the XML namespace of the type.

Perl XML::Schema Documentation