On Fri, 2010-08-20 at 08:19 -0400, Michael Glavassevich wrote:
> Perhaps EntityResolver2.getExternalSubset() is only part of the
> solution. Can you show concrete examples where this wouldn't work on
> its own?

Based on what you said, I had assumed that something like this would not
work:
http://anonsvn.jboss.org/repos/hibernate/core/trunk/documentation/manual/src/main/docbook/en-US/HIBERNATE_-_Relational_Persistence_for_Idiomatic_Java.xml

Because we have:
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"; [ 
<!ENTITY % BOOK_ENTITIES SYSTEM 
"HIBERNATE_-_Relational_Persistence_for_Idiomatic_Java.ent">
%BOOK_ENTITIES;
]>

So essentially we reference an external set of entities:
http://anonsvn.jboss.org/repos/hibernate/core/trunk/documentation/manual/src/main/docbook/en-US/HIBERNATE_-_Relational_Persistence_for_Idiomatic_Java.ent

> 
> Note that if a document already has an external subset your instance
> of EntityResolver2 will get a call to resolveEntity() and you can tell
> by the entity name "[dtd]" that the parser is asking you to resolve
> it. That's also an opportunity to inject whatever entity declarations
> you want to add and could include the DTD you were asked to resolve
> through a parameter entity.
> 
> > Which takes me back to the question of a custom XIncludeHandler and
> (a)
> > whether that is a valid option and (b) how to properly make sure my
> > custom XIncludeHandler gets used in the pipeline.
> 
> There's no supported way of doing that. You would have to reach into
> the implementation and if you managed to get something working your
> application could be broken with a future release of Xerces. We make
> no guarantees on the stability of internal components and warn users
> in the Javadoc that they're on shaky ground if they choose that path.
> 
> > -- 
> > Steve Ebersole <st...@hibernate.org>
> > http://hibernate.org
> > 
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org
> > For additional commands, e-mail: j-users-h...@xerces.apache.org
> 
> Thanks.
> 
> Michael Glavassevich
> XML Parser Development
> IBM Toronto Lab
> E-mail: mrgla...@ca.ibm.com
> E-mail: mrgla...@apache.org
> 

-- 
Steve Ebersole <st...@hibernate.org>
http://hibernate.org


---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org
For additional commands, e-mail: j-users-h...@xerces.apache.org

Reply via email to