Re: Comments and requests.

At 21:27 1997 10 15 -0400, Alexandre Rafalovitch wrote:
>These are comments on DOM Level 1 document as of 9th of October draft.
>
>In Element:
>  There might be comments inside the tag (eg <foo --this is foo-- bar=val>

This is not allowable in SGML or XML.

>  Am I correct in understanding that comment node should be generated for
>  that and returned in getChildren() call, but not in getAttributes()
>  call. The alternative is to not represent in-tag comment in DOM. What
>  about error nodes. (I know they should not happen, but....)

I don't really know what you mean by error nodes, but in general it may
not be possible to define a DOM on erroneous input.  Certainly, the input
must be good enough to model before we can define a document object model
for it.

>
>In Attribute:
> Description for when null is returned for getValue() is slightly hard to
>understand. :-{ Also, how stylesheets will influence this getValue() is

I don't understand what stylesheets have to do with this.  What getValue()
gets has nothing to do with stylesheets.

>not clear either. In my understanding CSS value would be check after
>explicit value, but before default value. Some mention of it should be
>done, even if it is not quite in scope yet.

I don't claim to know how CSS works, but with the "specified()" method,
it should be possible to tell if an attribute has been given an explicit
value or not.  If an application really wanted to get only an attribute's
explicit value but not a default value, it would have to do logic such as:

	if the attribute has an explicit value specified()
		return  getValue()
	else
		return null

Note that in the case of an XML application (and, I would have thought, almost
any presentation sort of application for either HTML or XML), one usually wants
getValue() to get the default if there is no specified value, so that should
be the definition of getValue()

>
>In PI:
> I don't know about XML, but isn't PI ends with >, not ?>.

In XML, it ends with ?>.  In HTML, it ends with >.

>
>Whitespace for HTML:
>  If I have a sequence of whitespace, would the corresponding TextObject
>contain a single whitespace or multiple whitespace? Basically, whether
>space collapsing should happen before or after DOM?

The initial (raw) structure model should be before any space collapsing.

Collapsing space (which you presumably would not want to do in <pre>
elements and such--and this is something a general XML application can
only tell by consulting the stylesheet) is one of the "recipes" for
"cooking" the initial (raw) structure model to produce a transformed
model.  The DOM must allow access into all models--and most especially
the initial (raw) structure model.

Thanks for taking the time to comment on the draft.

paul

Received on Thursday, 16 October 1997 11:09:13 UTC