Closed alexeq closed 2 years ago
I'm inclined to agree, and other FIX XML schemas have elementFormDefault="qualified"
. I don't recall why this one is different--it's been this way since at least version 1.0 RC3.
Using "qualifed" elements would allow to validate XML (and have IDE auto-completion) for partial types and messages definitions.
All XML schemas for SBE set attribute
elementFormDefault="unqualified"
which specifies that all local elements and attributes are unqualified (see https://www.w3.org/TR/xmlschema-0/#NS). But unfortunately those schemas do define elementmessage
globally (not inside themessageSchema
definition). This leads to somewhat confusing SBE XML:where all elements and attributes inside
messageSchema
do not use namespace prefix with single exception ofmessage
element that requires it in order to make a valid XML file.Is this intended behavior? If not it is relatively easy to fix by moving the definition of the
message
element insidemessageSchema
definition (just belowtypes
definition in thexs:sequence
). This would allow us to write SBE XML as:Better yet, I would propose to use qualified locals (
elementFormDefault="qualified"
) as suggested by some XSD best practice guides. This would allow us to write SBE XML using default namespace:For backward compatibility (old SBE XML files) adding default namespace would allow mixed content inside XML: