XMLBehaviors
============

This sub-directory contains a simple example of the use of
the XMLBehavior capability of generateDS.py.

Basically, with the -b flag, generateDS.py will add methods to the
sub-classes (generated with the -s flag).  The methods to be
added and the (sub-)classes that they are to be added to are
described in an XML document.  An example of that document is
given in xmlbehavior_po.xml.

You can try it out as follows:

1. Generate the super-class file:

       python generateDS.py -o po.py po.xsd

2. Generate the sub-class including the methods described in
   xmlbehavior_po.xml:

       python generateDS.py -s po_sub.py -b xmlbehavior_po.xml po.xsd

Files of interest in the directory/example are:

- xmlbehavior_po.xml -- The XMLBehavior XML instance document that
  specifies the methods to be added to the generated sub-classes.

- po.xsd -- The XMLSchema that describes the purchase order
  classes.  In the example above, it is used to generate po.py and
  po_sub.py.

- xmlbehavior.py and xmlbehavior_sub.py -- These files are
  imported by generateDS.py and are used to read the XMLBehavior
  file (xmlbehavior_po.xml, in this example).  xmlbehavior.py and
  xmlbehavior_sub.py were generated by generateDS.py.  A small
  amount of code was added to xmlbehavior_sub.py to help with the
  generation of behaviors.

- xmlbehavior.xsd -- The XMLSchema that describes XMLBehavior
  instance documents.  It was used by generateDS.py to generate
  xmlbehavior.py and xmlbehavior_sub.py.

