=head1 NAME
XML::Compile::Schema::Instance - Represents one schema
=head1 INHERITANCE
=head1 SYNOPSIS
my
$schema
= XML::Compile::Schema::Instance->new(
$xml
);
=head1 DESCRIPTION
This module collect information from one schema, and helps to
process it.
=head1 METHODS
=head2 Constructors
$obj
-E<gt>B<new>(TOP, OPTIONS)
=over 4
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
=over 4
When the source is some file, this is its name.
=back
.
source
=> STRING
=over 4
An indication where this information came from.
=back
=back
=head2 Accessors
$obj
-E<gt>B<attributeGroups>
=over 4
Returns a list of all
defined
attribute groups.
=back
$obj
-E<gt>B<attributes>
=over 4
Returns a lost of all globally
defined
attribute names.
=back
$obj
-E<gt>B<complexTypes>
=over 4
Returns a list
with
all complexType names.
=back
$obj
-E<gt>B<element>(URI)
=over 4
Returns one global element definition.
=back
$obj
-E<gt>B<elements>
=over 4
Returns a list of all globally
defined
element names.
=back
$obj
-E<gt>B<filename>
=over 4
=back
$obj
-E<gt>B<groups>
=over 4
Returns a list of all
defined
model groups.
=back
$obj
-E<gt>B<id>(STRING)
=over 4
Returns one global element, selected by ID.
=back
$obj
-E<gt>B<ids>
=over 4
Returns a list of all found ids.
=back
$obj
-E<gt>B<schemaInstance>
=over 4
=back
$obj
-E<gt>B<schemaNamespace>
=over 4
=back
$obj
-E<gt>B<simpleTypes>
=over 4
Returns a list
with
all simpleType names.
=back
$obj
-E<gt>B<source>
=over 4
=back
$obj
-E<gt>B<substitutionGroupMembers>(ELEMENT)
=over 4
The expanded ELEMENT name is used to collect a set of alternatives which
are in this substitutionGroup (super-class like alternatives).
=back
$obj
-E<gt>B<substitutionGroups>
=over 4
Returns a list of all named substitutionGroups.
=back
$obj
-E<gt>B<targetNamespace>
=over 4
=back
$obj
-E<gt>B<type>(URI)
=over 4
Returns the type definition
with
the specified name.
=back
$obj
-E<gt>B<types>
=over 4
Returns a list of all simpleTypes and complexTypes
=back
=head2 Index
$obj
-E<gt>B<find>(KIND, LOCALNAME)
=over 4
Returns the definition
for
the object of KIND,
with
LOCALNAME.
example: of find
my
$attr
=
$instance
->find(
attribute
=>
'myns#my_global_attr'
);
=back
$obj
-E<gt>B<importLocations>(NAMESPACE)
=over 4
Returns a list of all schemaLocations specified
with
the
import
NAMESPACE
(one of the
values
returned by L<imports()|XML::Compile::Schema::Instance/
"Index"
>).
=back
$obj
-E<gt>B<imports>
=over 4
Returns a list
with
all namespaces which need to be imported.
=back
$obj
-E<gt>B<includeLocations>
=over 4
Returns a list of all schemaLocations which where specified
with
include
statements.
=back
$obj
-E<gt>B<printIndex>([FILEHANDLE], OPTIONS)
=over 4
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
=over 4
Which KIND of definitions would you like to see. Pick from
C<element>, C<attribute>, C<simpleType>, C<complexType>, C<attributeGroup>,
and C<group>.
=back
.
list_abstract
=> BOOLEAN
=over 4
Show abstract elements, or skip them (because they cannot be instantiated
anyway).
=back
=back
=head1 SEE ALSO
This module is part of XML-Compile distribution version 0.86,
All modules in this suite:
L<XML::Compile>,
L<XML::Compile::SOAP>,
L<XML::Compile::SOAP::Daemon>,
L<XML::Compile::Tester>,
L<XML::Compile::Cache>,
L<XML::Compile::Dumper>.
Please post questions or ideas to the mailinglist at
For life contact
with
other developers, visit the C<
on C<irc.perl.org>.
=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.