Subject: RE: Bug (sort of) with TextToTime on web
Actually, the only thing that I don’t agree to, is your synonymous usage of the DOM and HTML structure.
Here is why: According to W3C specification, DOM is defined as an API for accessing a document, not the document itself.
Quote:
“The Document Object Model (DOM) is an application programming interface (API) for valid HTML and well-formed XML documents. It defines the logical structure of documents and the way a document is accessed and manipulated.”
All, that Domino generates, is an HTTP response that carries HTML (generated by the once so called “Domino engine”) in its body (like any other HTTP server). This HTML definitely defines a structure and you can argue, that there is always implicitly something like a “DOM”. After the browser has parsed and tokenized the HTML, there surely is some explicitly Object Model for use by its rendering engine. But it is not necessarily identical to the DOM per W3C specification.
From my point of view, the HTML source, the HTML structure and the DOM are three distinct things, even if heavily related. One of my favorite samples, I keep boring people to death with, is that of an odd looking, but completely valid HTML file:
!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”>
title>I’m valid/title>
body>
table>tr>td>I really am/table>
/body>
(opening angle brackets removed intentionally)
The HTML source is stripped to the absolute minimum. Still, the document structure is more complex: While e.g. html and head TAGS are optionally, the html and head ELEMENTS are not, so they will be there for the browser. But they will even be there, if the browser in question does know nothing about and does provide no implementation of W3C DOM in any programming language. Would it make sense to call the structure a DOM then? Maybe, for the sake of convenience. But it would not be W3C DOM for HTML (Level 1? Level 2? Level 3?) then.
The general limitation of the DOM is, that there are no data types other then text. But this is rather based on the limitation of HTTP requests and HTML structure (if not worked around with something like XForms).
One last note on this special case: The slightly weired behavior of the (Notes) document not being saved an no error being generated only occurs with Domino generated JavaScript, indeed. I did test that yesterday. If you use a standard submit button or generate your own JS submit button (with Domino JS generation disabled), this does not occur. So I would conclude, that this (minor) issue is rather with the Domino generated JS.
As my testing included IE6 and FF2 only, it could in theory still be related to the DOM implementation of these browsers, but … no, I don’t think so, and I’m not keen in further investigation. A properly designed page will not suffer from this problem, and that’s all I need to know.