Menu

#18 Attribute Groups docs has missing code fragment

1.0
open
nobody
None
2021-08-26
2021-08-25
John Hagen
No

The Attribute Groups docs section seems to have some missing code in one of the fragments:

https://www.davekuhlman.org/generateDS.html#attribute-groups

<xs:element name="person">
    <xs:complexType mixed="0">
        <xs:attributeGroup ref="favorites" />
        o
        o
        o

Should this be fixed?

Discussion

  • Dave Kuhlman

    Dave Kuhlman - 2021-08-25

    John,

    Thanks for your report.

    With respect to the attributeGroup, I've modified example so that it looks like the following:

    ``generateDS.py`` now handles definition and use of attribute
    groups.  For example: the use of something like the following::
    
    
        <xs:attributeGroup name="favorites">
            <xs:attribute name="fruit" />
            <xs:attribute name="vegetable" />
        </xs:attributeGroup>
    
    And, a reference or use like the following::
    
        <xs:element name="person" type="personType"/>
        <xs:complexType name="personType" mixed="0">
            <xs:attributeGroup ref="favorites" />
        </xs:complexType>
    
    Results in generation of class ``personType`` that contains members
    ``fruit`` and ``vegetable``.
    

    Is that a little more clear?

    Dave

     
  • John Hagen

    John Hagen - 2021-08-26

    Yes, this is a lot more clear. Thanks.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.