Here's the example as suggested by Jonathan of how to issue an error that I previously was suggesting needed fn:error. I'm convinced this is sufficient and we can avoid the need for fn:error now.
<xs:element name="magic_number" type="ex:uint32" dfdl:byteOrder="bigEndian">
<xs:annotation>
<xs:appinfo source="http://www.ogf.org/dfdl/">
<dfdl:assert
test="{ (xs:unsignedInt(.) eq dfdl:hUInt('0xa1b2c3d4')) |
(xs:unsignedInt(.) eq dfdl:hUInt('0xd4c3b2a1')) }"
message="{ fn:concat(
'Magic
number ',
dfdl:hexBinary(dfdl:unsignedInt(.)),
' was not 0xA1B2C3D4 (for bigEndian) or 0xD4C3B2A1 (for littleEndian).' }" />
<dfdl:setVariable ref="ex:bOrd">{ xs:unsignedInt(.) }<dfdl:setVariable>
</xs:appinfo>
</xs:annotation>
</xs:element>
--
Mike Beckerle | OGF DFDL Workgroup Co-Chair | Tresys Technology | www.tresys.com