>
> > > > 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
> >
t; > > 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
> >
t 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 ta
tityResolver2 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
er 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 w
at'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 pro
ntityResolver2.getExternalSubset
approach is not going to work here.
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.
--
Steve Ebersole
http://hibernate.org
On Tue, 2010-08-17 at 17:15 -0400, Michael Glavassevich wrote:
> > Oh, I need this to happen even if there is already a DTD. It will
> in
> > all likelihood have a DTD declared. I just need to inject some
> entities
> > into it.
>
> Unless you've written your own XML parser how can you reliably
Steve Ebersole wrote on 08/17/2010 05:05:07 PM:
> On Tue, 2010-08-17 at 16:55 -0400, Michael Glavassevich wrote:
> > EntityResolver.resolveEntity() is called for any kind of external
> > resource, not necessarily XML, that the parser is trying to load.
>
> Ok, good to know. Thanks!
>
> > I am su
Steve Ebersole wrote on 08/17/2010 05:03:09 PM:
> On Tue, 2010-08-17 at 15:38 -0500, Steve Ebersole wrote:
> > On Tue, 2010-08-17 at 16:24 -0400, Michael Glavassevich wrote:
> > > Sure but the second one is a text include. This is not processed as
an
> > > XML document, even if it looks like one,
On Tue, 2010-08-17 at 16:55 -0400, Michael Glavassevich wrote:
> EntityResolver.resolveEntity() is called for any kind of external
> resource, not necessarily XML, that the parser is trying to load.
Ok, good to know. Thanks!
> I am suggesting that you use a different method which is only called
On Tue, 2010-08-17 at 15:38 -0500, Steve Ebersole wrote:
> On Tue, 2010-08-17 at 16:24 -0400, Michael Glavassevich wrote:
> > Sure but the second one is a text include. This is not processed as an
> > XML document, even if it looks like one, so
> > EntityResolver2.getExternalSubset() won't be calle
Steve Ebersole wrote on 08/17/2010 04:38:03 PM:
> Steve Ebersole
>
> Please respond to j-users
>
> On Tue, 2010-08-17 at 16:24 -0400, Michael Glavassevich wrote:
> > Sure but the second one is a text include. This is not processed as an
> > XML document, even if it looks like one, so
> > EntityR
On Tue, 2010-08-17 at 16:24 -0400, Michael Glavassevich wrote:
> Sure but the second one is a text include. This is not processed as an
> XML document, even if it looks like one, so
> EntityResolver2.getExternalSubset() won't be called for it.
Even though EntityResolver is called? I'll try, but a
Steve,
Steve Ebersole wrote on 08/17/2010 04:00:37 PM:
> Hey Michael.
>
> I'll look into that for sure as like you said it probably allows me to
> apply the entities more easily.
>
> But I don't think that allows me to apply the DOCTYPE only to xincluded
> documents only when the the xinclude pa
Hey Michael.
I'll look into that for sure as like you said it probably allows me to
apply the entities more easily.
But I don't think that allows me to apply the DOCTYPE only to xincluded
documents only when the the xinclude parse type is xml. Thats the real
problem I am facing.
Imagine a do
Hi Steve,
Have you tried EntityResolver2.getExternalSubset() [1]? This was designed
for injecting a DTD external subset into an XML document which doesn't have
one. It should be more reliable than the method you're using.
Thanks.
[1]
http://xerces.apache.org/xerces2-j/javadocs/api/org/xml/sax/e
I have a requirement to inject custom DOCTYPE entity declarations into
xincluded documents. Currently I am using an org.xml.sax.EntityResolver
to accomplish this. When my EntityResolver[1] understands a request it
creates and returns a special InputSource[2]. This however gives me
problems with
18 matches
Mail list logo