• Login
  • Help/Guide
  • About Trac
  • Preferences
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Context Navigation

  • ← Previous Change
  • Next Change →

Changeset 180 for Xml/xsd-fu/trunk/generateDS/generateDS.html

Show
Ignore:
Timestamp:
05/29/08 18:12:08 (6 months ago)
Author:
callan
Message:

Updating to generateDS-1.13a and patching with changes from 1.11a previously committed.

Files:
1 modified

  • Xml/xsd-fu/trunk/generateDS/generateDS.html (modified) (53 diffs)

Legend:

Unmodified
Added
Removed
  • Xml/xsd-fu/trunk/generateDS/generateDS.html

    r112 r180  
    77<title>generateDS -- Generate Data Structures from XML Schema</title> 
    88<meta name="author" content="Dave Kuhlman" /> 
    9 <meta name="date" content="Oct. 11, 2007" /> 
     9<meta name="date" content="May 7, 2008" /> 
    1010<meta name="copyright" content="Copyright (c) 2004 Dave Kuhlman. This documentation and the software it describes is covered by The MIT License: http://www.opensource.org/licenses/mit-license." /> 
    1111<style type="text/css"> 
    … …  
    192192</td></tr> 
    193193<tr><th class="docinfo-name">Revision:</th> 
    194 <td>1.11a</td></tr> 
     194<td>1.13a</td></tr> 
    195195<tr><th class="docinfo-name">Date:</th> 
    196 <td>Oct. 11, 2007</td></tr> 
     196<td>May 7, 2008</td></tr> 
    197197<tr><th class="docinfo-name">Copyright:</th> 
    198198<td>Copyright (c) 2004 Dave Kuhlman. This documentation 
    … …  
    224224<li><a class="reference internal" href="#how-to-use-generateds-py" id="id11">4&nbsp;&nbsp;&nbsp;How-to Use <tt class="docutils literal"><span class="pre">generateDS.py</span></tt></a><ul class="auto-toc"> 
    225225<li><a class="reference internal" href="#running-generateds-py" id="id12">4.1&nbsp;&nbsp;&nbsp;Running <tt class="docutils literal"><span class="pre">generateDS.py</span></tt></a></li> 
    226 <li><a class="reference internal" href="#name-conficts" id="id13">4.2&nbsp;&nbsp;&nbsp;Name conficts</a><ul class="auto-toc"> 
     226<li><a class="reference internal" href="#name-conflicts" id="id13">4.2&nbsp;&nbsp;&nbsp;Name conflicts</a><ul class="auto-toc"> 
    227227<li><a class="reference internal" href="#conflicts-with-python-keywords" id="id14">4.2.1&nbsp;&nbsp;&nbsp;Conflicts with Python keywords</a></li> 
    228228<li><a class="reference internal" href="#conflicts-between-child-elements-and-attributes" id="id15">4.2.2&nbsp;&nbsp;&nbsp;Conflicts between child elements and attributes</a></li> 
    229229</ul> 
    230230</li> 
    231 <li><a class="reference internal" href="#supported-features-of-xml-schema" id="id16">4.3&nbsp;&nbsp;&nbsp;Supported features of XML Schema</a><ul class="auto-toc"> 
    232 <li><a class="reference internal" href="#attributes-no-nested-children" id="id17">4.3.1&nbsp;&nbsp;&nbsp;Attributes + no nested children</a></li> 
    233 <li><a class="reference internal" href="#mixed-content" id="id18">4.3.2&nbsp;&nbsp;&nbsp;Mixed content</a></li> 
    234 <li><a class="reference internal" href="#anyattribute" id="id19">4.3.3&nbsp;&nbsp;&nbsp;anyAttribute</a></li> 
    235 <li><a class="reference internal" href="#element-extensions" id="id20">4.3.4&nbsp;&nbsp;&nbsp;Element extensions</a></li> 
    236 <li><a class="reference internal" href="#attribute-groups" id="id21">4.3.5&nbsp;&nbsp;&nbsp;Attribute groups</a></li> 
    237 <li><a class="reference internal" href="#substitution-groups" id="id22">4.3.6&nbsp;&nbsp;&nbsp;Substitution groups</a></li> 
    238 <li><a class="reference internal" href="#primitive-types" id="id23">4.3.7&nbsp;&nbsp;&nbsp;Primitive types</a></li> 
    239 <li><a class="reference internal" href="#simpletype" id="id24">4.3.8&nbsp;&nbsp;&nbsp;simpleType</a></li> 
    240 <li><a class="reference internal" href="#list-values-optional-values-maxoccurs-etc" id="id25">4.3.9&nbsp;&nbsp;&nbsp;List values, optional values, maxOccurs, etc.</a></li> 
    241 <li><a class="reference internal" href="#simpletype-and-validators" id="id26">4.3.10&nbsp;&nbsp;&nbsp;simpleType and validators</a></li> 
    242 </ul> 
    243 </li> 
    244 </ul> 
    245 </li> 
    246 <li><a class="reference internal" href="#the-xml-schema-input-to-generateds" id="id27">5&nbsp;&nbsp;&nbsp;The XML Schema Input to generateDS</a><ul class="auto-toc"> 
    247 <li><a class="reference internal" href="#additional-constructions" id="id28">5.1&nbsp;&nbsp;&nbsp;Additional constructions</a><ul class="auto-toc"> 
    248 <li><a class="reference internal" href="#complextype-at-top-level" id="id29">5.1.1&nbsp;&nbsp;&nbsp;&lt;complexType&gt; at top-level</a></li> 
    249 <li><a class="reference internal" href="#use-of-ref-instead-of-name-and-type-attributes" id="id30">5.1.2&nbsp;&nbsp;&nbsp;Use of &quot;ref&quot; instead of &quot;name&quot; and &quot;type&quot; attributes</a></li> 
    250 <li><a class="reference internal" href="#extension-types" id="id31">5.1.3&nbsp;&nbsp;&nbsp;Extension types</a></li> 
    251 <li><a class="reference internal" href="#elements-containing-mixed-content" id="id32">5.1.4&nbsp;&nbsp;&nbsp;Elements containing mixed content</a></li> 
    252 </ul> 
    253 </li> 
    254 </ul> 
    255 </li> 
    256 <li><a class="reference internal" href="#id1" id="id33">6&nbsp;&nbsp;&nbsp;XMLBehaviors</a><ul class="auto-toc"> 
    257 <li><a class="reference internal" href="#the-xmlbehaviors-input-file" id="id34">6.1&nbsp;&nbsp;&nbsp;The XMLBehaviors input file</a></li> 
    258 <li><a class="reference internal" href="#implementing-other-sources-for-implementation-bodies" id="id35">6.2&nbsp;&nbsp;&nbsp;Implementing other sources for implementation bodies</a></li> 
    259 </ul> 
    260 </li> 
    261 <li><a class="reference internal" href="#additional-features" id="id36">7&nbsp;&nbsp;&nbsp;Additional Features</a><ul class="auto-toc"> 
    262 <li><a class="reference internal" href="#xsd-list-element-support" id="id37">7.1&nbsp;&nbsp;&nbsp;xsd:list element support</a></li> 
    263 <li><a class="reference internal" href="#xsd-enumeration-support" id="id38">7.2&nbsp;&nbsp;&nbsp;xsd:enumeration support</a></li> 
    264 <li><a class="reference internal" href="#xsd-union-support" id="id39">7.3&nbsp;&nbsp;&nbsp;xsd:union support</a></li> 
    265 <li><a class="reference internal" href="#extended-xsd-choice-support" id="id40">7.4&nbsp;&nbsp;&nbsp;Extended xsd:choice support</a></li> 
    266 <li><a class="reference internal" href="#minoccurs-attribute-support" id="id41">7.5&nbsp;&nbsp;&nbsp;minOccurs attribute support</a></li> 
    267 <li><a class="reference internal" href="#more-thorough-content-type-and-base-type-resolution" id="id42">7.6&nbsp;&nbsp;&nbsp;More thorough content type and base type resolution</a></li> 
    268 <li><a class="reference internal" href="#making-top-level-simpletypes-available-from-xschemahandler" id="id43">7.7&nbsp;&nbsp;&nbsp;Making top level simpleTypes available from XschemaHandler</a></li> 
    269 </ul> 
    270 </li> 
    271 <li><a class="reference internal" href="#how-to-use-the-generated-source-code" id="id44">8&nbsp;&nbsp;&nbsp;How-to Use the Generated Source Code</a><ul class="auto-toc"> 
    272 <li><a class="reference internal" href="#the-parsing-functions" id="id45">8.1&nbsp;&nbsp;&nbsp;The parsing functions</a></li> 
    273 <li><a class="reference internal" href="#the-export-methods" id="id46">8.2&nbsp;&nbsp;&nbsp;The export methods</a><ul class="auto-toc"> 
    274 <li><a class="reference internal" href="#method-export" id="id47">8.2.1&nbsp;&nbsp;&nbsp;Method export</a></li> 
    275 <li><a class="reference internal" href="#method-exportliteral" id="id48">8.2.2&nbsp;&nbsp;&nbsp;Method <tt class="docutils literal"><span class="pre">exportLiteral</span></tt></a><ul class="auto-toc"> 
    276 <li><a class="reference internal" href="#what-it-does" id="id49">8.2.2.1&nbsp;&nbsp;&nbsp;What It Does</a></li> 
    277 <li><a class="reference internal" href="#why-you-might-care" id="id50">8.2.2.2&nbsp;&nbsp;&nbsp;Why You Might Care</a></li> 
    278 <li><a class="reference internal" href="#how-to-use-it" id="id51">8.2.2.3&nbsp;&nbsp;&nbsp;How to use it</a></li> 
    279 </ul> 
    280 </li> 
    281 </ul> 
    282 </li> 
    283 <li><a class="reference internal" href="#building-instances" id="id52">8.3&nbsp;&nbsp;&nbsp;Building instances</a></li> 
    284 <li><a class="reference internal" href="#using-the-subclass-module" id="id53">8.4&nbsp;&nbsp;&nbsp;Using the subclass module</a></li> 
    285 <li><a class="reference internal" href="#elements-with-attributes-but-no-nested-children" id="id54">8.5&nbsp;&nbsp;&nbsp;Elements with attributes but no nested children</a></li> 
    286 <li><a class="reference internal" href="#id3" id="id55">8.6&nbsp;&nbsp;&nbsp;Mixed content</a></li> 
    287 <li><a class="reference internal" href="#id5" id="id56">8.7&nbsp;&nbsp;&nbsp;anyAttribute</a></li> 
    288 <li><a class="reference internal" href="#user-methods" id="id57">8.8&nbsp;&nbsp;&nbsp;User Methods</a></li> 
    289 </ul> 
    290 </li> 
    291 <li><a class="reference internal" href="#how-to-modify-the-generated-code" id="id58">9&nbsp;&nbsp;&nbsp;How-to Modify the Generated Code</a><ul class="auto-toc"> 
    292 <li><a class="reference internal" href="#adding-features-to-class-definitions" id="id59">9.1&nbsp;&nbsp;&nbsp;Adding features to class definitions</a></li> 
    293 </ul> 
    294 </li> 
    295 <li><a class="reference internal" href="#examples-and-demonstrations" id="id60">10&nbsp;&nbsp;&nbsp;Examples and Demonstrations</a></li> 
    296 <li><a class="reference internal" href="#limitations-of-generateds" id="id61">11&nbsp;&nbsp;&nbsp;Limitations of generateDS</a><ul class="auto-toc"> 
    297 <li><a class="reference internal" href="#xml-schema-limitations" id="id62">11.1&nbsp;&nbsp;&nbsp;XML Schema limitations</a></li> 
    298 <li><a class="reference internal" href="#large-documents" id="id63">11.2&nbsp;&nbsp;&nbsp;Large documents</a></li> 
    299 </ul> 
    300 </li> 
    301 <li><a class="reference internal" href="#includes-the-xml-schema-include-element" id="id64">12&nbsp;&nbsp;&nbsp;Includes -- The XML Schema include element</a></li> 
    302 <li><a class="reference internal" href="#acknowledgment" id="id65">13&nbsp;&nbsp;&nbsp;Acknowledgment</a></li> 
    303 <li><a class="reference internal" href="#see-also" id="id66">14&nbsp;&nbsp;&nbsp;See Also</a></li> 
     231</ul> 
     232</li> 
     233<li><a class="reference internal" href="#supported-features-of-xml-schema" id="id16">5&nbsp;&nbsp;&nbsp;Supported features of XML Schema</a><ul class="auto-toc"> 
     234<li><a class="reference internal" href="#attributes-no-nested-children" id="id17">5.1&nbsp;&nbsp;&nbsp;Attributes + no nested children</a></li> 
     235<li><a class="reference internal" href="#mixed-content" id="id18">5.2&nbsp;&nbsp;&nbsp;Mixed content</a></li> 
     236<li><a class="reference internal" href="#anyattribute" id="id19">5.3&nbsp;&nbsp;&nbsp;anyAttribute</a></li> 
     237<li><a class="reference internal" href="#element-extensions" id="id20">5.4&nbsp;&nbsp;&nbsp;Element extensions</a></li> 
     238<li><a class="reference internal" href="#attribute-groups" id="id21">5.5&nbsp;&nbsp;&nbsp;Attribute groups</a></li> 
     239<li><a class="reference internal" href="#substitution-groups" id="id22">5.6&nbsp;&nbsp;&nbsp;Substitution groups</a></li> 
     240<li><a class="reference internal" href="#primitive-types" id="id23">5.7&nbsp;&nbsp;&nbsp;Primitive types</a></li> 
     241<li><a class="reference internal" href="#simpletype" id="id24">5.8&nbsp;&nbsp;&nbsp;simpleType</a></li> 
     242<li><a class="reference internal" href="#list-values-optional-values-maxoccurs-etc" id="id25">5.9&nbsp;&nbsp;&nbsp;List values, optional values, maxOccurs, etc.</a></li> 
     243<li><a class="reference internal" href="#simpletype-and-validators" id="id26">5.10&nbsp;&nbsp;&nbsp;simpleType and validators</a></li> 
     244<li><a class="reference internal" href="#include-file-processing" id="id27">5.11&nbsp;&nbsp;&nbsp;Include file processing</a></li> 
     245</ul> 
     246</li> 
     247<li><a class="reference internal" href="#the-xml-schema-input-to-generateds" id="id28">6&nbsp;&nbsp;&nbsp;The XML Schema Input to generateDS</a><ul class="auto-toc"> 
     248<li><a class="reference internal" href="#additional-constructions" id="id29">6.1&nbsp;&nbsp;&nbsp;Additional constructions</a><ul class="auto-toc"> 
     249<li><a class="reference internal" href="#complextype-at-top-level" id="id30">6.1.1&nbsp;&nbsp;&nbsp;&lt;complexType&gt; at top-level</a></li> 
     250<li><a class="reference internal" href="#use-of-ref-instead-of-name-and-type-attributes" id="id31">6.1.2&nbsp;&nbsp;&nbsp;Use of &quot;ref&quot; instead of &quot;name&quot; and &quot;type&quot; attributes</a></li> 
     251<li><a class="reference internal" href="#extension-types" id="id32">6.1.3&nbsp;&nbsp;&nbsp;Extension types</a></li> 
     252<li><a class="reference internal" href="#elements-containing-mixed-content" id="id33">6.1.4&nbsp;&nbsp;&nbsp;Elements containing mixed content</a></li> 
     253</ul> 
     254</li> 
     255</ul> 
     256</li> 
     257<li><a class="reference internal" href="#id1" id="id34">7&nbsp;&nbsp;&nbsp;XMLBehaviors</a><ul class="auto-toc"> 
     258<li><a class="reference internal" href="#the-xmlbehaviors-input-file" id="id35">7.1&nbsp;&nbsp;&nbsp;The XMLBehaviors input file</a></li> 
     259<li><a class="reference internal" href="#implementing-other-sources-for-implementation-bodies" id="id36">7.2&nbsp;&nbsp;&nbsp;Implementing other sources for implementation bodies</a></li> 
     260</ul> 
     261</li> 
     262<li><a class="reference internal" href="#additional-features" id="id37">8&nbsp;&nbsp;&nbsp;Additional Features</a><ul class="auto-toc"> 
     263<li><a class="reference internal" href="#xsd-list-element-support" id="id38">8.1&nbsp;&nbsp;&nbsp;xsd:list element support</a></li> 
     264<li><a class="reference internal" href="#xsd-enumeration-support" id="id39">8.2&nbsp;&nbsp;&nbsp;xsd:enumeration support</a></li> 
     265<li><a class="reference internal" href="#xsd-union-support" id="id40">8.3&nbsp;&nbsp;&nbsp;xsd:union support</a></li> 
     266<li><a class="reference internal" href="#extended-xsd-choice-support" id="id41">8.4&nbsp;&nbsp;&nbsp;Extended xsd:choice support</a></li> 
     267<li><a class="reference internal" href="#minoccurs-attribute-support" id="id42">8.5&nbsp;&nbsp;&nbsp;minOccurs attribute support</a></li> 
     268<li><a class="reference internal" href="#more-thorough-content-type-and-base-type-resolution" id="id43">8.6&nbsp;&nbsp;&nbsp;More thorough content type and base type resolution</a></li> 
     269<li><a class="reference internal" href="#making-top-level-simpletypes-available-from-xschemahandler" id="id44">8.7&nbsp;&nbsp;&nbsp;Making top level simpleTypes available from XschemaHandler</a></li> 
     270</ul> 
     271</li> 
     272<li><a class="reference internal" href="#how-to-use-the-generated-source-code" id="id45">9&nbsp;&nbsp;&nbsp;How-to Use the Generated Source Code</a><ul class="auto-toc"> 
     273<li><a class="reference internal" href="#the-parsing-functions" id="id46">9.1&nbsp;&nbsp;&nbsp;The parsing functions</a></li> 
     274<li><a class="reference internal" href="#the-export-methods" id="id47">9.2&nbsp;&nbsp;&nbsp;The export methods</a><ul class="auto-toc"> 
     275<li><a class="reference internal" href="#method-export" id="id48">9.2.1&nbsp;&nbsp;&nbsp;Method export</a></li> 
     276<li><a class="reference internal" href="#method-exportliteral" id="id49">9.2.2&nbsp;&nbsp;&nbsp;Method <tt class="docutils literal"><span class="pre">exportLiteral</span></tt></a><ul class="auto-toc"> 
     277<li><a class="reference internal" href="#what-it-does" id="id50">9.2.2.1&nbsp;&nbsp;&nbsp;What It Does</a></li> 
     278<li><a class="reference internal" href="#why-you-might-care" id="id51">9.2.2.2&nbsp;&nbsp;&nbsp;Why You Might Care</a></li> 
     279<li><a class="reference internal" href="#how-to-use-it" id="id52">9.2.2.3&nbsp;&nbsp;&nbsp;How to use it</a></li> 
     280</ul> 
     281</li> 
     282</ul> 
     283</li> 
     284<li><a class="reference internal" href="#building-instances" id="id53">9.3&nbsp;&nbsp;&nbsp;Building instances</a></li> 
     285<li><a class="reference internal" href="#using-the-subclass-module" id="id54">9.4&nbsp;&nbsp;&nbsp;Using the subclass module</a></li> 
     286<li><a class="reference internal" href="#elements-with-attributes-but-no-nested-children" id="id55">9.5&nbsp;&nbsp;&nbsp;Elements with attributes but no nested children</a></li> 
     287<li><a class="reference internal" href="#id3" id="id56">9.6&nbsp;&nbsp;&nbsp;Mixed content</a></li> 
     288<li><a class="reference internal" href="#id5" id="id57">9.7&nbsp;&nbsp;&nbsp;anyAttribute</a></li> 
     289<li><a class="reference internal" href="#user-methods" id="id58">9.8&nbsp;&nbsp;&nbsp;User Methods</a></li> 
     290</ul> 
     291</li> 
     292<li><a class="reference internal" href="#how-to-modify-the-generated-code" id="id59">10&nbsp;&nbsp;&nbsp;How-to Modify the Generated Code</a><ul class="auto-toc"> 
     293<li><a class="reference internal" href="#adding-features-to-class-definitions" id="id60">10.1&nbsp;&nbsp;&nbsp;Adding features to class definitions</a></li> 
     294</ul> 
     295</li> 
     296<li><a class="reference internal" href="#examples-and-demonstrations" id="id61">11&nbsp;&nbsp;&nbsp;Examples and Demonstrations</a></li> 
     297<li><a class="reference internal" href="#sample-code-and-extensions" id="id62">12&nbsp;&nbsp;&nbsp;Sample Code and Extensions</a><ul class="auto-toc"> 
     298<li><a class="reference internal" href="#capturing-xs-date-elements-as-dates" id="id63">12.1&nbsp;&nbsp;&nbsp;Capturing xs:date elements as dates</a></li> 
     299</ul> 
     300</li> 
     301<li><a class="reference internal" href="#limitations-of-generateds" id="id64">13&nbsp;&nbsp;&nbsp;Limitations of generateDS</a><ul class="auto-toc"> 
     302<li><a class="reference internal" href="#xml-schema-limitations" id="id65">13.1&nbsp;&nbsp;&nbsp;XML Schema limitations</a></li> 
     303<li><a class="reference internal" href="#large-documents" id="id66">13.2&nbsp;&nbsp;&nbsp;Large documents</a></li> 
     304</ul> 
     305</li> 
     306<li><a class="reference internal" href="#includes-the-xml-schema-include-element" id="id67">14&nbsp;&nbsp;&nbsp;Includes -- The XML Schema include element</a></li> 
     307<li><a class="reference internal" href="#acknowledgment" id="id68">15&nbsp;&nbsp;&nbsp;Acknowledgment</a></li> 
     308<li><a class="reference internal" href="#see-also" id="id69">16&nbsp;&nbsp;&nbsp;See Also</a></li> 
    304309</ul> 
    305310</div> 
    … …  
    362367<h2><a class="toc-backref" href="#id8">2.1&nbsp;&nbsp;&nbsp;Download</a></h2> 
    363368<p>You can find the distribution here: 
    364 <a class="reference external" href="http://www.rexx.com/~dkuhlman/generateDS-1.11a.tar.gz">http://www.rexx.com/~dkuhlman/generateDS-1.11a.tar.gz</a></p> 
     369<a class="reference external" href="http://www.rexx.com/~dkuhlman/generateDS-1.13a.tar.gz">http://www.rexx.com/~dkuhlman/generateDS-1.13a.tar.gz</a></p> 
    365370<p>It is also available at SourceForge: 
    366371<a class="reference external" href="http://sourceforge.net/projects/generateds/">http://sourceforge.net/projects/generateds/</a></p> 
    … …  
    413418    -s &lt;subclassfilename&gt;    Output file name for subclasses 
    414419    -p &lt;prefix&gt;              Prefix string to be pre-pended to the class names 
    415     -n &lt;mappingfilename&gt;     Transform names with table in mappingfilename. 
    416420    -f                       Force creation of output files.  Do not ask. 
    417421    -a &lt;namespaceabbrev&gt;     Namespace abbreviation, e.g. &quot;xsd:&quot;. 
    … …  
    429433                             instead of get_var() and set_var(). 
    430434    --user-methods= &lt;module&gt;, 
    431     -u &lt;module               Optional module containing user methods.  See 
     435    -u &lt;module&gt;              Optional module containing user methods.  See 
    432436                             section &quot;User Methods&quot; in the documentation. 
     437    --no-process-includes    Do not process included XML Schema files.  By 
     438                             default, generateDS.py will insert content 
     439                             from files referenced by &lt;include ... /&gt; 
     440                             elements into the XML Schema to be processed. 
    433441</pre> 
    434442<p>The following command line flags are recognized by <tt class="docutils literal"><span class="pre">generateDS.py</span></tt>:</p> 
    … …  
    524532classes as specified in the indicated module.  For more 
    525533information, see section <a class="reference internal" href="#user-methods">User Methods</a>.</dd> 
     534<dt>no-process-includes</dt> 
     535<dd>Do not process included XML Schema files.  By default, 
     536generateDS.py will insert content from files referenced by 
     537<tt class="docutils literal"><span class="pre">&lt;include</span> <span class="pre">...</span> <span class="pre">/&gt;</span></tt> elements into the XML Schema to be processed. 
     538See section <a class="reference internal" href="#include-file-processing">Include file processing</a>.</dd> 
    526539</dl> 
    527540</div> 
    528 <div class="section" id="name-conficts"> 
    529 <h2><a class="toc-backref" href="#id13">4.2&nbsp;&nbsp;&nbsp;Name conficts</a></h2> 
     541<div class="section" id="name-conflicts"> 
     542<h2><a class="toc-backref" href="#id13">4.2&nbsp;&nbsp;&nbsp;Name conflicts</a></h2> 
    530543<div class="section" id="conflicts-with-python-keywords"> 
    531544<h3><a class="toc-backref" href="#id14">4.2.1&nbsp;&nbsp;&nbsp;Conflicts with Python keywords</a></h3> 
    … …  
    549562</div> 
    550563</div> 
     564</div> 
    551565<div class="section" id="supported-features-of-xml-schema"> 
    552 <h2><a class="toc-backref" href="#id16">4.3&nbsp;&nbsp;&nbsp;Supported features of XML Schema</a></h2> 
     566<h1><a class="toc-backref" href="#id16">5&nbsp;&nbsp;&nbsp;Supported features of XML Schema</a></h1> 
    553567<p>The following constructs in the XML Schema are supported:</p> 
    554568<ul class="simple"> 
    … …  
    564578to generateDS</a>.</p> 
    565579<div class="section" id="attributes-no-nested-children"> 
    566 <h3><a class="toc-backref" href="#id17">4.3.1&nbsp;&nbsp;&nbsp;Attributes + no nested children</a></h3> 
     580<h2><a class="toc-backref" href="#id17">5.1&nbsp;&nbsp;&nbsp;Attributes + no nested children</a></h2> 
    567581<p>Element definitions that contain attributes but <em>no</em> nested child 
    568582elements provide access to their data content through getter and 
    … …  
    571585</div> 
    572586<div class="section" id="mixed-content"> 
    573 <h3><a class="toc-backref" href="#id18">4.3.2&nbsp;&nbsp;&nbsp;Mixed content</a></h3> 
     587<h2><a class="toc-backref" href="#id18">5.2&nbsp;&nbsp;&nbsp;Mixed content</a></h2> 
    574588<p>Elements that are defined to contain both text and nested child 
    575589elements have &quot;mixed content&quot;.  <tt class="docutils literal"><span class="pre">generateDS.py</span></tt> provides access 
    … …  
    584598</div> 
    585599<div class="section" id="anyattribute"> 
    586 <h3><a class="toc-backref" href="#id19">4.3.3&nbsp;&nbsp;&nbsp;anyAttribute</a></h3> 
     600<h2><a class="toc-backref" href="#id19">5.3&nbsp;&nbsp;&nbsp;anyAttribute</a></h2> 
    587601<p><tt class="docutils literal"><span class="pre">generateDS.py</span></tt> supports <tt class="docutils literal"><span class="pre">anyAttribute</span></tt>.  For example, if an 
    588602element is defined as follows:</p> 
    … …  
    604618</div> 
    605619<div class="section" id="element-extensions"> 
    606 <h3><a class="toc-backref" href="#id20">4.3.4&nbsp;&nbsp;&nbsp;Element extensions</a></h3> 
     620<h2><a class="toc-backref" href="#id20">5.4&nbsp;&nbsp;&nbsp;Element extensions</a></h2> 
    607621<p><tt class="docutils literal"><span class="pre">generateDS.py</span></tt> now generates subclasses for extensions, that is 
    608622when an element definition contains something like this:</p> 
    … …  
    623637</div> 
    624638<div class="section" id="attribute-groups"> 
    625 <h3><a class="toc-backref" href="#id21">4.3.5&nbsp;&nbsp;&nbsp;Attribute groups</a></h3> 
     639<h2><a class="toc-backref" href="#id21">5.5&nbsp;&nbsp;&nbsp;Attribute groups</a></h2> 
    626640<p><tt class="docutils literal"><span class="pre">generateDS.py</span></tt> now handles definition and use of attribute 
    627641groups.  For example: the use of something like the following:</p> 
    … …  
    645659</div> 
    646660<div class="section" id="substitution-groups"> 
    647 <h3><a class="toc-backref" href="#id22">4.3.6&nbsp;&nbsp;&nbsp;Substitution groups</a></h3> 
     661<h2><a class="toc-backref" href="#id22">5.6&nbsp;&nbsp;&nbsp;Substitution groups</a></h2> 
    648662<p><tt class="docutils literal"><span class="pre">generateDS.py</span></tt> now handles a limited range of substitution 
    649663groups, but, there is an important <strong>limitation</strong>, in particular 
    … …  
    656670</div> 
    657671<div class="section" id="primitive-types"> 
    658 <h3><a class="toc-backref" href="#id23">4.3.7&nbsp;&nbsp;&nbsp;Primitive types</a></h3> 
     672<h2><a class="toc-backref" href="#id23">5.7&nbsp;&nbsp;&nbsp;Primitive types</a></h2> 
    659673<p><tt class="docutils literal"><span class="pre">generateDS.py</span></tt> supports some, but not all, simple types defined 
    660674in &quot;XML Schema Part 0: Primer Second Edition&quot; ( 
    … …  
    683697</div> 
    684698<div class="section" id="simpletype"> 
    685 <h3><a class="toc-backref" href="#id24">4.3.8&nbsp;&nbsp;&nbsp;simpleType</a></h3> 
     699<h2><a class="toc-backref" href="#id24">5.8&nbsp;&nbsp;&nbsp;simpleType</a></h2> 
    686700<p><tt class="docutils literal"><span class="pre">generateDS.py</span></tt> generates minimal support for members defined as 
    687701<tt class="docutils literal"><span class="pre">simpleType</span></tt>.  However, the code generated by <tt class="docutils literal"><span class="pre">generateDS.py</span></tt> 
    688 does <strong>not</strong> enforce rescriptions.  For notes on how to enforce 
     702does <strong>not</strong> enforce restrictions.  For notes on how to enforce 
    689703restrictions, see section <a class="reference internal" href="#simpletype-and-validators">simpleType and validators</a>.</p> 
    690704<p>A <tt class="docutils literal"><span class="pre">simpleType</span></tt> can be a restriction on a primitive type or on a 
    … …  
    722736</div> 
    723737<div class="section" id="list-values-optional-values-maxoccurs-etc"> 
    724 <h3><a class="toc-backref" href="#id25">4.3.9&nbsp;&nbsp;&nbsp;List values, optional values, maxOccurs, etc.</a></h3> 
     738<h2><a class="toc-backref" href="#id25">5.9&nbsp;&nbsp;&nbsp;List values, optional values, maxOccurs, etc.</a></h2> 
    725739<p>For elements defined with <tt class="docutils literal"><span class="pre">maxOccurs=&quot;unbounded&quot;</span></tt>, 
    726740<tt class="docutils literal"><span class="pre">generateDS.py</span></tt> generates code that processes a list of elements.</p> 
    … …  
    730744</div> 
    731745<div class="section" id="simpletype-and-validators"> 
    732 <h3><a class="toc-backref" href="#id26">4.3.10&nbsp;&nbsp;&nbsp;simpleType and validators</a></h3> 
     746<h2><a class="toc-backref" href="#id26">5.10&nbsp;&nbsp;&nbsp;simpleType and validators</a></h2> 
    733747<p>Here are a few notes that should help you use validator methods to 
    734748enforce restrictions.</p> 
    … …  
    843857</ul> 
    844858</div> 
     859<div class="section" id="include-file-processing"> 
     860<h2><a class="toc-backref" href="#id27">5.11&nbsp;&nbsp;&nbsp;Include file processing</a></h2> 
     861<p>By default, generateDS.py will insert content from files referenced by 
     862<tt class="docutils literal"><span class="pre">include</span></tt> elements into the XML Schema to be processed.  This 
     863behavior can be turned off by using the <tt class="docutils literal"><span class="pre">--no-process-includes</span></tt> 
     864command line flag.</p> 
     865<p><tt class="docutils literal"><span class="pre">include</span></tt> elements are processed and the referenced content is 
     866inserted in the XML Schema by importing and using 
     867<tt class="docutils literal"><span class="pre">process_includes.py</span></tt>, which is included in the <tt class="docutils literal"><span class="pre">generateDS.py</span></tt> 
     868distribution.</p> 
     869<p><tt class="docutils literal"><span class="pre">process_includes.py</span></tt> will use either <tt class="docutils literal"><span class="pre">lxml</span></tt> or <tt class="docutils literal"><span class="pre">ElementTree</span></tt>, 
     870but its preference is <tt class="docutils literal"><span class="pre">lxml</span></tt> because <tt class="docutils literal"><span class="pre">lxml</span></tt> attempts to preserve 
     871namespace prefixes.  So if your XML Schemas have <tt class="docutils literal"><span class="pre">&lt;include</span> <span class="pre">...</span> <span class="pre">/&gt;</span></tt> 
     872elements in them, you might want to consider installing <tt class="docutils literal"><span class="pre">lxml</span></tt>, even 
     873though <tt class="docutils literal"><span class="pre">ElementTree</span></tt> is in the Python standard library for Python 
     874versions &gt;= 2.5.</p> 
    845875</div> 
    846876</div> 
    847877<div class="section" id="the-xml-schema-input-to-generateds"> 
    848 <h1><a class="toc-backref" href="#id27">5&nbsp;&nbsp;&nbsp;The XML Schema Input to generateDS</a></h1> 
     878<h1><a class="toc-backref" href="#id28">6&nbsp;&nbsp;&nbsp;The XML Schema Input to generateDS</a></h1> 
    849879<p><tt class="docutils literal"><span class="pre">generateDS.py</span></tt> actually accepts a subset of XML Schema. 
    850880The sample XML Schema file should give you a picture of how to 
    … …  
    959989</ul> 
    960990<div class="section" id="additional-constructions"> 
    961 <h2><a class="toc-backref" href="#id28">5.1&nbsp;&nbsp;&nbsp;Additional constructions</a></h2> 
     991<h2><a class="toc-backref" href="#id29">6.1&nbsp;&nbsp;&nbsp;Additional constructions</a></h2> 
    962992<p>Here are a few additional constructions that <tt class="docutils literal"><span class="pre">generateDS.py</span></tt> 
    963993understands.</p> 
    964994<div class="section" id="complextype-at-top-level"> 
    965 <h3><a class="toc-backref" href="#id29">5.1.1&nbsp;&nbsp;&nbsp;&lt;complexType&gt; at top-level</a></h3> 
     995<h3><a class="toc-backref" href="#id30">6.1.1&nbsp;&nbsp;&nbsp;&lt;complexType&gt; at top-level</a></h3> 
    966996<p>You can use the &lt;complexType&gt; element at top level (instead of 
    967997&lt;element&gt;) to define an element. So, for example, instead of:</p> 
    … …  
    9871017</div> 
    9881018<div class="section" id="use-of-ref-instead-of-name-and-type-attributes"> 
    989 <h3><a class="toc-backref" href="#id30">5.1.2&nbsp;&nbsp;&nbsp;Use of &quot;ref&quot; instead of &quot;name&quot; and &quot;type&quot; attributes</a></h3> 
     1019<h3><a class="toc-backref" href="#id31">6.1.2&nbsp;&nbsp;&nbsp;Use of &quot;ref&quot; instead of &quot;name&quot; and &quot;type&quot; attributes</a></h3> 
    9901020<p>You can use the &quot;ref&quot; attribute to refer to another element 
    9911021definition, instead of using the &quot;name&quot; and &quot;type&quot; attributes. So, 
    … …  
    10121042</div> 
    10131043<div class="section" id="extension-types"> 
    1014 <h3><a class="toc-backref" href="#id31">5.1.3&nbsp;&nbsp;&nbsp;Extension types</a></h3> 
     1044<h3><a class="toc-backref" href="#id32">6.1.3&nbsp;&nbsp;&nbsp;Extension types</a></h3> 
    10151045<p><tt class="docutils literal"><span class="pre">generateDS.py</span></tt> generates a subclass for each element that that 
    10161046is defined as the extension of a base element.  So, for the 
    … …  
    10341064</div> 
    10351065<div class="section" id="elements-containing-mixed-content"> 
    1036 <h3><a class="toc-backref" href="#id32">5.1.4&nbsp;&nbsp;&nbsp;Elements containing mixed content</a></h3> 
     1066<h3><a class="toc-backref" href="#id33">6.1.4&nbsp;&nbsp;&nbsp;Elements containing mixed content</a></h3> 
    10371067<p><tt class="docutils literal"><span class="pre">generateDS.py</span></tt> generates special code to handle elements 
    10381068defined as containing mixed content, that is elements defined with 
    … …  
    10431073</div> 
    10441074<div class="section" id="id1"> 
    1045 <span id="xmlbehaviors"></span><h1><a class="toc-backref" href="#id33">6&nbsp;&nbsp;&nbsp;XMLBehaviors</a></h1> 
     1075<span id="xmlbehaviors"></span><h1><a class="toc-backref" href="#id34">7&nbsp;&nbsp;&nbsp;XMLBehaviors</a></h1> 
    10461076<p>With the use of the &quot;-b&quot; command line flag, <tt class="docutils literal"><span class="pre">generateDS.py</span></tt> will 
    10471077also accept as input an XML document instance that describes 
    … …  
    10551085our application development project for Quixote.</p> 
    10561086<div class="section" id="the-xmlbehaviors-input-file"> 
    1057 <h2><a class="toc-backref" href="#id34">6.1&nbsp;&nbsp;&nbsp;The XMLBehaviors input file</a></h2> 
     1087<h2><a class="toc-backref" href="#id35">7.1&nbsp;&nbsp;&nbsp;The XMLBehaviors input file</a></h2> 
    10581088<p>This section describes the XMLBehavior XML document that is used 
    10591089as input to <tt class="docutils literal"><span class="pre">generateDS.py</span></tt>.  The XMLBehavior XML document is an 
    … …  
    11281158</div> 
    11291159<div class="section" id="implementing-other-sources-for-implementation-bodies"> 
    1130 <h2><a class="toc-backref" href="#id35">6.2&nbsp;&nbsp;&nbsp;Implementing other sources for implementation bodies</a></h2> 
     1160<h2><a class="toc-backref" href="#id36">7.2&nbsp;&nbsp;&nbsp;Implementing other sources for implementation bodies</a></h2> 
    11311161<p><tt class="docutils literal"><span class="pre">generateDS.py</span></tt> contains a function <tt class="docutils literal"><span class="pre">get_impl_body()</span></tt> that 
    11321162implements the ability to retrieve implementation bodies.  The 
    … …  
    11691199</div> 
    11701200<div class="section" id="additional-features"> 
    1171 <h1><a class="toc-backref" href="#id36">7&nbsp;&nbsp;&nbsp;Additional Features</a></h1> 
     1201<h1><a class="toc-backref" href="#id37">8&nbsp;&nbsp;&nbsp;Additional Features</a></h1> 
    11721202<p>Here are additional features, contributed by users such as Chris 
    11731203Allan.  Many thanks.</p> 
    11741204<div class="section" id="xsd-list-element-support"> 
    1175 <h2><a class="toc-backref" href="#id37">7.1&nbsp;&nbsp;&nbsp;xsd:list element support</a></h2> 
     1205<h2><a class="toc-backref" href="#id38">8.1&nbsp;&nbsp;&nbsp;xsd:list element support</a></h2> 
    11761206<p>xsd:list elements can be used with a child xsd:simpleType which 
    11771207confuses the XschemaHandler stack unrolling.  xsd:list element 
    … …  
    11911221</div> 
    11921222<div class="section" id="xsd-enumeration-support"> 
    1193 <h2><a class="toc-backref" href="#id38">7.2&nbsp;&nbsp;&nbsp;xsd:enumeration support</a></h2> 
     1223<h2><a class="toc-backref" href="#id39">8.2&nbsp;&nbsp;&nbsp;xsd:enumeration support</a></h2> 
    11941224<p>The enumerated values for the parent element are resolved and made 
    11951225available through the instance attribute <tt class="docutils literal"><span class="pre">values</span></tt>.</p> 
    11961226</div> 
    11971227<div class="section" id="xsd-union-support"> 
    1198 <h2><a class="toc-backref" href="#id39">7.3&nbsp;&nbsp;&nbsp;xsd:union support</a></h2> 
     1228<h2><a class="toc-backref" href="#id40">8.3&nbsp;&nbsp;&nbsp;xsd:union support</a></h2> 
    11991229<p>In order to properly resolve and query types which are unions in 
    12001230an XML Schema, an element's membership in an xsd:union is 
    … …  
    12021232</div> 
    12031233<div class="section" id="extended-xsd-choice-support"> 
    1204 <h2><a class="toc-backref" href="#id40">7.4&nbsp;&nbsp;&nbsp;Extended xsd:choice support</a></h2> 
     1234<h2><a class="toc-backref" href="#id41">8.4&nbsp;&nbsp;&nbsp;Extended xsd:choice support</a></h2> 
    12051235<p>When a parent xsd:choice is exists, an element's &quot;maxOccurs&quot; and 
    12061236&quot;minOccurs&quot; values can be inherited from the xsd:choice rather 
    … …  
    12221252</div> 
    12231253<div class="section" id="minoccurs-attribute-support"> 
    1224 <h2><a class="toc-backref" href="#id41">7.5&nbsp;&nbsp;&nbsp;minOccurs attribute support</a></h2> 
     1254<h2><a class="toc-backref" href="#id42">8.5&nbsp;&nbsp;&nbsp;minOccurs attribute support</a></h2> 
    12251255<p>Some applications require the availability of the &quot;minOccurs&quot; 
    12261256attribute in addition to the previous minimal support of 
    … …  
    12291259</div> 
    12301260<div class="section" id="more-thorough-content-type-and-base-type-resolution"> 
    1231 <h2><a class="toc-backref" href="#id42">7.6&nbsp;&nbsp;&nbsp;More thorough content type and base type resolution</a></h2> 
     1261<h2><a class="toc-backref" href="#id43">8.6&nbsp;&nbsp;&nbsp;More thorough content type and base type resolution</a></h2> 
    12321262<p>The previous content type and base type resolution is insufficient 
    12331263for some needs.  Basically it was unable to handle more complex 
    … …  
    12421272</div> 
    12431273<div class="section" id="making-top-level-simpletypes-available-from-xschemahandler"> 
    1244 <h2><a class="toc-backref" href="#id43">7.7&nbsp;&nbsp;&nbsp;Making top level simpleTypes available from XschemaHandler</a></h2> 
     1274<h2><a class="toc-backref" href="#id44">8.7&nbsp;&nbsp;&nbsp;Making top level simpleTypes available from XschemaHandler</a></h2> 
    12451275<p>Some developers working to extend the analysis and code generation 
    12461276in <tt class="docutils literal"><span class="pre">generateDS.py</span></tt> may be helped by additional information 
    … …  
    12541284</div> 
    12551285<div class="section" id="how-to-use-the-generated-source-code"> 
    1256 <h1><a class="toc-backref" href="#id44">8&nbsp;&nbsp;&nbsp;How-to Use the Generated Source Code</a></h1> 
     1286<h1><a class="toc-backref" href="#id45">9&nbsp;&nbsp;&nbsp;How-to Use the Generated Source Code</a></h1> 
    12571287<div class="section" id="the-parsing-functions"> 
    1258 <h2><a class="toc-backref" href="#id45">8.1&nbsp;&nbsp;&nbsp;The parsing functions</a></h2> 
     1288<h2><a class="toc-backref" href="#id46">9.1&nbsp;&nbsp;&nbsp;The parsing functions</a></h2> 
    12591289<p>The simplest use is to call one of the parsing functions in the 
    12601290generated source file. You may be able to use one of these 
    … …  
    12821312</div> 
    12831313<div class="section" id="the-export-methods"> 
    1284 <h2><a class="toc-backref" href="#id46">8.2&nbsp;&nbsp;&nbsp;The export methods</a></h2> 
     1314<h2><a class="toc-backref" href="#id47">9.2&nbsp;&nbsp;&nbsp;The export methods</a></h2> 
    12851315<p>The generated classes contain methods <tt class="docutils literal"><span class="pre">export</span></tt> and 
    12861316<tt class="docutils literal"><span class="pre">exportLiteral</span></tt> which can be called to export classes to several 
    … …  
    12891319functions for examples showing how to call the export methods.</p> 
    12901320<div class="section" id="method-export"> 
    1291 <h3><a class="toc-backref" href="#id47">8.2.1&nbsp;&nbsp;&nbsp;Method export</a></h3> 
     1321<h3><a class="toc-backref" href="#id48">9.2.1&nbsp;&nbsp;&nbsp;Method export</a></h3> 
    12921322<p>The export method in generated classes writes out an XML document 
    12931323that represents the instance that contains it and its child 
    … …  
    12981328</div> 
    12991329<div class="section" id="method-exportliteral"> 
    1300 <h3><a class="toc-backref" href="#id48">8.2.2&nbsp;&nbsp;&nbsp;Method <tt class="docutils literal"><span class="pre">exportLiteral</span></tt></a></h3> 
     1330<h3><a class="toc-backref" href="#id49">9.2.2&nbsp;&nbsp;&nbsp;Method <tt class="docutils literal"><span class="pre">exportLiteral</span></tt></a></h3> 
    13011331<p><tt class="docutils literal"><span class="pre">generateDS.py</span></tt> generates Python classes that represent the 
    13021332elements in an XML document, given an Xschema definition of the 
    … …  
    13051335classes that represent an XML document.</p> 
    13061336<div class="section" id="what-it-does"> 
    1307 <h4><a class="toc-backref" href="#id49">8.2.2.1&nbsp;&nbsp;&nbsp;What It Does</a></h4> 
     1337<h4><a class="toc-backref" href="#id50">9.2.2.1&nbsp;&nbsp;&nbsp;What It Does</a></h4> 
    13081338<p>When <tt class="docutils literal"><span class="pre">generateDS.py</span></tt> generates the Python source code for your 
    13091339classes, this new feature also generates an <tt class="docutils literal"><span class="pre">exportLiteral</span></tt> 
    … …  
    13191349</div> 
    13201350<div class="section" id="why-you-might-care"> 
    1321 <h4><a class="toc-backref" href="#id50">8.2.2.2&nbsp;&nbsp;&nbsp;Why You Might Care</a></h4> 
     1351<h4><a class="toc-backref" href="#id51">9.2.2.2&nbsp;&nbsp;&nbsp;Why You Might Care</a></h4> 
    13221352<p><tt class="docutils literal"><span class="pre">generateDS.py</span></tt> was designed and built with the assumption that 
    13231353we are <em>not</em> interested in marking up text content at all.  What