Friday, September 20, 2013

XHTML5 DTD validation and data-dojo- attributes

 In development, updates will follow. 

While this is guide for dojo templates validation, the concept is applicable to any JS library which leverage of data- HTML5 attribute.

The mistakes in HTM dojo toolkit widget templates could cost quite a pain as browser will try to make a smart guess what it should actually make out of invalid document. As result you could find misbehavior in completely irrelevant location and spend a fortune on finding the original cause.
The solution is simple: add the DTD validation into development process.
If template is made as HTML, the smart enough IDE or online validator will highlight the errors.

The dijit templated widget uses a DIV as template string source which prevent regular DTD check. Fortunately text! AMD pluging gives ability to strip the tag from html body content:

HTML5 twisted design made DTD validation impossible just for sake of XML hating. Lucky us there is a work around. XML allow to use the XSL and browsers are capable to render data-dojo- attributes out of "dojo-data" namespace before JS and HTML dom is used making the browser to deal with HTML5 syntax and XML parser with DTD validation.

The sample of completely valid XML and HTML5:

Dijit template does not accept the XML as template string, so you would need to use the XHtmlBody! loader.

References: - try to cover some subset of HTML5 dtd.

Saturday, September 7, 2013

OSI Foundation as a service?

For my open sourced projects shim library, shim-based JS framework, API registry, Dash Studio and series of micro-projects there is a need for legal shelter and non-profit monetary support. In general it fits to same concept as Apache or Dojo foundation. From brief review I have not found the way of using either of them as a base for my projects. There is no transparency on how the money flow between the particular project/contributor and donation/investor. In the world of highly dynamic projects arising, success and failure/death there is no service which could support opensource projects efficiently as a service. People at the moment either on their own or completely given up in favor of "free" community service. Usually not-profile activities are balanced among
  • outsourced(free) Foundation for legal purposes
  • Source repository/project management which is free for OSI project
  • Demo content hosting, light services on related VCS service hosts or cheapest hostings paid out of pocket
  • Donations processed either personally or by shelter company
  • (continuous) build and test environment
There some other aspects like publishing and advertising, meetings and large shows participation, etc.

The service of such kind will be quite beneficial  for efficient support of free and open source projects.

For such organization will be essential the transparency of funds distribution and flow along with straight targeting of donations.