NAME

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

INHERITANCE

SYNOPSIS

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

DESCRIPTION

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

METHODS

Constructors

$obj->new(TOP, OPTIONS)

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

    Option  --Default
    filename  undef
    source    undef

    . filename => FILENAME

      When the source is some file, this is its name.

    . source => STRING

      An indication where this information came from.

Accessors

$obj->attributeGroups

    Returns a list of all defined attribute groups.

$obj->attributes

    Returns a lost of all globally defined attribute names.

$obj->complexTypes

    Returns a list with all complexType names.

$obj->element(URI)

    Returns one global element definition.

$obj->elements

    Returns a list of all globally defined element names.

$obj->filename

$obj->groups

    Returns a list of all defined model groups.

$obj->id(STRING)

    Returns one global element, selected by ID.

$obj->ids

    Returns a list of all found ids.

$obj->mergeSubstGroupsInto(HASH)

$obj->schemaInstance

$obj->schemaNamespace

$obj->simpleTypes

    Returns a list with all simpleType names.

$obj->source

$obj->substitutionGroupMembers(ELEMENT)

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

$obj->substitutionGroups

    Returns a list of all named substitutionGroups.

$obj->targetNamespace

$obj->type(URI)

    Returns the type definition with the specified name.

$obj->types

    Returns a list of all simpleTypes and complexTypes

Index

$obj->find(KIND, LOCALNAME)

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

    example: of find

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

$obj->importLocations(NAMESPACE)

    Returns a list of all schemaLocations specified with the import NAMESPACE (one of the values returned by imports()).

$obj->imports

    Returns a list with all namespaces which need to be imported.

$obj->includeLocations

    Returns a list of all schemaLocations which where specified with include statements.

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

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

    Option       --Default
    kinds          <all>
    list_abstract  <true>

    . kinds => KIND|ARRAY-of-KIND

      Which KIND of definitions would you like to see. Pick from element, attribute, simpleType, complexType, attributeGroup, and group.

    . list_abstract => BOOLEAN

      Show abstract elements, or skip them (because they cannot be instantiated anyway).

SEE ALSO

This module is part of XML-Compile distribution version 0.93, built on August 11, 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::Rewrite, XML::Compile::Dumper.

Please post questions or ideas to the mailinglist at 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