Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages

Manual Reference Pages  -  XML::PASTOR::BUILTIN (3)

.ds Aq ’


XML::Pastor::Builtin - Module that includes definitions of all XML::Pastor W3C builtin type classes .



This module is used internally by XML::Pastor. You do not normally know much about this module to actually use XML::Pastor. It is documented here for completeness and for XML::Pastor developers. Do not count on the interface of this module. It may change in any of the subsequent releases. You have been warned.


  use XML::Pastor::Builtin;


<B>XML::Pastor::BuiltinB> is a module that includes the definitions of the classes that represent the W3C <B>builtinB> simple types. These builtin packages are either directly defined here in this module or otherwise they are used by this module so that you don’t have to use them in your program once you use this module.

Each builtin type corresponds to a package. So this module defines multiple packages at once. In each of the packages, the <B>XmlSchemaTypeB> class data accessor is set with an object of type XML::Pastor::Schema::SimpleType. This object contains the W3C facets that are used during xml validation, such as pattern, minInclusive, and so on. An internal facet called regex (not defined by W3C) is used to give the regex patterns that correspond to the <B>builtinB> types. The regex facet will be guaranteed to be a Perl regex while the pattern facet (W3C) may divert from Perl regular expressions although they seem identical to me at this time.

All <B>builtinB> classes descend from XML::Pastor::Builtin::SimpleType which itself descends from XML::Pastor::SimpleType.

There exist some ancestors for groupings of <B>builtinB> types. For example, all numeric builtin types descend directly or indirecly from XML::Pastor::Builtin::Numeric.

Such groupings are listed below:
o XML::Pastor::Builtin::List : List types such as <B>NMTOKENSB>
o XML::Pastor::Builtin::Numeric : Numeric types such as <B>integerB>
o XML::Pastor::Builtin::Scalar : All scalar and numeric types including such as <B>stringB>
o XML::Pastor::Builtin::Union : Union types


Below is an example of how the <B>doubleB> type is defined in the <B>XML::Pastor::Builtin::doubleB> package.

  package XML::Pastor::Builtin::double;
  our @ISA = qw(XML::Pastor::Builtin::Numeric);

  XML::Pastor::Builtin::double->XmlSchemaType( bless( {
                class => XML::Pastor::Builtin::double,
                contentType => simple,
                 derivedBy => restriction,
                 name => double|,
                 # Regex shamelessly copied from XML::Validator::Schema by Sam Tregar                
                 regex => qr/^[+-]?(?:(?:INF)|(?:NaN)|(?:\d+(?:\.\d+)?)(?:[eE][+-]?\d+)?)$/,
               }, XML::Pastor::Schema::SimpleType ) );


Below is a list of W3C <B>builtinB> types defined either directly in this module, or used by it (and so made available through it).
o <B>anySimpleTypeB> defined here in package XML::Pastor::Builtin::anySimpleType;
o <B>anyURIB> defined here in package XML::Pastor::Builtin::anyURI;
o <B>base64BinaryB> defined in XML::Pastor::Builtin::base64Binary
o <B>booleanB> defined in XML::Pastor::Builtin::boolean
o <B>byteB> defined here in package XML::Pastor::Builtin::byte;
o <B>dateB> defined in XML::Pastor::Builtin::date
o <B>dateTimeB> defined in XML::Pastor::Builtin::dateTime
o <B>decimalB> defined here in package XML::Pastor::Builtin::decimal;
o <B>doubleB> defined here in package XML::Pastor::Builtin::double;
o <B>durationB> defined here in package XML::Pastor::Builtin::duration;
o <B>ENTITIESB> defined here in package XML::Pastor::Builtin::ENTITIES;
o <B>ENTITYB> defined here in package XML::Pastor::Builtin::ENTITY;
o <B>floatB> defined here in package XML::Pastor::Builtin::float;
o <B>gDayB> defined here in package XML::Pastor::Builtin::gDay;
o <B>gMonthB> defined here in package XML::Pastor::Builtin::gMonth;
o <B>gMonthDayB> defined here in package XML::Pastor::Builtin::gMonthDay;
o <B>gYearB> defined here in package XML::Pastor::Builtin::gYear;
o <B>gYearMonthB> defined here in package XML::Pastor::Builtin::gYearMonth;
o <B>hexBinaryB> defined in XML::Pastor::Builtin::hexBinary
o <B>IDB> defined here in package XML::Pastor::Builtin::ID;
o <B>IDREFB> defined here in package XML::Pastor::Builtin::IDREF;
o <B>IDREFSB> defined here in package XML::Pastor::Builtin::IDREFS;
o <B>intB> defined here in package XML::Pastor::Builtin::int;
o <B>integerB> defined here in package XML::Pastor::Builtin::integer;
o <B>languageB> defined here in package XML::Pastor::Builtin::language;
o <B>longB> defined here in package XML::Pastor::Builtin::long;
o <B>NameB> defined here in package XML::Pastor::Builtin::Name;
o <B>NCNameB> defined here in package XML::Pastor::Builtin::NCName;
o <B>negativeIntegerB> defined here in package XML::Pastor::Builtin::negativeInteger;
o <B>NMTOKENB> defined here in package XML::Pastor::Builtin::NMTOKEN;
o <B>NMTOKENSB> defined here in package XML::Pastor::Builtin::NMTOKENS;
o <B>nonNegativeIntegerB> defined here in package XML::Pastor::Builtin::nonNegativeInteger;
o <B>nonPositiveIntegerB> defined here in package XML::Pastor::Builtin::nonPositiveInteger;
o <B>normalizedStringB> defined here in package XML::Pastor::Builtin::normalizedString;
o <B>NOTATIONB> defined here in package XML::Pastor::Builtin::NOTATION;
o <B>positiveIntegerB> defined here in package XML::Pastor::Builtin::positiveInteger;
o <B>QNameB> defined here in package XML::Pastor::Builtin::QName;
o <B>shortB> defined here in package XML::Pastor::Builtin::short;
o <B>stringB> defined here in package XML::Pastor::Builtin::string;
o <B>timeB> defined here in package XML::Pastor::Builtin::time;
o <B>tokenB> defined here in package XML::Pastor::Builtin::token;
o <B>unsignedByteB> defined here in package XML::Pastor::Builtin::unsignedByte;
o <B>unsignedIntB> defined here in package XML::Pastor::Builtin::unsignedInt;
o <B>unsignedLongB> defined here in package XML::Pastor::Builtin::unsignedLong;
o <B>unsignedShortB> defined here in package XML::Pastor::Builtin::unsignedShort;


There no known bugs at this time, but this doesn’t mean there are aren’t any. Note that, although some testing was done prior to releasing the module, this should still be considered alpha code. So use it at your own risk.

Note that there may be other bugs or limitations that the author is not aware of.


Ayhan Ulusoy <dev(at)ulusoy(dot)name>


  Copyright (C) 2006-2007 Ayhan Ulusoy. 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::Pastor, XML::Pastor::ComplexType, XML::Pastor::SimpleType

If you are curious about the implementation, see XML::Pastor::Schema::Parser, XML::Pastor::Schema::Model, XML::Pastor::Generator.

If you really want to dig in, see XML::Pastor::Schema::Attribute, XML::Pastor::Schema::AttributeGroup, XML::Pastor::Schema::ComplexType, XML::Pastor::Schema::Element, XML::Pastor::Schema::Group, XML::Pastor::Schema::List, XML::Pastor::Schema::SimpleType, XML::Pastor::Schema::Type, XML::Pastor::Schema::Object

Search for    or go to Top of page |  Section 3 |  Main Index

perl v5.20.3 XML::PASTOR::BUILTIN (3) 2008-08-02

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.