Boolean literal
Status: Beta
Brought to you by:
kdeschut
In the following XML from NC174A, should the "ON" be treated like a boolean literal?
<setStatement>
<t>
<![CDATA[SET]]>
</t>
<t>
<![CDATA[ ]]>
</t>
<setOther>
<qualifiedDataName>
<dataName>
<cobolWord>
<t>
<![CDATA[SW-1]]>
</t>
</cobolWord>
</dataName>
</qualifiedDataName>
<t>
<![CDATA[ ]]>
</t>
<t>
<![CDATA[TO]]>
</t>
<t>
<![CDATA[ ]]>
</t>
<t>
<![CDATA[ON]]>
</t>
</setOther>
<unknown />
</setStatement>
I'm not sure. Looking briefly at the spec it seems to talk about ON and OFF as being a "status", not a boolean...
The definition is a status of the switch which has two values so, technically, it would be a boolean value. If there are other status type fields (I honestly have no idea), then it would be better to put in a generic status tag. My opinion is that, either way, the value would be better off wrapped in something that indicates that it is a value rather than just raw text. I couldn't care less about the "TO" statement. :-)
I try to stay close to terms from the spec, when I can. But yes, the structure of the tree should be made cleaner. At the moment that cleanup is something I work on as needed.
Added more structure to the SET statement in [r358].
Related
Commit: [r358]