NAME

SOAP::WSDL::XSD - SOAP::WSDL's XML Schema implementation

DESCRIPTION

SOAP::WSDL's XML Schema implementation translates XML Schema definitions into perl classes.

Every top-level type or element in a XML schema is translated into a perl class (usually in it's own file).

Atomic types are either directly included in the class of their parent's node, or as sub-package in their parent class' file.

Base classes

SOAP::WSDL::XSD provides a set of base classes for the construction of XML schema defined type classes.

Builtin types

SOAP::WSDL::XSD provides classes for all builtin XML Schema datatypes.

For a list and reference on these classes, see SOAP::WSDL::XSD::Typelib::Builtin.

Derivation classes

For derivation by list, the list derivation class SOAP::WSDL::XSD::Typelib::Builtin::list exists.

Derivation by restriction is handled without the help of additional classes.

Element construction class

For the construction of element classes, the element superclass SOAP::WSDL::XSD::Typelib::Element exists. All elements are ultimately derived from this class. Elements may inherit from type classes, too - see "TRANSLATION RULES" for details.

complexType construction class

For the construction of complexType classes, the

TRANSLATION RULES

element

TODO add more elaborate description

element with type attribute

Elements defined by referencing a builtin or user defined type inherit from SOAP::WSDL::XSD::Typelib::Element and from the corresponding type class.

  Element       Type 
  base class    class
     ^            ^
     |            |
      ------------ 
          |
 Element type="" class          
     

element with ref attribute

Elements defined by referencing another element inherit from the corresponding element class.

 referenced Element class
          ^
          |
 Element ref="" class          

element with atomic simpleType

Elements defined by a atomic simpleType from SOAP::WSDL::XSD::Typelib::Element and from the base type of the atomic type.

   Element     atomic Type 
  base class   base class
     ^             ^
     |             |
      ------------- 
            |
 element simpleType class          

element with atomic complexType

Elements defined with a atomic complexType inherit from SOAP::WSDL::XSD::Typelib::Element and from SOAP::WSDL::XSD::Typelib::ComplexType.

   Element     complexType
  base class   base class
     ^             ^
     |             |
      ------------- 
            |
 element complexType class          

complexType

TODO add more elaborate description

Some content models are not implemented yet. The content models implemented are described below.

complexType with "sequence" variety

complexType with "all" variety

The implementation for all does enforce the order of elements as described in the WSDL, even though this is not required by the XML Schema specification.

complexType with "choice" variety

The implementation for choice currently is the same as for all - which means, no check for occurence are made.

complexType with complexContent content model

  • restriction variety

    ComplexType classes with restriction variety inherit from their base type. No additional processing or content checking is performed yet.

    Note that complexType with restriction variety classes don't exhibit their type via the xsi:type attribute yet, so they currently cannot be used as a replacement for their base type.

  • extension variety

SimpleType

TODO add more elaborate description

Some derivation methods are not implemented yet. The derivation methods implemented are described below.

Derivation by list

Derivation by list is implemented by inheriting from both the base type and SOAP::WSDL::XSD::Typelib::XSD::list.

Derivation by restriction

Derivation by restriction is implemented by inheriting from a base type and applying the required restrictions.

Complex Types

FACETS

XML Schema facets are not implemented yet.

They will probably implemented some day by putting constant methods into the correspondent classes.

ATTRIBUTES

XML attributes are not implemented yet. If you have a good idea on how to implement them, feel free to email me a proposal.

BUGS AND LIMITATIONS

The following XML Schema declaration elements are not supported yet:

  • Declaration elements

     attribute
     notation
  • Type definition elements

     complexContent - only restriction supported
     simpleContent
     union
  • Content model definition elements

     any
     anyAttribute
     attributeGroup
     group
  • Identity definition elements

     field
     key
     keyref
     selector
     unique
  • Inclusion elements

     import
     include
     redefine

The following XML Schema declaration elements are supported, but have no effect yet:

  • Factes

     enumeration
     fractionDigits
     lenght
     maxExclusive
     maxInclusiove
     maxLength
     minExclusive
     minInclusive
     minLength
     pattern
     totalDigits
     whitespace
  • Documentation elements

     appinfo

LICENSE

Copyright 2007 Martin Kutter.

This file is part of SOAP-WSDL. You may distribute/modify it under the same terms as perl itself

AUTHOR

Martin Kutter <martin.kutter fen-net.de>