=head1 NAME

XML::Compile::Schema::Instance - Represents one schema

=head1 INHERITANCE

=head1 SYNOPSIS

 # Used internally by XML::Compile::Schema
 my $schema = XML::Compile::Schema::Instance->new($xml);

=head1 DESCRIPTION

This module collect information from one schema, and helps to
process it.

=head1 METHODS

=head2 Constructors

$obj-E<gt>B<new>(TOP, OPTIONS)

=over 4

Get's the top of an XML::LibXML tree, which must be a schema element.
The tree is parsed: the information collected.

=back

=head2 Accessors

$obj-E<gt>B<attributeGroups>

=over 4

Returns a list of all defined attribute groups.

=back

$obj-E<gt>B<attributes>

=over 4

Returns a lost of all globally defined attribute names.

=back

$obj-E<gt>B<complexTypes>

=over 4

Returns a list with all complexType names.

=back

$obj-E<gt>B<element>(URI)

=over 4

Returns one global element definition.

=back

$obj-E<gt>B<elements>

=over 4

Returns a list of all globally defined element names.

=back

$obj-E<gt>B<groups>

=over 4

Returns a list of all defined model groups.

=back

$obj-E<gt>B<ids>

=over 4

Returns a list of all found ids.

=back

$obj-E<gt>B<schemaInstance>

=over 4

=back

$obj-E<gt>B<schemaNamespace>

=over 4

=back

$obj-E<gt>B<simpleTypes>

=over 4

Returns a list with all simpleType names.

=back

$obj-E<gt>B<substitutionGroupMembers>(ELEMENT)

=over 4

The expanded ELEMENT name is used to collect a set of alternatives which
are in this substitutionGroup (super-class like alternatives). 

=back

$obj-E<gt>B<substitutionGroups>

=over 4

Returns a list of all named substitutionGroups.

=back

$obj-E<gt>B<targetNamespace>

=over 4

=back

$obj-E<gt>B<type>(URI)

=over 4

Returns the type definition with the specified name.

=back

$obj-E<gt>B<types>

=over 4

Returns a list of all simpleTypes and complexTypes

=back

=head2 Index

$obj-E<gt>B<find>(KIND, LOCALNAME)

=over 4

Returns the definition for the object of KIND, with LOCALNAME.

example: of find

 my $attr = $instance->find(attribute => 'myns#my_global_attr');

=back

$obj-E<gt>B<printIndex>([FILEHANDLE])

=over 4

Prints an overview over the defined objects within this schema to the
selected FILEHANDLE.

=back

=head1 SEE ALSO

This module is part of XML-Compile distribution version 0.56,
built on October 18, 2007. Website: F<http://perl.overmeer.net/xml-compile/>

=head1 LICENSE

Copyrights 2006-2007 by Mark Overmeer. For other contributors see ChangeLog.

This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
See F<http://www.perl.com/perl/misc/Artistic.html>

