[DFDL-WG] of check constraints and fixed
Steve Hanson
smh at uk.ibm.com
Fri Jun 7 10:14:31 EDT 2013
The checkConstraints() function will check against the XSDL fixed
attribute. It won't check the XSDL default, minOccurs or maxOccurs
attributes.
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: 07/06/2013 15:03
Subject: [DFDL-WG] of check constraints and fixed
Sent by: dfdl-wg-bounces at ogf.org
Check constraints can be used…
<xsd:annotation>
<xsd:appinfo source="
http://www.ogf.org/dfdl/dfdl-1.0/">
<dfdl:assert test="{
dfdl:checkConstraints(.) }" message="There cannot be more than 59 seconds
in a minute."/>
</xsd:appinfo>
</xsd:annotation>
…to validate (while parsing) the restrictions placed on an element:
<xsd:simpleType>
<xsd:restriction base=
"xsd:unsignedInt">
<xsd:maxInclusive value=
"59"/>
</xsd:restriction>
</xsd:simpleType>
Is check constraints similarly required to validate the fixed value of an
element while parsing?
<xsd:element name="MimeVersion" dfdl:initiator="MIME-Version:%SP;"
dfdl:terminator="%NL;" type="xsd:string" dfdl:length="3" dfdl:lengthKind=
"explicit" fixed="1.0">
If not, then how do I force it to validate while parsing?
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/20130607/8e31e9a2/attachment-0001.html>
More information about the dfdl-wg
mailing list