- From: Don Park <donpark@quake.net>
- Date: Wed, 14 Oct 1998 10:47:32 -0700
- To: "'DOM list'" <www-dom@w3.org>
> Document someXMLDoc = new BasicDocument();
> Element xmlElement = someXMLDoc.createElement("FOO");
> Element htmlLikeElement = someXMLDoc.createElement("TABLE");
>
> if(xmlElement instanceof HTMLElement)
> // always false
>
> if(htmlLikeElement instanceof HTMLElement)
> // always false
In all the interface-based designs I came across, I have never seen a single
design which relied on the 'absence' of an interface. Exactly what
advantages are there to this 'guaranteed' lack of interface?
> HTMLDocument someHTMLDoc = new BasicHTMLDocument();
> Element xmlLikeElement = someHTMLDoc.createElement("FOO");
> Element htmlElement = someHTMLDoc.createElement("TABLE");
>
> if(xmlLikeElement instanceof HTMLElement)
> // always true
>
> if(htmlElement instanceof HTMLElement)
> // always true
>
> if(htmlElement instanceof HTMLTableElement)
> // always true
While I do agree with this, I am concerned about how embeded XML should be
handled. Should they always implement HTMLElement? Are there any
conflicts?
Don Park
Docuverse
Received on Wednesday, 14 October 1998 13:48:10 UTC