Document Object Model 5 [via Argumentation Community Group]

Innovations for the document object model[1] are presented, interfaces
DOMFactoryResolver and DOMFactory, towards a document object model 5 (DOM5).

The DOMFactoryResolver interface is utilized to obtain DOMFactory factories with
which to create objects implementing Element. DOMFactoryResolver resembles
Java's java.lang.ClassLoader[3] and DOMFactory resembles Java's

As XML parsers parse, parsing encounters the URI of XML elements, as per XML
namespaces and elements' names. The URI can be utilized with DOMFactoryResolver
to obtain DOMFactory factories with which to create the objects implementing
Element. The approach greatly increases the extensibility of the document object

Implementations of DOMFactoryResolver can, utilizing URI as URL, download
DOMFactory serializations, e.g. XML or WebAssembly[4], can utilize cached
downloaded serializations, or can utilize built-in implementations.

interface DOMFactory
 [NewObject] Element createElementNS(Document document, DOMString? namespace,
DOMString qualifiedName);

interface DOMFactoryResolver
 DOMFactory? resolve(DOMString? namespace, DOMString qualifiedName);

interface DOMImplementation
 [NewObject] DocumentType createDocumentType(DOMString qualifiedName, DOMString
publicId, DOMString systemId);
 [NewObject] XMLDocument createDocument(DOMString? namespace,
[TreatNullAs=EmptyString] DOMString qualifiedName, optional DocumentType?
doctype = null, optional DOMFactoryResolver? resolver = null);
 [NewObject] Document createHTMLDocument(optional DOMString title, optional
DOMFactoryResolver? resolver = null);

 boolean hasFeature();

interface Document : Node
 [SameObject] readonly attribute DOMImplementation implementation;
 readonly attribute DOMString URL;
 readonly attribute DOMString documentURI;
 readonly attribute DOMString origin;
 readonly attribute DOMString compatMode;
 readonly attribute DOMString characterSet;
 readonly attribute DOMString contentType;

 readonly attribute DocumentType? doctype;
 readonly attribute DOMFactoryResolver? resolver;

 readonly attribute Element? documentElement;
 HTMLCollection getElementsByTagName(DOMString localName);
 HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString
 HTMLCollection getElementsByClassName(DOMString classNames);

 [NewObject] Element createElement(DOMString localName);
 [NewObject] Element createElementNS(DOMString? namespace, DOMString
 [NewObject] DocumentFragment createDocumentFragment();
 [NewObject] Text createTextNode(DOMString data);
 [NewObject] Comment createComment(DOMString data);
 [NewObject] ProcessingInstruction createProcessingInstruction(DOMString target,
DOMString data);

 Node importNode(Node node, optional boolean deep = false);
 Node adoptNode(Node node);

 [NewObject] Event createEvent(DOMString interface);

 [NewObject] Range createRange();

 [NewObject] NodeIterator createNodeIterator(Node root, optional unsigned long
whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
 [NewObject] TreeWalker createTreeWalker(Node root, optional unsigned long
whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);

interface XMLDocument : Document {};



This post sent on Argumentation Community Group

'Document Object Model 5'

Learn more about the Argumentation Community Group:

Received on Monday, 21 September 2015 16:37:28 UTC