Re: [gdome]Feedback on using gdome2 in C++ via gmetadom (and a problem with charsets)



Hi Enrico,

>  DOMString lacks a constructor, and assignment operator that reads a
>  std::string value, and an assignment operation for std::string that
>  reads a DOMString value.  It is not essential, but it would be greatly
>  appreciated.

and it wouldn't be difficult at all. The only thing I'm concerned about is
that using std::string inside DOMString.hh will cause the inclusion of a
not-so-small .h file of the standard library into many DOM files, and
consequently many user files.

The alternative possibility is to have helper functions (say in
DOMStringAux), but they wouldn't be as natural as a constructor and an
assignment operator.

I'm quite open to this improvement, perhaps somebody has other suggestions
or comments on the best way to go.

>  Exception error codes have something wrong, since I've seen exceptions
>  with codes pretty different from these declared as constants in
>  DOMException::DOMExceptionCode.  One example is at the end of the message.

exception 100 is an internal exception thrown by gdome2 when a method is
invoked on a NULL object. In fact it should be classified as a different
exception other than DOMException. This is another point where the binding
(and gdome2 itself) should be improved.

>  If I add a node twice to some other node, the second time the operation
>  fails doing nothing, without throwing exceptions or giving other
>  feedbacks.

I suspect it might be a gdome2 bug. I would suggest to write the smallest
gdome2 program reproducing the problem, and posting the source on the
mailing list.

> Then I'd wish to submit you a small problem I have.
[snip, about utf-8 encodings]

Again, a small .xml file and a complete (small!) program with the problem
woule be a great help. It might be a problem in the conversion
UTF-8/UTF-16 done by gmetadom, or a low-level problem in libxml2, but I
think the latter is less likely (libxml2 is quite well tested).

Regards,
luca





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]