[arin-tech-discuss] FALSE vs. false on privateCustomer
andy at arin.net
Fri Sep 16 09:28:05 EDT 2011
We define our XML using Relax NG, which defers to the W3C's XML Schema for primitive datatypes.
Unfortunately, XML Schema defines a boolean as either "true" or "false".
( http://www.w3.org/TR/xmlschema-2/#boolean )
We validate all inbound XML to insure data integrity, and the error you are getting is a schema violation error.
Admittedly, case insensitive "true" or "false" does seem limiting. I'll look into the feasibility of a backwards-compatible schema change that is more accepting of other logical notions of true and false.
On Sep 15, 2011, at 2:22 PM, Aaron Hughes wrote:
> So this one really frustrated me and figured I would share.
> Incredibly, this doesn't work: <privateCustomer>FALSE</privateCustomer>
> but this does: <privateCustomer>false</privateCustomer>
> This means it's not actually a TRUE v. FALSE (1 v. 0), it's a string. E.g. if you are, like I am, storing something like $private_customer = $row['residential_customer_privacy_enable'];, don't make it a boolean.
> The error message is also misleading:
> character content for
> s/><message>The XML payload did not validate against the defined schema.
> Please see the documentation for
> Just a heads up to any of you who may run into this.
> ARIN Dev,
> If you change this to a boolean (as it likely should be, please make sure to account for both implementations as a string "false" might be considered "TRUE" in the boolean world.
> Aaron Hughes
> aaronh at bind.com
> Key fingerprint = AD 67 37 60 7D 73 C5 B7 33 18 3F 36 C3 1C C6 B8
> arin-tech-discuss mailing list
> arin-tech-discuss at arin.net
More information about the arin-tech-discuss