From: | Alan Powell/UK/IBM@IBMGB |
To: | Suman Kalia/Toronto/IBM@IBMCA |
Cc: | dfdl-wg@ogf.org |
Date: | 03/19/2009 02:11 PM |
Subject: | Precedence of short and long form properties |
One the last work group call you raised a question about precedence of the same property in short and long form that we were unable to answer.
The last paragraph of section 10.3 provides the answer
10.3 Annotation Positioning
As described in Section ý5.2, DFDL annotations are positioned at specific annotation points within a DFDL schema. The table below shows the valid annotation points.
Annotation Point |
Property Scope
|
Schema declaration |
Invalid
Only top level defining forms (e.g., dfdl:defineFormat) can appear at top level of the schema. These definitions are globally available. Nothing is put into effect about the format of data by these top-level definitions. |
Element declaration |
Valid local
|
Element reference |
Valid local
|
Complex type definition |
Valid scoped over contents
|
Simple type definition |
Valid local
|
Sequence declaration |
Valid local
|
Choice declaration |
Valid local
|
Group reference |
Valid local |
An annotation on a complexType definition applies over the scope of the contents and so is inherited by any contained constructs or construct references. That is, the scope include not only the part of the schema lexically enclosed by the complexType declaration which puts this scope into effect, but these properties are also inherited by these specific instances of any referenced types, referenced elements, or referenced groups from within that scope. This is sometimes called scoping over the full dynamic extent of the scope, not just the lexically appearing scope.
When multiple DFDL annotation properties occur at the same annotation point then they are combined with the rule that later format annotations override earlier ones, (later meaning textually later in the schema document) and short-form annotations are interpreted as if they appeared in a long-form annotation that is first before any other long-form annotations.
Alan Powell
MP 211, IBM UK Labs, Hursley, Winchester, SO21 2JN, England
Notes Id: Alan Powell/UK/IBM email: alan_powell@uk.ibm.com
Tel: +44 (0)1962 815073
Fax: +44 (0)1962 816898