[Xml-compile] boolean encoding

Allan Wind allan at goldbamboo.com
Sat May 24 19:39:36 BST 2008


I have to interface with a service that requires true/false values for
a boolean type, and does not work with 0/1.  Initially I set the node
value with 0/1 which were passed through as is, and I just changed it
now to use false/true which are also passed through as is to solve the
problem.

Looking at the XSD specification I am not sure if false/true is the
preferred way (they refer to it as "Canonical representation").  The
XML::Compile documentation says:

boolean

    Contains true, false, 1 (is true), or 0 (is false). Unchecked, the
actual value is used. Otherwise, 0 and 1 are preferred for the hash
value and true and false in XML.

That is I am seeing the unchecked behavior, but both the check options
are enabled by default and I do not disable them.  This is with 0.78,
btw, and I do not notice anything in the changelog saying this was
fixed.


/Allan
-- 
Allan Wind
781 932 4700 x 190
Lead Software Engineer
GoldBamboo, LLC



More information about the Xml-compile mailing list