forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Blaschke <mailing-li...@rblasch.org>
Subject Re: License & Copyright concerns Re: [plugins] pod-input auto install
Date Sun, 23 Jan 2005 13:22:50 GMT
David Crossley wrote:
> Ron Blaschke wrote:
>> Rick Tessner wrote:
[snip]
>> 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









Mime
View raw message