Modules Index

XML Schema Home

# XML::Schema::Facet::Builtin

The XML::Schema::Facet::Builtin module defines facets which are built in to XML Schema.

## Table of Contents

Synopsis |  |  |
Facet Modules |  |  |

## Synopsis

    use XML::Schema::Facet::Builtin;

    my $facet = XML::Schema::Facet::length->new(value => 22);

## Facet Modules

The XML::Schema::Facet::Builtin module defines the following facets:

- XML::Schema::Facet::Fixable
  Adds the optional '`fixed` ' attribute to facets derived from it and the `fixed()` method to return a flag indicating if the object is fixed (e.g. immutable).
- XML::Schema::Facet::length
  This facet uses `value` to specify a particular length of a list (in elements) or string (in characters).
- XML::Schema::Facet::minLength
  This facet uses `value` to specify the minimum length of a list (in elements) or string (in characters).
- XML::Schema::Facet::maxLength
  This facet uses `value` to specify the maximum length of a list (in elements) or string (in characters).
- XML::Schema::Facet::pattern
  This facet uses `value` to specify a regular expression which a string should match.
- XML::Schema::Facet::enumeration
  This facet uses `value` to specify a reference to list of permitted values.
- XML::Schema::Facet::whitespace
  This facet uses `value` to specify if and what whitespace should be performed on the string. A value of 'preserve' leaves all whitespace intact. A value of 'replace' replaces newlines, carriage returns and tabs with spaces. A value of 'collapse' additionally collapses sequences of multiple whitespace into a single space and strips any leading or trailing whitespace.
- XML::Schema::Facet::maxInclusive
  This facet uses `value` to constrain a numerical value to an inclusive upper bound.
- XML::Schema::Facet::maxExclusive
  This facet uses `value` to constrain a numerical value to an exclusive upper bound.
- XML::Schema::Facet::minInclusive
  This facet uses `value` to constrain a numerical value to an inclusive lower bound.
- XML::Schema::Facet::minExclusive
  This facet uses `value` to constrain a numerical value to an exclusive lower bound.
- XML::Schema::Facet::precision
  This facet uses `value` to constrain the precision of a floating point number to a particular limit.
- XML::Schema::Facet::scale
  This facet uses `value` to constrain the scale of a floating point number to a particular limit.
- XML::Schema::Facet::encoding
  This facet uses `value` to specify a particular encoding for binary data, one of the values '`hex` ' or '`base64` '. limit.
- XML::Schema::Facet::duration
  This facet uses `value` to specify a particular fixed time duration.
- XML::Schema::Facet::period
  This facet uses `value` to specify a particular fixed time period.

Perl XML::Schema Documentation