Boolean Attributes In XML (xs:boolean)

  • user warning: Table 'nolan.comments' doesn't exist query: SELECT COUNT(*) FROM comments WHERE nid = 206 AND status = 0 in /home/sneakin/web/nolan.eakins.net/includes/database.mysql.inc on line 120.
  • user warning: Table 'nolan.comments' doesn't exist query: SELECT c.cid as cid, c.pid, c.nid, c.subject, c.comment, c.format, c.timestamp, c.name, c.mail, c.homepage, u.uid, u.name AS registered_name, u.picture, u.data, c.score, c.users, c.thread, c.status FROM comments c INNER JOIN users u ON c.uid = u.uid WHERE c.nid = 206 AND c.status = 0 GROUP BY c.cid, c.pid, c.nid, c.subject, c.comment, c.format, c.timestamp, c.name, c.mail, u.picture, c.homepage, u.uid, u.name, u.picture, u.data, c.score, c.users, c.thread, c.status ORDER BY c.thread DESC LIMIT 0, 50 in /home/sneakin/web/nolan.eakins.net/includes/database.mysql.inc on line 120.

It was pointed out to me that my implementation of bookmark storage for Psi was wrong since I was using "true" and "false" for the autojoin attribute. A similiar "problem" was found with Psi's dataforms when I was working on room configuration for MUC with mu-conference. Looking at the W3C's XML Schema spec this apparently is not a problem.

There does exist two problems though:

  • Examples in JEPs typically only show "0" or "1" for boolean attributes causing implementors to only support "0" and "1".
  • The above results in broken implementations which need to be more liberal in what they accept as a boolean.

To fix the first issue, JEPs that use "xs:boolean"s should make use of both 0/1 and false/true in their examples to prevent us lazy implementors who only read the examples from causing problems.

The second one needs some coding. This post is my warning to the owners and contributors to all the projects out there.

Note: This was also posted on the jdev and standards-jig mailing lists.

Ad's by Google