[DFDL-WG] clarification wanted: fixed values

Steve Hanson smh at uk.ibm.com
Wed Sep 5 12:09:53 EDT 2012


Hi Mike

Yes the fixed attribute and all the other schema facets are only used when 
validating.  The dfdl:checkConstraints() function is provided to allow a 
dfdl:assert or dfdl:discriminator to check that the value of an element 
obeys its schema constraints.

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:   Mike Beckerle <mbeckerle.dfdl at gmail.com>
To:     dfdl-wg at ogf.org
Date:   05/09/2012 16:32
Subject:        [DFDL-WG] clarification wanted: fixed values
Sent by:        dfdl-wg-bounces at ogf.org




The spec states that the fixed facet is only used for validation.

That is, it works like default in that it supplies a default that can be 
used when parsing and unparsing, but the comparison of an existing data 
value with the schema-specified fixed value is only done for validation. 
This means that a value not agreeing with the fixed value specified in the 
schema would never cause backtracking. 

Is this right? It seems awkward to me that I have to use a dfdl:assert 
annotation to achieve this. That said, however, I can achieve the 
behaviour I need. it's just more verbose than I wanted. 

Is this what the current IBM implementation does?

Thanks

-- 
Mike Beckerle | OGF DFDL WG Co-Chair 
Tel:  781-330-0412
--
  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/20120905/f086d730/attachment.html>


More information about the dfdl-wg mailing list