W3C home > Mailing lists > Public > www-dom@w3.org > October to December 1998

Re: Comment about DocumentType

From: <keshlam@us.ibm.com>
Date: Thu, 22 Oct 1998 16:12:20 -0400
To: www-dom@w3.org
Message-ID: <852566A5.006E563C.00@us.ibm.com>
>> b) The type(s) and sequence(s) of children that each kind of element
>> permit. To insulate us from possible variation in how these rules are
>> expressed in the schema langauges, I'd suggest making this a query that
>> asks "If I was to do  nodeX.insertBefore(nodeY,nodeZ), where X and Z are
>> known, what types of nodes would be permitted as Y?"
>It's not clear that such a list is easy to compute.  I would rather
>make the legal element types known, and then simply ask: is this
>type a legal predecessor of existing node Z?

I think my version is essentially your two stages combined, with the second
used to filter the first. That filtered list is a good basis for
content-directed editing. Of course, the filtering could be done in user
code rather than the DOM, but I think moving it into the DOM would
generally produce a significantly more efficient implementation.

Joe Kesselman  / IBM Research
Unless stated otherwise, all opinions are solely those of the author.
Received on Thursday, 22 October 1998 14:57:30 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:05 UTC