forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <cross...@apache.org>
Subject entity resolution with POD input
Date Sun, 23 Jan 2005 23:00:04 GMT
Ron Blaschke wrote:
> David Crossley wrote:
> > Ron Blaschke wrote:
> >> If not, can anybody recommend a DTD parser that is available under the
> >> Apache License?  jpod uses it to resolve E<entity> formatting codes,
> >> which are akin to &entity; in XML.
> 
> > Forrest has its internal Catalog Entity Resolver to handle that.
> 
> > Anyway, i am not sure what you mean by "DTD parser".
> > Forrest includes NekoDTD if that task is what you mean.
> 
> Sorry, guess I am too deep into the code, not spelling things out.
> Pod supports entities as E<entity>, akin to &entity; in XML.  But
> instead of just passing them on (E<uuml> -> &uuml;), I thought it
> would be good to resolve them locally.
>
> So, what I am actually needing
> is a library that would return "?" when I'd ask for "uuml".
> 
> Since the entities are already available as DTDs (ISOlat1.pen, ...) I
> reckoned I might as well just use them.  Therefore, I parse the DTDs,
> grab the entity and ask for its "literal value".
> 
> In other words:
>     final DTDParser parser = new DTDParser();
>     parser.parse(...);
>     final Entity entity = parser.getDocType().getEntity(entityName);
>     if (entity != null) {
>         return entity.getLiteralValue();
>     }
> 
> Ron

This sounds like a lot of extra work to me. Cocoon's machinery
handles the entities later in the process. So why try to circumvent
that. Wouldn't it better just to do the E<uuml> -> &uuml; in your
input generation?

--David

Mime
View raw message