=head1 NAME

XML::Compile::Schema::NameSpaces - Connect name-spaces from schemas

=head1 INHERITANCE

=head1 SYNOPSIS

 # Used internally by XML::Compile::Schema
 my $nss = XML::Compile::Schema::NameSpaces->new;
 $nss->add($schema);

=head1 DESCRIPTION

This module keeps overview on a set of namespaces, collected from
various schema files.

=head1 METHODS

=head2 Constructors

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

=over 4

=back

=head2 Accessors

$obj-E<gt>B<add>(SCHEMA)

=over 4

Adds the L<XML::Compile::Schema::Instance|XML::Compile::Schema::Instance> object to the internal
knowledge of this object.

=back

$obj-E<gt>B<allSchemas>

=over 4

Returns a list of all known schema instances.

=back

$obj-E<gt>B<find>(KIND, ADDRESS|(URI,NAME))

=over 4

Lookup the definition for the specified KIND of definition: the name
of a gloabl element, gloabl attribute, attributeGroup or model group.
The ADDRESS is constructed as C< {uri}name > or as seperate URI and NAME.

=back

$obj-E<gt>B<findID>(ADDRESS|(URI,ID))

=over 4

Lookup the definition for the specified id, which is constructed as
C< uri#id > or as seperate URI and ID.

=back

$obj-E<gt>B<findSgMembers>(ADDRESS|(URI,NAME))

=over 4

Lookup the substitutionGroup alternatives for a specific element,
which is an ADDRESS of form C< {uri}name > or as seperate URI and NAME.
Returned is a list of parse nodes (HASHes)

=back

$obj-E<gt>B<list>

=over 4

Returns the list of name-space names defined until now.

=back

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

=over 4

Returns a list of L<XML::Compile::Schema::Instance|XML::Compile::Schema::Instance> objects which have
the URI as target namespace.

=back

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

=over 4

We need the name-space; when it is lacking then import must help, but that
must be called explictly.

=back

=head1 SEE ALSO

This module is part of XML-Compile distribution version 0.66,
built on January 31, 2008. Website: F<http://perl.overmeer.net/xml-compile/>

=head1 LICENSE

Copyrights 2006-2008 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>

