Chih-Hsiang is having problems posting here, so I'm forwarding this note on for him.
If no one sees any problems, we will be making the changes he describes below. -- Andy ----- Original Message ----- From: "Chih-Hsiang Chou" <[EMAIL PROTECTED]> To: "xerces-dev" <[EMAIL PROTECTED]> Sent: Tuesday, February 01, 2000 3:35 PM Subject: Proposed Xerces-C API Changes To better match with the DOM IDL APIs, the Xerces-C parser team is proposing the following DOM_* API changes in its parser implementation. Please review the changes and post your comments or concerns here within 24 hours. We would like to integrate the changes to the next release scheduled this Friday. Each API change has three parts, separated by dashed lines. The top one is what defined in the IDL. The middle one is current C++ mapping of the IDL in our implementations. And the bottom one is the new proposed changes. Most changes are related to converting "int" to "unsigned long". Others changes include redefining and reorganizing the constants used in the Traversal APIs. Note that the attribute "whatToShow" is declared as a "long" in the IDL which is a bug. The new C++ API uses the correct "unsigned long" instead. NodeList Node item(in unsigned long index); readonly attribute unsigned long length; ---------------------------------------------------------------- DOM_NodeList.hpp DOM_Node item(unsigned long index) const; int getLength() const; ---------------------------------------------------------------- DOM_NodeList.hpp DOM_Node item(unsigned long index) const; // no changes unsigned long getLength() const; NamedNodeMap Node item(in unsigned long index); readonly attribute unsigned long length; ---------------------------------------------------------------- DOM_NamedNodeMap.hpp DOM_Node item(unsigned long index); int getLength(); ---------------------------------------------------------------- DOM_NamedNodeMap.hpp DOM_Node item(unsigned long index); // no changes unsigned long getLength(); CharacterData readonly attribute unsigned long length; DOMString substringData(in unsigned long offset, in unsigned long count) void insertData(in unsigned long offset, in DOMString arg) void deleteData(in unsigned long offset, in unsigned long count) void replaceData(in unsigned long offset, in unsigned long count, in DOMString arg) ---------------------------------------------------------------- DOM_CharacterData.hpp int getLength() const; DOMString substringData(int offset, int count) const; void insertData(int offset, const DOMString &arg); void deleteData(int offset, int count); void replaceData(int offset, int count, const DOMString &arg); ---------------------------------------------------------------- DOM_CharacterData.hpp unsigned long getLength() const; DOMString substringData(unsigned long offset, unsigned long count) const; void insertData(unsigned long offset, const DOMString &arg); void deleteData(unsigned long offset, unsigned long count); void replaceData(unsigned long offset, unsigned long count, const DOMString &arg); Text Text splitText(in unsigned long offset) ---------------------------------------------------------------- DOM_Text.hpp DOM_Text splitText(int offset); ---------------------------------------------------------------- DOM_Text.hpp DOM_Text splitText(unsigned long offset); NodeFilter // Constants returned by acceptNode const short FILTER_ACCEPT = 1; const short FILTER_REJECT = 2; const short FILTER_SKIP = 3; // Constants for whatToShow const unsigned long SHOW_ALL = 0x0000FFFF; const unsigned long SHOW_ELEMENT = 0x00000001; const unsigned long SHOW_ATTRIBUTE = 0x00000002; const unsigned long SHOW_TEXT = 0x00000004; const unsigned long SHOW_CDATA_SECTION = 0x00000008; const unsigned long SHOW_ENTITY_REFERENCE = 0x00000010; const unsigned long SHOW_ENTITY = 0x00000020; const unsigned long SHOW_PROCESSING_INSTRUCTION = 0x00000040; const unsigned long SHOW_COMMENT = 0x00000080; const unsigned long SHOW_DOCUMENT = 0x00000100; const unsigned long SHOW_DOCUMENT_TYPE = 0x00000200; const unsigned long SHOW_DOCUMENT_FRAGMENT = 0x00000400; const unsigned long SHOW_NOTATION = 0x00000800; short acceptNode(in Node n); ---------------------------------------------------------------- DOM_NodeFilter.hpp enum FilterAction {ACCEPT, REJECT, SKIP}; virtual FilterAction acceptNode (DOM_Node node); ---------------------------------------------------------------- DOM_NodeFilter.hpp enum FilterAction {ACCEPT, REJECT, SKIP}; // no changes enum ShowType {SHOW_ALL=0x0000FFFF, ...} // added virtual short acceptNode (DOM_Node node); NodeIterator readonly attribute long whatToShow; ---------------------------------------------------------------- DOM_NodeIterator.hpp static const int SHOW_ALL; static const int SHOW_ELEMENT; static const int SHOW_ATTRIBUTE; static const int SHOW_TEXT; static const int SHOW_CDATA_SECTION; static const int SHOW_ENTITY_REFERENCE; static const int SHOW_ENTITY; static const int SHOW_PROCESSING_INSTRUCTION; static const int SHOW_COMMENT; static const int SHOW_DOCUMENT; static const int SHOW_DOCUMENT_TYPE; static const int SHOW_DOCUMENT_FRAGMENT; static const int SHOW_NOTATION; virtual int getWhatToShow(); ---------------------------------------------------------------- DOM_NodeIterator.hpp // all SHOW_* constants deleted virtual unsigned long getWhatToShow(); TreeWalker readonly attribute long whatToShow; ---------------------------------------------------------------- DOM_TreeWalker.hpp static const int SHOW_ALL; static const int SHOW_ELEMENT; static const int SHOW_ATTRIBUTE; static const int SHOW_TEXT; static const int SHOW_CDATA_SECTION; static const int SHOW_ENTITY_REFERENCE; static const int SHOW_ENTITY; static const int SHOW_PROCESSING_INSTRUCTION; static const int SHOW_COMMENT; static const int SHOW_DOCUMENT; static const int SHOW_DOCUMENT_TYPE; static const int SHOW_DOCUMENT_FRAGMENT; static const int SHOW_NOTATION; virtual int getWhatToShow(); ---------------------------------------------------------------- DOM_TreeWalker.hpp // all SHOW_* constants deleted virtual unsigned long getWhatToShow(); Chih-Hsiang Chou IBM Center for Java Technology - Silicon Valley [EMAIL PROTECTED]