[xml] Return value of SAX getEntity callback.



Hi all,

I've added a getEntity callback to the SAX handler in libxml++ (a C++
wrapper around libxml2) and have a question about the return value.

Because of the way the SaxHandler class is implemented there has to be a
default handler for the getEntity event, which users can then override
to change the behaviour (as opposed to the C API where you just don't
provide a getEntity callback if you're not interested in the event). 

Currently the default action is to do a lookup with
xmlGetPredefinedEntity(), but this will obviously only work if the
entity *is* one of the predefined set. Looking at the libxml2 code again
I think returning a null xmlEntityPtr is the right thing to do, can
anyone confirm that, or point me in the right direction for a better
default?

Thanks very much,

jon

-- 
"In times like these, it helps to recall that there have always been
 times like these."
        - Paul Harvey



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