.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "XML::Compile::Schema::Instance 3pm" .TH XML::Compile::Schema::Instance 3pm "2022-11-27" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" XML::Compile::Schema::Instance \- Represents one schema .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& # Used internally by XML::Compile::Schema \& my $schema = XML::Compile::Schema::Instance\->new($xml); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module collect information from one schema, and helps to process it. .SH "METHODS" .IX Header "METHODS" .SS "Constructors" .IX Subsection "Constructors" .ie n .IP "$obj\->\fBnew\fR($top, %options)" 4 .el .IP "\f(CW$obj\fR\->\fBnew\fR($top, \f(CW%options\fR)" 4 .IX Item "$obj->new($top, %options)" Gets the top of an XML::LibXML tree, which must be a schema element. The tree is parsed: the information collected. .Sp .Vb 6 \& \-Option \-\-Default \& attribute_form_default \& element_form_default \& filename undef \& source undef \& target_namespace .Ve .RS 4 .IP "attribute_form_default => 'qualified'|'unqualified'" 2 .IX Item "attribute_form_default => 'qualified'|'unqualified'" .PD 0 .IP "element_form_default => 'qualified'|'unqualified'" 2 .IX Item "element_form_default => 'qualified'|'unqualified'" .PD Overrule the default as found in the schema. Many old schemas (like \&\s-1WSDL11\s0 and \s-1SOAP11\s0) do not specify the default in the schema but only in the text. .IP "filename => \s-1FILENAME\s0" 2 .IX Item "filename => FILENAME" When the source is some file, this is its name. .IP "source => \s-1STRING\s0" 2 .IX Item "source => STRING" An indication where this information came from. .IP "target_namespace => \s-1NAMESPACE\s0" 2 .IX Item "target_namespace => NAMESPACE" Overrule or set the target namespace. .RE .RS 4 .RE .SS "Accessors" .IX Subsection "Accessors" .ie n .IP "$obj\->\fBattributeGroups\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBattributeGroups\fR()" 4 .IX Item "$obj->attributeGroups()" Returns a list of all defined attribute groups. .ie n .IP "$obj\->\fBattributes\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBattributes\fR()" 4 .IX Item "$obj->attributes()" Returns a lost of all globally defined attribute names. .ie n .IP "$obj\->\fBcomplexTypes\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBcomplexTypes\fR()" 4 .IX Item "$obj->complexTypes()" Returns a list with all complexType names. .ie n .IP "$obj\->\fBelement\fR($uri)" 4 .el .IP "\f(CW$obj\fR\->\fBelement\fR($uri)" 4 .IX Item "$obj->element($uri)" Returns one global element definition. .ie n .IP "$obj\->\fBelements\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBelements\fR()" 4 .IX Item "$obj->elements()" Returns a list of all globally defined element names. .ie n .IP "$obj\->\fBfilename\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBfilename\fR()" 4 .IX Item "$obj->filename()" .PD 0 .ie n .IP "$obj\->\fBgroups\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBgroups\fR()" 4 .IX Item "$obj->groups()" .PD Returns a list of all defined model groups. .ie n .IP "$obj\->\fBschema\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBschema\fR()" 4 .IX Item "$obj->schema()" .PD 0 .ie n .IP "$obj\->\fBschemaInstance\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBschemaInstance\fR()" 4 .IX Item "$obj->schemaInstance()" .ie n .IP "$obj\->\fBschemaNamespace\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBschemaNamespace\fR()" 4 .IX Item "$obj->schemaNamespace()" .ie n .IP "$obj\->\fBsgs\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBsgs\fR()" 4 .IX Item "$obj->sgs()" .PD Returns a \s-1HASH\s0 with the base-type as key and an \s-1ARRAY\s0 of types which extend it. .ie n .IP "$obj\->\fBsimpleTypes\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBsimpleTypes\fR()" 4 .IX Item "$obj->simpleTypes()" Returns a list with all simpleType names. .ie n .IP "$obj\->\fBsource\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBsource\fR()" 4 .IX Item "$obj->source()" .PD 0 .ie n .IP "$obj\->\fBtargetNamespace\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBtargetNamespace\fR()" 4 .IX Item "$obj->targetNamespace()" .ie n .IP "$obj\->\fBtnses\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBtnses\fR()" 4 .IX Item "$obj->tnses()" .PD A schema can defined more than one target namespace, where recent schema spec changes provide a targetNamespace attribute. .ie n .IP "$obj\->\fBtype\fR($uri)" 4 .el .IP "\f(CW$obj\fR\->\fBtype\fR($uri)" 4 .IX Item "$obj->type($uri)" Returns the type definition with the specified name. .ie n .IP "$obj\->\fBtypes\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBtypes\fR()" 4 .IX Item "$obj->types()" Returns a list of all simpleTypes and complexTypes .SS "Index" .IX Subsection "Index" .ie n .IP "$obj\->\fBfind\fR($kind, $fullname)" 4 .el .IP "\f(CW$obj\fR\->\fBfind\fR($kind, \f(CW$fullname\fR)" 4 .IX Item "$obj->find($kind, $fullname)" Returns the definition for the object of \f(CW$kind\fR, with \f(CW$fullname\fR. .Sp example: of find .Sp .Vb 1 \& my $attr = $instance\->find(attribute => \*(Aq{myns}my_global_attr\*(Aq); .Ve .ie n .IP "$obj\->\fBimportLocations\fR($ns)" 4 .el .IP "\f(CW$obj\fR\->\fBimportLocations\fR($ns)" 4 .IX Item "$obj->importLocations($ns)" Returns a list of all schemaLocations specified with the import \f(CW$ns\fR (one of the values returned by \fBimports()\fR). .ie n .IP "$obj\->\fBimports\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBimports\fR()" 4 .IX Item "$obj->imports()" Returns a list with all namespaces which need to be imported. .ie n .IP "$obj\->\fBincludeLocations\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBincludeLocations\fR()" 4 .IX Item "$obj->includeLocations()" Returns a list of all schemaLocations which where specified with include statements. .ie n .IP "$obj\->\fBprintIndex\fR( [$fh], %options )" 4 .el .IP "\f(CW$obj\fR\->\fBprintIndex\fR( [$fh], \f(CW%options\fR )" 4 .IX Item "$obj->printIndex( [$fh], %options )" Prints an overview over the defined objects within this schema to the selected \f(CW$fh\fR. .Sp .Vb 3 \& \-Option \-\-Default \& kinds \& list_abstract .Ve .RS 4 .IP "kinds => KIND|ARRAY\-of\-KIND" 2 .IX Item "kinds => KIND|ARRAY-of-KIND" Which \s-1KIND\s0 of definitions would you like to see. Pick from \&\f(CW\*(C`element\*(C'\fR, \f(CW\*(C`attribute\*(C'\fR, \f(CW\*(C`simpleType\*(C'\fR, \f(CW\*(C`complexType\*(C'\fR, \f(CW\*(C`attributeGroup\*(C'\fR, and \f(CW\*(C`group\*(C'\fR. .IP "list_abstract => \s-1BOOLEAN\s0" 2 .IX Item "list_abstract => BOOLEAN" Show abstract elements, or skip them (because they cannot be instantiated anyway). .RE .RS 4 .RE .SH "SEE ALSO" .IX Header "SEE ALSO" This module is part of XML-Compile distribution version 1.63, built on July 02, 2019. Website: \fIhttp://perl.overmeer.net/xml\-compile/\fR .SH "LICENSE" .IX Header "LICENSE" Copyrights 2006\-2019 by [Mark Overmeer ]. For other contributors see ChangeLog. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See \fIhttp://dev.perl.org/licenses/\fR