[DFDL-WG] OGF DFDL - useNullValueForDefault

Geoff Judd JUDDG at uk.ibm.com
Mon Dec 3 04:16:56 CST 2007


Mike,
          The think the primary motivation for the useNullValueForDefault 
is to allow out-of-band values to be output as default values. A default 
value has to be in the value space of the missing element but a Null value 
can be an out-of-band value. One scenario where useNullForDefaultValue is 
useful is in the case of COBOL where a user wants to output HIGH-VALUES or 
LOW-VALUES for missing elements. 

Regards,

Geoff Judd
WebSphere Message Brokers Development
IBM United Kingdom Ltd.
Hursley

Telephone:  +44-1962-818461
E-mail:           JUDDG at uk.ibm.com




Mike Beckerle <beckerle at us.ibm.com> 
Sent by: dfdl-wg-bounces at ogf.org
30/11/2007 20:34

To
dfdl-wg at ogf.org
cc

Subject
[DFDL-WG] OGF DFDL - useNullValueForDefault







I'm trying to simplify something in the nulls/defaults space. 

There's this property proposed: useNullValueForDefault. This is a boolean. 


I'm trying to understand what this is for. 

On input, when the element is required but no content is found, and you 
therefore want to create a default value, you would look, see that the 
element is nillable, see that useNullValueForDefault is true, and set the 
logical value of that element to null. 

On output when no logical value is provided but the element is required, 
you therefore want to create a default value, so you look and see that the 
element is nillable and see that useNullValueForDefault is true and so you 
provide the logical value null as the value. Then you output as if the 
logical value was null in the first place, so you would output the first 
of the dfdl:nullValues list as the representation. 

These two are not symmetric. 

I understand wanting empty content to cause null as the logical value of a 
nillable element. Symmetry argues that one wants in this case for the 
output side to output empty content as the representation of null logical 
value. 

The way I would express this is to provide a means for the list of 
dfdl:nullValues to be able to contain the empty string as its first member 
of the list. E.g., some syntax like: 

dfdl:nullValues=" '' 'null' 'NULL' '\ ' " 

Once you have this, there is no need for useNullValueForDefault. It's 
functionality is subsumed by allowing nullValues to contain empty-string 
as a null representation. 

This leaves the case where an element is both nullable and has a non-null 
default value. 

Is this case important or can we just say that an element is either 
nullable or has default values, but not both.  We already have some 
constraints on this stuff in that we don't allow nullable complex types, 
only simple.   

I believe allowing all combinations of nullability with default values is 
probably overkill. 

Comments? 


I understand wanting a missing 
Mike Beckerle
STSM, Architect, Scalable Computing
IBM Software Group
Information Platform and Solutions
Westborough, MA 01581
direct: voice and FAX 508-599-7148
assistant: Pam Riordan 
                 priordan at us.ibm.com 
                 508-599-7046
--
  dfdl-wg mailing list
  dfdl-wg at ogf.org
  http://www.ogf.org/mailman/listinfo/dfdl-wg






Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU





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


More information about the dfdl-wg mailing list