Schema development for ASN.X module


I have started working on schema for ASN.X data modules. We can make use of this post in order to discuss ideas and issues regarding ASN.X modules, So that I can support those changes in Schema.

To start with I have below questions:


  1. Consider the sequence below, typeField and valueField elements have different sequences in different files. Do we need to allow such flexible sequences? OR the need for a strict sequence like typeField should always come after valueField. This is one example, In general what we prefer the flexible sequence or the strict sequence.

     <namedClass name="ATTRIBUTE">
        <typeField name="Type"/>
        <valueField name="id" unique="true" type="asnx:OBJECT-IDENTIFIER"/>

More such examples a. namedClass should appear after namedType element. b. optional should appear after all

  1. Found below two versions of tagged element, Do we need to support both?

The first block has element which also can also be defined directly using @type for tagged element.

But It can make sense in case the is non empty. But here we can also replace the first instance as - <type><tagged number="0" tagging="explicit" type="DataObject"/></type>

  <tagged number="0">
    <type explicit="true">

  <tagged number="3" tagging="explicit" type="Extensions"/>

Thanks, Bharat

In regards to question 1: As far as I can understand from the spec, RFC 4912 on page 154 typeField and valueField can come in any order, any number of times. So if we want to follow the spec as close as possible we should allow this as well. However, whether we need to support such flexibility or if it is sufficient to require at typeField, valueField order I think is up to @weiwu.zhang

In regards to question 2: I would say the latter is sufficient. In fact, when loading at RFC 4912 I cannot find an example of usage of tagged followed by an empty sequence element. In fact it does not seem to make much sense with an empty sequence since, as far as I can understand, this means that we simply tag a sequence of nothing. So I would definitely just go for just the latter one.