ddialliance / ddi-c_2

DDI Codebook schema 2.x
https://ddialliance.org/Specification/DDI-Codebook/
Other
1 stars 3 forks source link

catStat attributes #20

Closed dusadrian closed 3 months ago

dusadrian commented 3 months ago

In the description of the element catStat, we have:

<xhtml:p>The following attributes provide information on the weighting used ... </xhtml:p>
<xhtml:p>"wgtd" expressed as wgtd or not-wgtd, </xhtml:p>
<xhtml:p>"wgt-var" a reference to the variable containing the weight used or </xhtml:p>
<xhtml:p>"wgt" the value of a standard weight.</xhtml:p>

From this description, I get that either "wgt-var" or "wgt" attributes can be used. If so, shouldn't these attributes be enclosed into an <xs:choice> validation?

wlthomas commented 3 months ago

Attributes are all 0..1 unless declared as required or provided with a default value in which case they are 1..1

Choice is only valid for elements. Note also that attributes are not found within sequence as they have no specified order.

On Sat, Jul 20, 2024, 08:22 Adrian Dușa @.***> wrote:

In the description of the element catStat, we have:

The following attributes provide information on the weighting used ... "wgtd" expressed as wgtd or not-wgtd, "wgt-var" a reference to the variable containing the weight used or "wgt" the value of a standard weight. From this description, I get that either "wgt-var" or "wgt" attributes can be used. If so, shouldn't these attributes be enclosed into an validation? — Reply to this email directly, view it on GitHub , or unsubscribe . You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
dusadrian commented 3 months ago

I see. For some reason, I thought all complexContents can be wrapped in a xs:choice but that is indeed possible for elements only.