=encoding utf8

=head1 NAME

XML::Rewrite::Schema - transform schemas

=head1 INHERITANCE

 XML::Rewrite::Schema
   is a XML::Rewrite
   is a XML::Compile::Cache
   is a XML::Compile::Schema
   is a XML::Compile

=head1 SYNOPSIS

 my $rewriter = XML::Rewriter::Schema->new(...);
 my ($type, $data) = $rewriter->process($file);
 my $doc = $rewriter->buildDOM($type => $data);

=head1 DESCRIPTION

Implements additional transformations, available for SCHEMA (version 2001)
specific extension.

Feel invited to contribute ideas of useful features.

Extends L<"DESCRIPTION" in XML::Rewrite|XML::Rewrite/"DESCRIPTION">.
 
=head1 METHODS

Extends L<"METHODS" in XML::Rewrite|XML::Rewrite/"METHODS">.
 
=head2 Constructors

Extends L<"Constructors" in XML::Rewrite|XML::Rewrite/"Constructors">.
 
=over 4

=item XML::Rewrite::Schema-E<gt>B<new>( [SCHEMA], OPTIONS )

 -Option               --Defined in          --Default
  allow_undeclared       XML::Compile::Cache   <true>
  any_element            XML::Compile::Cache   'ATTEMPT'
  attribute_form                               <undef>
  blanks_before          XML::Rewrite          'NONE'
  block_namespace        XML::Compile::Schema  []
  change                 XML::Rewrite          'TRANSFORM'
  comments               XML::Rewrite          'KEEP'
  defaults_writer        XML::Rewrite          'IGNORE'
  element_form                                 <undef>
  expand_includes                              <false>
  hook                   XML::Compile::Schema  undef
  hooks                  XML::Compile::Schema  []
  ignore_unused_tags     XML::Compile::Schema  <false>
  key_rewrite            XML::Compile::Schema  []
  opts_readers           XML::Compile::Cache   []
  opts_rw                XML::Compile::Cache   []
  opts_writers           XML::Compile::Cache   []
  output_compression     XML::Rewrite          <undef>
  output_encoding        XML::Rewrite          <undef>
  output_standalone      XML::Rewrite          <undef>
  output_version         XML::Rewrite          <undef>
  parser_options         XML::Compile          <many>
  prefixes               XML::Compile::Cache   <smart>
  remove_annotation                            <false>
  remove_elements        XML::Rewrite          []
  remove_id_constraints                        <false>
  schema_dirs            XML::Compile          undef
  target_namespace                             <undef>
  typemap                XML::Compile::Cache   {}
  use_default_namespace  XML::Rewrite          <false>
  xsi_type               XML::Compile::Cache   {}

=over 2

=item allow_undeclared => BOOLEAN

=item any_element => CODE|'TAKE_ALL'|'SKIP_ALL'|'ATTEMPT'|'SLOPPY'

=item attribute_form => 'qualified'|'unqualified'

=item blanks_before => 'ALL'|'CONTAINERS'|'NONE'

=item block_namespace => NAMESPACE|TYPE|HASH|CODE|ARRAY

=item change => 'REPAIR'|'TRANSFORM'

=item comments => 'REMOVE'|'KEEP'

=item defaults_writer => 'EXTEND'|'IGNORE'|'MINIMAL'

=item element_form => 'qualified'|'unqualified'

=item expand_includes => BOOLEAN

Include all the "include" files recursively, and merge their content
with the main schema.

=item hook => $hook|ARRAY

=item hooks => ARRAY

=item ignore_unused_tags => BOOLEAN|REGEXP

=item key_rewrite => HASH|CODE|ARRAY

=item opts_readers => HASH|ARRAY-of-PAIRS

=item opts_rw => HASH|ARRAY-of-PAIRS

=item opts_writers => HASH|ARRAY-of-PAIRS

=item output_compression => -1, 0-8

=item output_encoding => CHARSET

=item output_standalone => BOOLEAN|'yes'|'no'

=item output_version => STRING

=item parser_options => HASH|ARRAY

=item prefixes => HASH|ARRAY-of-PAIRS

=item remove_annotation => BOOLEAN

=item remove_elements => ARRAY

=item remove_id_constraints => BOOLEAN

Remove the identity constraints (key, keyref, and unique elements) from
the schema.

=item schema_dirs => $directory|ARRAY-OF-directories

=item target_namespace => URI

=item typemap => HASH|ARRAY

=item use_default_namespace => BOOLEAN

=item xsi_type => HASH|ARRAY

=back

=back

=head2 Accessors

Extends L<"Accessors" in XML::Rewrite|XML::Rewrite/"Accessors">.
 
=over 4

=item $obj-E<gt>B<addHook>($hook|LIST|undef)

Inherited, see L<XML::Compile::Schema/"Accessors">

=item $obj-E<gt>B<addHooks>( $hook, [$hook, ...] )

Inherited, see L<XML::Compile::Schema/"Accessors">

=item $obj-E<gt>B<addKeyRewrite>($predef|CODE|HASH, ...)

Inherited, see L<XML::Compile::Schema/"Accessors">

=item $obj-E<gt>B<addSchemaDirs>(@directories|$filename)

=item XML::Rewrite::Schema-E<gt>B<addSchemaDirs>(@directories|$filename)

Inherited, see L<XML::Compile/"Accessors">

=item $obj-E<gt>B<addSchemas>($xml, %options)

Inherited, see L<XML::Compile::Schema/"Accessors">

=item $obj-E<gt>B<addTypemap>(PAIR)

Inherited, see L<XML::Compile::Schema/"Accessors">

=item $obj-E<gt>B<addTypemaps>(PAIRS)

Inherited, see L<XML::Compile::Schema/"Accessors">

=item $obj-E<gt>B<addXsiType>( [HASH|ARRAY|LIST] )

Inherited, see L<XML::Compile::Cache/"Accessors">

=item $obj-E<gt>B<allowUndeclared>( [BOOLEAN] )

Inherited, see L<XML::Compile::Cache/"Accessors">

=item $obj-E<gt>B<anyElement>('ATTEMPT'|'SLOPPY'|'SKIP_ALL'|'TAKE_ALL'|CODE)

Inherited, see L<XML::Compile::Cache/"Accessors">

=item $obj-E<gt>B<blockNamespace>($ns|$type|HASH|CODE|ARRAY)

Inherited, see L<XML::Compile::Schema/"Accessors">

=item $obj-E<gt>B<hooks>( [<'READER'|'WRITER'>] )

Inherited, see L<XML::Compile::Schema/"Accessors">

=item $obj-E<gt>B<typemap>( [HASH|ARRAY|PAIRS] )

Inherited, see L<XML::Compile::Cache/"Accessors">

=item $obj-E<gt>B<useSchema>( $schema, [$schema, ...] )

Inherited, see L<XML::Compile::Schema/"Accessors">

=back

=head2 Prefix management

Extends L<"Prefix management" in XML::Rewrite|XML::Rewrite/"Prefix management">.
 
=over 4

=item $obj-E<gt>B<addNicePrefix>(BASE, NAMESPACE)

Inherited, see L<XML::Compile::Cache/"Prefix management">

=item $obj-E<gt>B<addPrefixes>( [PAIRS|ARRAY|HASH] )

Inherited, see L<XML::Compile::Cache/"Prefix management">

=item $obj-E<gt>B<learnPrefixes>($node)

Inherited, see L<XML::Compile::Cache/"Prefix management">

=item $obj-E<gt>B<prefix>($prefix)

Inherited, see L<XML::Compile::Cache/"Prefix management">

=item $obj-E<gt>B<prefixFor>($uri)

Inherited, see L<XML::Compile::Cache/"Prefix management">

=item $obj-E<gt>B<prefixed>( $type|<$ns,$local> )

Inherited, see L<XML::Compile::Cache/"Prefix management">

=item $obj-E<gt>B<prefixes>( [$params] )

Inherited, see L<XML::Compile::Cache/"Prefix management">

=back

=head2 Compilers

Extends L<"Compilers" in XML::Rewrite|XML::Rewrite/"Compilers">.
 
=over 4

=item $obj-E<gt>B<addCompileOptions>( ['READERS'|'WRITERS'|'RW'], %options )

Inherited, see L<XML::Compile::Cache/"Compilers">

=item $obj-E<gt>B<compile>( <'READER'|'WRITER'>, $type, %options )

Inherited, see L<XML::Compile::Schema/"Compilers">

=item $obj-E<gt>B<compileAll>( ['READERS'|'WRITERS'|'RW', [$ns]] )

Inherited, see L<XML::Compile::Cache/"Compilers">

=item $obj-E<gt>B<compileType>( <'READER'|'WRITER'>, $type, %options )

Inherited, see L<XML::Compile::Schema/"Compilers">

=item $obj-E<gt>B<dataToXML>($node|REF-XML|XML-STRING|$filename|$fh|$known)

=item XML::Rewrite::Schema-E<gt>B<dataToXML>($node|REF-XML|XML-STRING|$filename|$fh|$known)

Inherited, see L<XML::Compile/"Compilers">

=item $obj-E<gt>B<initParser>(%options)

=item XML::Rewrite::Schema-E<gt>B<initParser>(%options)

Inherited, see L<XML::Compile/"Compilers">

=item $obj-E<gt>B<reader>($type|$name, %options)

Inherited, see L<XML::Compile::Cache/"Compilers">

=item $obj-E<gt>B<template>( <'XML'|'PERL'|'TREE'>, $element, %options )

Inherited, see L<XML::Compile::Schema/"Compilers">

=item $obj-E<gt>B<writer>($type|$name)

Inherited, see L<XML::Compile::Cache/"Compilers">

=back

=head2 Administration

Extends L<"Administration" in XML::Rewrite|XML::Rewrite/"Administration">.
 
=over 4

=item $obj-E<gt>B<declare>( <'READER'|'WRITER'|'RW'>, <$type|ARRAY>, %options )

Inherited, see L<XML::Compile::Cache/"Administration">

=item $obj-E<gt>B<doesExtend>($exttype, $basetype)

Inherited, see L<XML::Compile::Schema/"Administration">

=item $obj-E<gt>B<elements>()

Inherited, see L<XML::Compile::Schema/"Administration">

=item $obj-E<gt>B<findName>($name)

Inherited, see L<XML::Compile::Cache/"Administration">

=item $obj-E<gt>B<findSchemaFile>($filename)

=item XML::Rewrite::Schema-E<gt>B<findSchemaFile>($filename)

Inherited, see L<XML::Compile/"Administration">

=item $obj-E<gt>B<importDefinitions>($xmldata, %options)

Inherited, see L<XML::Compile::Schema/"Administration">

=item $obj-E<gt>B<knownNamespace>($ns|PAIRS)

=item XML::Rewrite::Schema-E<gt>B<knownNamespace>($ns|PAIRS)

Inherited, see L<XML::Compile/"Administration">

=item $obj-E<gt>B<namespaces>()

Inherited, see L<XML::Compile::Schema/"Administration">

=item $obj-E<gt>B<printIndex>( [$fh], %options )

Inherited, see L<XML::Compile::Cache/"Administration">

=item $obj-E<gt>B<types>()

Inherited, see L<XML::Compile::Schema/"Administration">

=item $obj-E<gt>B<walkTree>($node, CODE)

Inherited, see L<XML::Compile/"Administration">

=back

=head2 Processing

Extends L<"Processing" in XML::Rewrite|XML::Rewrite/"Processing">.
 
=over 4

=item $obj-E<gt>B<buildDOM>(TYPE, DATA, OPTIONS)

Inherited, see L<XML::Rewrite/"Processing">

=item $obj-E<gt>B<process>(XMLDATA, OPTIONS)

Inherited, see L<XML::Rewrite/"Processing">

=item $obj-E<gt>B<repairXML>(TYPE, XML, DETAILS)

Inherited, see L<XML::Rewrite/"Processing">

=item $obj-E<gt>B<transformData>(TYPE, DATA, DETAILS)

Inherited, see L<XML::Rewrite/"Processing">

=back

=head1 DETAILS

Extends L<"DETAILS" in XML::Rewrite|XML::Rewrite/"DETAILS">.
 
=head1 DESCRIPTIONS

Extends L<"DESCRIPTIONS" in XML::Rewrite|XML::Rewrite/"DESCRIPTIONS">.
 
=head1 SEE ALSO

This module is part of XML-Rewrite distribution version 0.11,
built on May 11, 2018. Website: F<http://perl.overmeer.net/CPAN/>

=head1 LICENSE

Copyrights 2008-2018 by [Mark Overmeer <markov@cpan.org>]. 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 F<http://dev.perl.org/licenses/>

