|  |  | 
use XML::Schema::Wildcard; my $wildcard; $wildcard = XML::Schema::Wildcard->new( namespace => 'any' ); $wildcard = XML::Schema::Wildcard->new( namespace => 'not' ); # shorter form of above $wildcard = XML::Schema::Wildcard->new( any => 1 ); $wildcard = XML::Schema::Wildcard->new( not => 1 ); $wildcard = XML::Schema::Wildcard->new( { namespace => 'http://tt2.org/XML/Example.xml', } ); $wildcard = XML::Schema::Wildcard->new( { namespace => [ 'http://tt2.org/XML/Example1.xml', 'http://tt2.org/XML/Example2.xml', ], } ); $wildcard = XML::Schema::Wildcard->new( { namespace => [ not => 'http://tt2.org/XML/Example.xml' ], } );
This module implements an object class for representing XML Schema wildcards. This provides for validation of elements based on their XML namespace component.
        Constructor method called to create a new wildcard object.  A
        list of 'key => value
' pairs can be
        specified as command line arguments, or alternately, a hash
        reference can be passed which contains these configuration
        values.  The method returns a newly instantiated object on
        success.  On error it returns undef and sets an internal error
        message which can be retrieved by calling error() as a class method.
# list of options my $card = XML::Schema::Wildcard->new( namespace => 'any' ) || die XML::Schema::Wildcard->error(); # hash ref of options my $card = XML::Schema::Wildcard->new( { namespace => 'any', } ) || die XML::Schema::Wildcard->error();
The following configuration options may be specifed:
| Name | Typical Values | Description | 
| namespace | 'any''not''http://tt2.org/XML/...'[ not => 'http://tt2.org/XML/...' ] | 
	    This option is used to specify which XML namespaces should
            be included or excluded by the wildcard.  The value of
            ' 
            The option can also be specified as a reference to an 
            array of namespaces.  The first element in the list can
            be ' | 
| any | 1 | Alternate way of specifying namespace => 'any'. | 
| not | 1 | Alternate way of specifying namespace => 'not'. | 
| process | 'skip''lax''strict' | This value controls the impact on assessment of the items allowed by wildcards. At present, this has no effect. | 
select()
	Return the current selection criteria as one of the strings
        'any
', 'not
' or
        'one
'.
    
process()
	Return the current assessment process as one of the strings
        'skip
', 'lax
' or
        'strict
'.
    
namespace()
	Return a reference to a hash array of namespace that are accepted
        or rejected according to the selection criteria.
    
accept( $value )
	Returns true (1) if the value is namespace qualified according to the
        wildcard selection criteria or false (0) if not.