[DFDL-WG] 0 equals ""?

Steve Hanson smh at uk.ibm.com
Mon Jun 3 08:59:04 EDT 2013


The first form is looking at the physical data and seeing if its length is 
0 bytes. It can be used for any simple type.

The second form is looking at the logical value of the data and seeing it 
has the value empty string. It can be used only is type is xs:string or 
xs:hexBinary.

Only if the type of Empty is xs:string or xs:hexBinary are these 
functionally equal.

Regards

Steve Hanson
Architect, IBM 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:   "Garriss Jr., James P." <jgarriss at mitre.org>
To:     "dfdl-wg at ogf.org" <dfdl-wg at ogf.org>, 
Date:   03/06/2013 13:40
Subject:        [DFDL-WG] 0 equals ""?
Sent by:        dfdl-wg-bounces at ogf.org



When are these not functionally equal?
 
                        <dfdl:discriminator>{ dfdl:valueLength(../Empty, 
"bytes") eq 0 }</dfdl:discriminator>
                        <dfdl:discriminator>{ ../Empty eq "" }
</dfdl:discriminator>
 
TIA--
  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/20130603/a82b863b/attachment.html>


More information about the dfdl-wg mailing list