[DFDL-WG] Precedence of short and long form properties

Suman Kalia kalia at ca.ibm.com
Thu Mar 19 14:18:49 CDT 2009


Thanks Alan -- In nutshell, long from annotations take precedence over 
short form when they are defined on the same xsd construct.. 

i.e. if you lengthKind specified in short form and on dfdl:element  on XSD 
element declaration  value specified in dfdl:element will take 
precedence.. 

Suman Kalia
IBM Toronto Lab
WMB Toolkit Architect and Development Lead
WebSphere Business Integration Application Connectivity Tools 

http://www.ibm.com/developerworks/websphere/zones/businessintegration/wmb.html


Tel : 905-413-3923  T/L  969-3923
Fax : 905-413-4850 T/L  969-4850
Internet ID : kalia at ca.ibm.com



From:
Alan Powell/UK/IBM at IBMGB
To:
Suman Kalia/Toronto/IBM at IBMCA
Cc:
dfdl-wg at ogf.org
Date:
03/19/2009 02:11 PM
Subject:
Precedence of short and long form properties


Suman

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 at uk.ibm.com 
 Tel: +44 (0)1962 815073                  Fax: +44 (0)1962 816898



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.ogf.org/pipermail/dfdl-wg/attachments/20090319/7c1c44cb/attachment.html 


More information about the dfdl-wg mailing list