I've been asked to write a program that will generate HTML documentation
for the schemas used by the company I work for. Using XMLBeans I got off
to a flying start, but now I've run into a small issue.

I have the following type in a schema I'm working with:

<xs:simpleType name="DURATIONCODE_TYPE" doc:table="DURATIONCODE">
    <xs:annotation>
        <xs:documentation>Type for duration in months</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:positiveInteger">
        <xs:totalDigits value="3" />
        <xs:enumeration value="1" doc:description="1 month"/>
        <xs:enumeration value="3" doc:description="3 months"/>
        <xs:enumeration value="6" doc:description="6 months"/>
        <xs:enumeration value="12" doc:description="1 year"/>
    </xs:restriction>
</xs:simpleType>

There are other types like currency and country codes that use a similar
format, where the description makes a bit more sense.

My problem is that I can't figure out how to access the doc:description
bit of the enumeration values. My gut feeling is that it's illegal to
put this dreamed-up attribute there. If I'm right, what's the proper way
to document the specific values of an enumeration within a schema?

Thanks in advance for any advice you may have.

Kind regards,

Tom Wirschell


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to