
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@uk.ibm.com tel:+44-1962-815848 From: Mike Beckerle <mbeckerle.dfdl@gmail.com> To: dfdl-wg@ogf.org Date: 05/09/2012 16:32 Subject: [DFDL-WG] clarification wanted: fixed values Sent by: dfdl-wg-bounces@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@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