Boolean Attributes In XML (xs:boolean)

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.

Reply

The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.
More information about formatting options

Ad's by Google