Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages

Manual Reference Pages  -  XML::COMPILE::SCHEMA::NAMESPACES (3)

.ds Aq ’


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



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


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





$obj-><B>addB>( $schema, [$schemas] ) Add XML::Compile::Schema::Instance objects to the internal knowledge of this object.
$obj-><B>allSchemasB>() Returns a list of all known schema instances.
$obj-><B>doesExtendB>($exttype, $basetype) Returns true when $exttype extends $basetype.
$obj-><B>findB>($kind, $address|<$uri,$name>, %options) 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 separate $uri and $name.

 -Option      --Default
  include_used  <true>

include_used => BOOLEAN
$obj-><B>findIDB>( $address|<$uri,$id> ) Lookup the definition for the specified id, which is constructed as uri#id or as separate $uri and $id.
$obj-><B>findSgMembersB>($class, $type) Lookup the substitutionGroup alternatives for a specific element, which is an $type (element full name) of form {uri}name or as separate URI and NAME. Returned is an ARRAY of HASHes, each describing one type (as returned by find())
$obj-><B>findTypeExtensionsB>($type) This method can be quite expensive, with large and nested schemas.
$obj-><B>importIndexB>(%options) [1.41] Returns a HASH with namespaces which are declared in all currently known schema’s, pointing to ARRAYs of the locations where the import should come from.

In reality, the locations mentioned are often wrong. But when you think you want to load all schema’s dynamically at start-up (no, you do not want it but it is a SOAP paradigma) then you get that info easily with this method.

$obj-><B>listB>() Returns the list of name-space URIs defined.
$obj-><B>namespaceB>($uri) Returns a list of XML::Compile::Schema::Instance objects which have the $uri as target namespace.
$obj-><B>printIndexB>( [$fh], %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
  include_used  <true>
  namespace     <ALL>

include_used => BOOLEAN Show also the index from all the schema objects which are defined to be usable as well; which were included via use().
namespace => URI|ARRAY-of-URI Show only information about the indicate namespaces.


 my $nss = $schema->namespaces;
 $nss->printIndex(namespace => "my namespace");

 # types defined in the wsdl schema
 use XML::Compile::SOAP::Util qw/WSDL11/;
 $nss->printIndex(\*STDERR, namespace => WSDL11);

$obj-><B>schemasB>($uri) We need the name-space; when it is lacking then import must help, but that must be called explicitly.
$obj-><B>useB>($object) Use any other XML::Compile::Schema extension as fallback, if the find() does not succeed for the current object. Searches for definitions do not recurse into the used object.

Returns the list of all used OBJECTS. This method implements XML::Compile::Schema::useSchema().


This module is part of XML-Compile distribution version 1.52, built on January 15, 2016. Website:

Other distributions in this suite: XML::Compile, XML::Compile::SOAP, XML::Compile::WSDL11, XML::Compile::SOAP12, XML::Compile::SOAP::Daemon, XML::Compile::SOAP::WSA, XML::Compile::C14N, XML::Compile::WSS, XML::Compile::WSS::Signature, XML::Compile::Tester, XML::Compile::Cache, XML::Compile::Dumper, XML::Compile::RPC, XML::Rewrite and XML::LibXML::Simple.

Please post questions or ideas to the mailinglist at . For live contact with other developers, visit the #xml-compile channel on


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

Search for    or go to Top of page |  Section 3 |  Main Index

perl v5.20.3 XML::COMPILE::SCHEMA::NAMESPACES (3) 2016-01-15

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.