[XML-SIG] New DOM code checked in
uche.ogbuji@fourthought.com
uche.ogbuji@fourthought.com
Mon, 22 Mar 1999 21:41:23 -0700
> Lars Marius Garshol writes:
> >Shouldn't this wait for the next DOM WD in the hope that this part of
> >the DOM will be fleshed out then? It seems pointless to me to
> >implement this now only to have it obsoleted by the next draft.
>
> The next DOM WD is probably some time away, since the March 4
> draft doesn't mention namespaces at all and WDs come out fairly
> slowly. There are technologies like RDF and XSL that pretty much
> require namespaces *now*, so I think we can't sit on our hands here.
Actually, last week's DOM Level 2 WD _does_ mention namespaces, but does no
more.
> >What about the factory I proposed here earlier? It would be nice to
> >know whether that is on the list, and if so, where.
>
> Yes, it's definitely on the list, but I haven't yet had time
> to look at 4DOM's interface. Anyone want to propose how this should
> look for PyDOM and save me the trouble?
Here is the IDL for 4DOM's NodeFactory. You'll probably only need part of it,
though: we enforce very strict factory usage because the node objects _could_
be remote.
#pragma prefix "fourthought.com"
#include "../../DOM.idl"
#include "../../HTML/HTML.idl"
module NodeFactoryIF {
typedef sequence<DOMIF::Node> listofnodes;
interface NodeFactory {
//The user should only call these four methods
HTMLIF::HTMLDocument createHTMLDocument();
DOMIF::Document createDocument();
HTMLIF::HTMLElement createHTMLElement(in HTMLIF::HTMLDocument parent,in
string tag);
void releaseNode(in DOMIF::Node node);
//Non public interface: user shouldn't call these
//All require the ownerDocument, but when called from
//Document.py, this is provided for the user
DOMIF::DOMImplementation createDOMImplementation(in string feature, in
string version);
DOMIF::NodeList createNodeList(in listofnodes nodes);
DOMIF::NamedNodeMap createNamedNodeMap();
DOMIF::Element createElement(in DOMIF::Document ownerDocument, in string
tagName);
DOMIF::DocumentFragment createDocumentFragment(in DOMIF::Document
ownerDocument);
DOMIF::DocumentType createDocumentType(in DOMIF::Document ownerDocument, in
string name, in DOMIF::NamedNodeMap entities, in DOMIF::NamedNodeMap
notations);
DOMIF::Text createTextNode(in DOMIF::Document ownerDocument, in string data);
DOMIF::Comment createComment(in DOMIF::Document ownerDocument, in string
data);
DOMIF::CDATASection createCDATASection(in DOMIF::Document ownerDocument, in
string data);
DOMIF::ProcessingInstruction createProcessingInstruction(in DOMIF::Document
ownerDocument, in string target, in string data);
DOMIF::Attr createAttribute(in DOMIF::Document ownerDocument, in string
name);
DOMIF::Entity createEntity(in DOMIF::Document ownerDocument, in string
publicId, in string systemId, in string notationName);
DOMIF::EntityReference createEntityReference(in DOMIF::Document
ownerDocument,in string name);
DOMIF::Notation createNotation(in DOMIF::Document ownerDocument, in string
publicId, in string systemId, in string name);
DOMIF::NodeIterator createNodeIterator(in DOMIF::Node start_node);
DOMIF::NodeIterator createSelectiveNodeIterator(in DOMIF::Node start_node,
in unsigned short what_to_show);
DOMIF::NodeIterator createFilteredNodeIterator(in DOMIF::Node start_node, in
DOMIF::NodeFilter filter);
DOMIF::NodeIterator createSelectiveFilteredNodeIterator(in DOMIF::Node
start_node, in unsigned short what_to_show, in DOMIF::NodeFilter filter);
HTMLIF::HTMLCollection createHTMLCollection(in listofnodes nodes);
};
};
--
Uche Ogbuji
FourThought LLC, IT Consultants
uche.ogbuji@fourthought.com (970)481-0805
Software engineering, project management, Intranets and Extranets
http://FourThought.com http://OpenTechnology.org