[DFDL-WG] of check constraints and fixed

Garriss Jr., James P. jgarriss at mitre.org
Fri Jun 7 09:55:26 EDT 2013


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ogf.org/pipermail/dfdl-wg/attachments/20130607/0b1d3754/attachment.html>


More information about the dfdl-wg mailing list