=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. Per XML namespace, it will collect a list of fragments which contain definitions for the namespace, each fragment comes from a different source. These fragments are searched in reverse order when an element or type is looked up (the last definitions overrule the older definitions). =head1 METHODS =head2 Constructors $obj-EB(OPTIONS) =over 4 =back =head2 Accessors $obj-EB(SCHEMA, [SCHEMAS]) =over 4 Add L objects to the internal knowledge of this object. =back $obj-EB =over 4 Returns a list of all known schema instances. =back $obj-EB(KIND, ADDRESS|(URI,NAME)) =over 4 Lookup the definition for the specified KIND of definition: the name of a global element, global attribute, attributeGroup or model group. The ADDRESS is constructed as C< {uri}name > or as seperate URI and NAME. =back $obj-EB(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-EB(TYPE|(URI,NAME)) =over 4 Lookup the substitutionGroup alternatives for a specific element, which is an TYPE (element full name) of form C< {uri}name > or as seperate URI and NAME. Returned is a list of node info objects (HASHes) =back $obj-EB =over 4 Returns the list of name-space URIs defined. =back $obj-EB(URI) =over 4 Returns a list of L objects which have the URI as target namespace. =back $obj-EB([FILEHANDLE], OPTIONS) =over 4 Show all definitions from all namespaces, for debugging purposes, by default the selected. Additional OPTIONS are passed to L. Option --Default namespace . namespace => URI|ARRAY-of-URI =over 4 Show only information about the indicate namespaces. =back example: my $nss = $schema->namespaces; $nss->printIndex(\*MYFILE); $nss->printIndex(namespace => "my namespace"); # types defined in the wsdl schema use XML::Compile::SOAP::Util qw/WSDL11/; $nss->printIndex(\*STDERR, namespace => WSDL11); =back $obj-EB(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.94, built on August 26, 2008. Website: F All modules in this suite: L, L, L, L, L, L, L. Please post questions or ideas to the mailinglist at F For life contact with other developers, visit the C<#xml-compile> channel on C. =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