[DFDL-WG] Action 029 outputValueCalc, variables (& also contribution for 026 - env. and payload)

Alan Powell alan_powell at uk.ibm.com
Tue May 26 11:31:31 CDT 2009


Mike

I don't think your proposal to use lengthkind 'As-If-Implict' on unparsing 
works as described.

Lengthkind = 'implicit' means get the fixed length from the 
length/maxLength facet whereas your description says the 
dfdl:representational-length is computed from the logical value. 

The two cases to consider are when the field is padded or not.

When not padded then taking the infoset value as is seems reasonable if 
the length is not already known
When padding is required then an 'output length' must be specified 
somewhere.


Case 1 no padding (your example)
The problem is how does dfdl:representational-length know that the length 
is not already know?
dfdl:length= '10' should return 10
dfdl:length= '{10}' should return 10
dfdl:lentgh= '{../len}' should return ? value from infoset?

Case 2 Padding

There needs to be an output length specified.
You could explicitly set a value in the  len field   <element name=len 
dfdl:outputValuCalc= 10 />
We could use the length/maxlength facet as the place to specify the 
'output length' but I would prefer an explicit dfdl property.
Alternatively we could say that padding is not used and take what is in 
the infoset.




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




From:
"Mike Beckerle" <mbeckerle.dfdl at gmail.com>
To:
<dfdl-wg at ogf.org>
Date:
24/05/2009 00:39
Subject:
[DFDL-WG] Action 029 outputValueCalc,   variables (& also contribution for 
026 - env. and payload)



Finally, here's a draft document about outputValueCalc, unparsing, and, 
variables, and such.
 
Also attached is a zipped eclipse project containing two subdirs: 
outputValueCalc has examples of ... outputValueCalc, and variables has an 
envelope payload example enhanced and corrected somewhat over a prior one 
I sent. 
 
There's one entirely new concept here. I added an attribute to 
dfdl:defineVariable to specify whether the variable is for input (parsing) 
or output (unparsing). I was unable to get things to work in any simple 
manner without separating the two classes of variable. This doesn't seem 
too bad actually. 
 
...mike
Note: Please do not send sensitive data in unencrypted form in email. We 
cannot provide secure transit for email over the Internet.
Mike Beckerle | CTO | Oco, Inc 
Tel: 781-810-2125 | 100 Fifth Ave, 4th Floor, Waltham, MA 02451 | 
mbeckerle at oco-inc.com | www.oco-inc.com
Blog: cboblog.typepad.com 
TURNING DATA INTO ANSWERS. FASTER THAN YOU EVER IMAGINED.
 [attachment "outputValueCalc-and-variables.doc" deleted by Alan 
Powell/UK/IBM] [attachment "DFDL-eclipse-project-2009-05-23.zip" deleted 
by Alan Powell/UK/IBM] --
  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/20090526/0c4e1afc/attachment.html 


More information about the dfdl-wg mailing list