NAME

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

INHERITANCE

SYNOPSIS

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

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).

METHODS

Constructors

$obj->new(OPTIONS)

Accessors

$obj->add(SCHEMA, [SCHEMAS])

$obj->allSchemas

    Returns a list of all known schema instances.

$obj->find(KIND, ADDRESS|(URI,NAME))

    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 {uri}name or as seperate URI and NAME.

$obj->findID(ADDRESS|(URI,ID))

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

$obj->findSgMembers(ADDRESS|(URI,NAME))

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

$obj->list

    Returns the list of name-space URIs defined.

$obj->namespace(URI)

$obj->printIndex([FILEHANDLE], OPTIONS)

    Show all definitions from all namespaces, for debugging purposes, by default the selected. Additional OPTIONS are passed to XML::Compile::Schema::Instance::printIndex().

    Option   --Default
    namespace  <ALL>

    . namespace => URI|ARRAY-of-URI

      Show only information about the indicate namespaces.

    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);

$obj->schemas(URI)

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

SEE ALSO

This module is part of XML-Compile distribution version 0.84, built on June 06, 2008. Website: http://perl.overmeer.net/xml-compile/

All modules in this suite: "XML::Compile", "XML::Compile::SOAP", "XML::Compile::SOAP::Daemon", "XML::Compile::Tester", "XML::Compile::Cache", "XML::Compile::Dumper".

Please post questions or ideas to http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile For life contact with other developers, visit the #xml-compile channel on irc.perl.org.

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 http://www.perl.com/perl/misc/Artistic.html

1 POD Error

The following errors were encountered while parsing the POD:

Around line 150:

alternative text 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile' contains non-escaped | or /