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

Context Navigation

  • ← Previous Changeset
  • Next Changeset →

Changeset 180

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

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

Location:
Xml/xsd-fu/trunk/generateDS
Files:
12 modified

  • Demos/People/people.xml (modified) (2 diffs)
  • Demos/Xmlbehavior/README (modified) (1 diff)
  • PKG-INFO (modified) (1 diff)
  • README (modified) (1 diff)
  • gends_user_methods.py (modified) (1 diff)
  • generateDS.html (modified) (53 diffs)
  • generateDS.py (modified) (66 diffs)
  • process_includes.py (modified) (6 diffs)
  • setup.py (modified) (1 diff)
  • tests/out1sub.py (modified) (1 diff)
  • tests/out1sup.py (modified) (27 diffs)
  • tests/people.xsd (modified) (1 diff)

Legend:

Unmodified
Added
Removed
  • Xml/xsd-fu/trunk/generateDS/Demos/People/people.xml

    r111 r180  
    2626        <interest>cats</interest> 
    2727        <interest>dogs</interest> 
     28        <imagesize>78</imagesize> 
     29        <imageproperty attrib1="abc &lt;def> ghi">some pretty stuff</imageproperty> 
    2830        <category>8</category> 
    2931        <promoter> 
    … …  
    4042            <client> 
    4143                <fullname>Arnold Applebee</fullname> 
    42                 <refid>10001</refid> 
     44                <refid>10002</refid> 
     45            </client> 
     46        </promoter> 
     47        <promoter> 
     48            <client> 
     49                <fullname>Charlie Chuckles</fullname> 
     50                <refid>10003</refid> 
    4351            </client> 
    4452        </promoter> 
  • Xml/xsd-fu/trunk/generateDS/Demos/Xmlbehavior/README

    r111 r180  
    15151. Generate the super-class file: 
    1616 
    17        python /generateDS.py -o po.py po.xsd 
     17       python generateDS.py -o po.py po.xsd 
    1818 
    19192. Generate the sub-class including the methods described in 
  • Xml/xsd-fu/trunk/generateDS/PKG-INFO

    r112 r180  
    11Metadata-Version: 1.0 
    22Name: generateDS 
    3 Version: 1.11a 
     3Version: 1.13a 
    44Summary: Generation of Python data structures and XML parser from Xschema 
    55Home-page: http://www.rexx.com/~dkuhlman 
  • Xml/xsd-fu/trunk/generateDS/README

    r112 r180  
    140140Change history 
    141141-------------- 
     142 
     143Version 1.13a (05/26/2008): 
     144  * Added support for generating namespace prefix during export 
     145    if the XML Schema specifies the targetNamespace.  Thanks to 
     146    Andre Adrian for implementing this feature.  
     147 
     148Version 1.12b (05/20/2008): 
     149  * Patches to escape special XML characters (entities) in valueOf 
     150    and attributes.  Thanks to Darius Powell for this fix. 
     151 
     152Version 1.12a (05/06/2008): 
     153  * Fix to name used to generate validation method. 
     154  * Embedded process_includes.py functionality into generateDS.py. 
     155 
     156Version 1.11d (04/28/2008) 
     157  * Added support for specifying default values in attributes 
     158    and elements that are primitive types. 
     159 
     160Version 1.11c (03/31/2008) 
     161  * A fix in enumeration building code. 
     162 
     163Version 1.11b (11/19/2007) 
     164  * Fixed bug that caused an infinite loop when a class has a 
     165    simple type as a base/super class. 
     166  * Added additional simple types to the list of recognized simple 
     167    types.  For a list of simple types, see: 
     168    http://www.w3.org/TR/xmlschema-0/#SimpleTypeFacets 
     169  * Added additional Python keywords to list of transformed names. 
     170    See global variable NameTable. 
    142171 
    143172Version 1.11a (10/11/2007) 
  • Xml/xsd-fu/trunk/generateDS/gends_user_methods.py

    r111 r180  
    9090method1 = MethodSpec(name='walk_and_update', 
    9191    source='''\ 
    92     def walk_and_update(self, brackets): 
     92    def walk_and_update(self): 
    9393        members = %(class_name)s._member_data_items 
    9494        for member in members: 
    9595            obj1 = getattr(self, member.get_name()) 
    96             if member.get_data_type() == 'xs:string': 
    97                 newvalue = '%%s%%s%%s' %% (brackets[0], obj1, brackets[1], ) 
     96            if member.get_data_type() == 'xs:date': 
     97                newvalue = date_calcs.date_from_string(obj1) 
    9898                setattr(self, member.get_name(), newvalue) 
    9999            elif member.get_container(): 
    100100                for child in obj1: 
    101101                    if type(child) == types.InstanceType: 
    102                         child.walk_and_update(brackets) 
     102                        child.walk_and_update() 
    103103            else: 
    104104                obj1 = getattr(self, member.get_name()) 
    105105                if type(obj1) == types.InstanceType: 
    106                     obj1.walk_and_update(brackets) 
     106                    obj1.walk_and_update() 
     107        if %(class_name)s.superclass != None: 
     108          %(class_name)s.superclass.walk_and_update(self) 
    107109''', 
    108110    # class_names=r'^Employee$|^[a-zA-Z]*Dependent$', 
  • 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>