- From: Caroline Rioux <crioux@decisionsoft.com>
- Date: Thu, 27 Mar 2003 05:22:27 -0500 (EST)
- To: www-dom@w3.org
Hi, I have some concerns about the DOMConfiguration interface that was recently introduced in DOM Level 3. After implementing an old version of the spec, (http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20021022/core.html#DOMConfiguration) containing different method signatures for boolean parameters (ie setBooleanParameter, getBooleanParameter), I was suprised to see that the new spec does not distinguish between features and regular parameters, and considers them all to be DOMUserData. In a C++ implementation, for example in xerces-c, one would have to rely on void *, which is not particularly type-safe without the use of RTTI. It also means one cannot distinguish between int and bool, since both are integers in C++. I don't understand why the interface relies on DOMUserData, when types for all underlying parameters are defined. Wouldn't it be preferable to have specific methods like 'void setErrorHandler(DOMErrorHandler handler)', for the parameters and 'void setBooleanParameter(DOMString feature, boolean flag)' for features, so that they could be type safe? I understand that expandability is an argument for the current interface, and I could understand that a non-type-safe method could be provided, but I am not overly comfortable with the 'cast and hope' scheme. :-) Thanks very much in advance, Caroline -- Caroline Rioux, Software Engineer +44-1865-203192 DecisionSoft Limited http://www.decisionsoft.com XML Development and Services
Received on Thursday, 27 March 2003 14:14:13 UTC