[Libxmlplusplus-general] SAXParser: preventing expansion of predefined entities



Hi guys,

I've been playing around with libxml++ for a couple of days, trying to
figure out if we want to use it in a new project we're starting. It
looks like we'll be using libxml, but would like a nice C++ interface
to it.

AFAICT there's no way to use the libxml++'s SAX interface without
expanding the standard entities (& etc), is that right?

To clarify, I'm parsing an XML doc with the SAX parser, outputting it
with some extra elements added dynamically (this is only a test for now,
so ignore whether or not this is the best technique :-)
I then pass the resulting output to libxslt. The libxml++ SAXparser's
_callback_get_entity() member is private, so I can't override it, and
it always expands "&" to "&" which causes an error when the doc is
passed to XSLT.

This behaviour ignores the value of the xmlSubstituteEntitiesDefault
global property, and AFAICT there's no way to change it (if I'm wrong
here, please point me the right way and I'll stroll off in that
direction!)

Is there a good reason for this, or would you be willing to accept a
patch to (off the top of my head) make _callback_get_entity() call a
protected virtual function, so that derived classes can alter the
behaviour?

Thanks for your time,

jon


-- 
"There are basically two types of people. People who accomplish things,
 and people who claim to have accomplished things.
 The first group is less crowded."
	- Mark Twain




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