[DFDL-WG] Unparsing hexBinary data

Steve Hanson smh at uk.ibm.com
Wed May 23 12:18:38 EDT 2012


Agreed on call today to allow padding using fillByte. No trimming though!

Regards

Steve Hanson
Architect, Data Format Description Language (DFDL)
Co-Chair, OGF DFDL Working Group
IBM SWG, Hursley, UK
smh at uk.ibm.com
tel:+44-1962-815848



From:   Tim Kimber/UK/IBM
To:     Steve Hanson/UK/IBM at IBMGB
Cc:     dfdl-wg at ogf.org, dfdl-wg-bounces at ogf.org
Date:   21/05/2012 10:11
Subject:        Re: [DFDL-WG] Unparsing hexBinary data


I think automatic padding to the specified or minimum length is better 
than the alternative ( throwing a processing error ). Arguably, throwing a 
processing error is more flexible because it offers the client an option 
to reject too-short data. But a dfdl:assert could do the same in the ( 
probably rare ) cases where that is the requirement.

regards,

Tim Kimber, Common Transformation Team,
Hursley, UK
Internet:  kimbert at uk.ibm.com
Tel. 01962-816742 
Internal tel. 246742





From:   Steve Hanson/UK/IBM at IBMGB
To:     dfdl-wg at ogf.org
Date:   20/05/2012 07:22
Subject:        [DFDL-WG] Unparsing hexBinary data
Sent by:        dfdl-wg-bounces at ogf.org



When unparsing xs:string data of specified length, then if the data is 
short then it is padded to the specified or minimum length (depends on 
dfdl:lengthKind). Whether to do this padding or not is controlled by the 
dfdl:textPadKind property, 

However we don't offer the same flexibility for xs:hexBinary.  There's no 
controlling property, so we always output exactly what was in the infoset, 
and if specified length and the data is short it is a processing error. In 
the absence of a property to control whether to pad, would we better off 
always padding (using dfdl:fillByte) to specified or minimum length? 

Regards

Steve Hanson
Architect, Data Format Description Language (DFDL)
Co-Chair, OGF DFDL Working Group
IBM SWG, Hursley, UK
smh at uk.ibm.com
tel:+44-1962-815848
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
--
  dfdl-wg mailing list
  dfdl-wg at ogf.org
  https://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/20120523/8b86c5cf/attachment.html>


More information about the dfdl-wg mailing list