W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2000

Query about DOM standards

From: Hari Haran Subramanian <haran.hari@wipro.com>
Date: Mon, 29 May 2000 12:28:41 +0530
Message-ID: <39321521.C0385BE5@wipro.com>
To: www-dom@w3.org
Hi!!
I need some clarifications regarding implementation of DOM interfaces.
We are implementing the DOM interfaces in C++.
My concern is that I do not want to violate the standard specification
(dated 07 March, 2000)of the DOM interfaces as charted by W3C....

The following are a set of queries regarding the implementation of the
DOM interfaces:

1)

Will it be acceptable to replace the standard data members of a DOM
interface (like nodename) with get and set mechanism in the public
(exposed) section of the class and put the standard  data members like
nodename in the private section?

For ex-

Class CDomNode
{
DOMString nodeName;
public:
DOMString getNodeName();//Substitute for nodeName atribute in the public
section.
void setNodeName(DOMString str); //Substitute for nodeName atribute in
the public section.
};


2)

Will it be acceptable to have one or more non-standard data members in
the private section of the implementation of the DOM interfaces?
i.e. Will it be considered a non standard DOM interface if the
implemenatation of the DOM interface contains one or more non-standard
data members in the private section of the class apart from all the
standard data members??

Class CDomNode
{
int x;//Extra Non standard data member – A standard violation???
/*All standard data members of the DOM interface like nodename,
nodevalue, nodetype,  firstchild, lastChild, nextSibling etc... are
declared here*/
public:
/*interfaces*/
};

3)

What do we mean by readonly declaration of a DOM specification data
member ex – readonly DOMString nodeName??Does it mean declaring  the
standard data member like nodename or nodevalue in the private or
protected section of the implemenation class??


4)

Also Iam making the assumption that the name of the implementation of
DOM interface i.e. in the above case CDomNode (class name) can be
non-standard.

As per  section 1.1.2 of  “Memory Management”  in the DOM standard
specification(line 1, first para.),
the following statement tells us that the I indeed can add an extra
non-standard data member in the private section, as well as provide get
and set mechanisms for manipulating the standard data members like
nodename, nodevalue .

“That means that an implementation need only expose methods with the
defined names and specified operation, not implement classes that
correspond directly to the interfaces.”

Please clarify!!

Thanks and regards,
Hari
(From Wipro).
Received on Monday, 29 May 2000 02:53:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:47 GMT