Alright, that didn't quite work sadly, as the base class overload is always called. Tacking a slightly different tack, so far I've:
- Added EntityResolver2 as described at http://sax.sourceforge.net/apidoc/org/xml/sax/ext/EntityResolver2.html - Added the feature flag http://xml.org/sax/features/use-entity-resolver2 defaulting to true - In order to distinguish between ER2 and ER without RTTI added "getEntityResolverVersion" to EntityResolver which allows doing the right thing with a static_cast - Modified the SAX2 parser to call resolveEntity with the baseURI Things I'm not clear on: - Where 'name' should come from. Description: Identifies the external entity being resolved. Either "[dtd]" for the external subset, or a name starting with "%" to indicate a parameter entity, or else the name of a general entity. This is never null when invoked by a SAX2 parser. Looks to me like I need to modify ReaderMgr::createReader to pass this information in as well, and modify the resolveEntity() function to take name as a paramter. Is that right? - Which other parsers require this modification. There seem to be a lot of them, and I'm not clear on what they all do. - Add ER2 derivation to DefaultHandler. DefaultHandler appears to be a mismash of the SAX2 DefaultHandler2 and DefaultHandler implementations. Could call this DefaultHandler2 or add a DefaultHandler2 that overrides getEntityResolverVersion (thus preserving backward compatiblity) - How to implement getExternalSubset. I'm entirely clueless on this. Obviously lots of pointers required here. I have got it to the point where I can do what I want, but I'm sure that's not entirely helpful :) Mark > -----Original Message----- > From: Mark Weaver [mailto:[EMAIL PROTECTED] > Sent: 03 April 2003 19:21 > To: [EMAIL PROTECTED] > Subject: RE: EntityResolver doesn't receive the baseURI (repost) > > > My reading of it was that you need an overload for setEntityResolver that > takes an EntityResolver2 and does the right thing dependent on if you have > ER2, ER, or nothing and if the appropriate features flag is set. I was > planning on implementing it in this fashion. Does this seem OK? > > Mark > > > -----Original Message----- > > From: Gareth Reakes [mailto:[EMAIL PROTECTED] > > Sent: 03 April 2003 16:01 > > To: [EMAIL PROTECTED] > > Subject: RE: EntityResolver doesn't receive the baseURI (repost) > > > > > > Hi, > > sorry about the lack of response the first time. Is there a reason > > why you can't go over to use the official DOM stuff? If so perhaps we > > should have 2 constructors so we don't break backwards > compatibility. How > > does this sound to you? > > > > Gareth > > > > -- > > Gareth Reakes, Head of Product Development +44-1865-203192 > > DecisionSoft Limited http://www.decisionsoft.com > > XML Development and Services > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
