Re:I Tried to Buy an Actual Barrel of Crude Oil
by pippy on Tuesday November 03, 2015 @03:20PM
(#10502318)
I got a bit flustered at this snippet here:
>Notice anything off about that XML? If you said, “value should be 0 instead of False”, then give yourself a pat on the back.
Because text values can be valid XML for Boolean values. According to the XML Schema specification:
3.2.2.1 Lexical representation
An instance of a datatype that is defined as ·boolean· can have the
following legal literals {true, false, 1, 0}.
3.2.2.2 Canonical representation
The canonical representation for boolean is the set of
literals {true, false}.
>Notice anything off about that XML? If you said, “value should be 0 instead of False”, then give yourself a pat on the back.
Because text values can be valid XML for Boolean values. According to the XML Schema specification:
So a better correction would be 'false'.