Hello DFDL community,
This is a follow-up to the thread that Christofer started last week about
"fixed" values.
My input file consists of integers, on different lines. The first value in the
file must be 44.
Using --Validate limited, I get an error message when the first value is not 44.
If the XML document is invalid (the first element does not have a value of 44),
then I want unparsing to generate an error. I thought that Steve said the way
to achieve this is to use:
dfdl:outputValueCalc="{ 44 }"
However, that does not result in an error. Why not?
Here is my DFDL schema:
<xs:element name="input">
<xs:complexType>
<xs:sequence dfdl:separator="%NL;" dfdl:separatorPosition="infix">
<xs:element name="Fixed-Value" dfdl:occursCountKind="implicit"
dfdl:outputValueCalc="{ 44 }">
<xs:simpleType>
<xs:restriction base="xs:byte">
<xs:minInclusive value="44" />
<xs:maxInclusive value="44" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="num" type="xs:string" maxOccurs="unbounded"
dfdl:occursCountKind="implicit" />
</xs:sequence>
</xs:complexType>
</xs:element>