java.lang.Object
io.sf.carte.doc.xml.dtd.EntityFinder
Entity finder.
Useful if you want to find the entity equivalences to a set of codepoints, as found in a DTD.
-
Constructor Summary
ConstructorDescriptionEntityFinder
(EntityResolver2 resolver) Construct a new EntityFinder that uses the givenEntityResolver2
. -
Method Summary
Modifier and TypeMethodDescriptionint
findEntities
(Map<Integer, String> codePoint2Entity, Reader dtdReader) Find the entities corresponding to the keys in the supplied map, and put them as the corresponding map values.
-
Constructor Details
-
EntityFinder
Construct a new EntityFinder that uses the givenEntityResolver2
.- Parameters:
resolver
- the resolver to use when resolving the entities.
-
-
Method Details
-
findEntities
Find the entities corresponding to the keys in the supplied map, and put them as the corresponding map values.- Parameters:
codePoint2Entity
- the codePoint-entity map.dtdReader
- reads from a DTD.- Returns:
- the number of entity mappings that could be made. It is always less or equal to the size of the supplied map.
- Throws:
IOException
- if an I/O error occurred while reading the DTD.
-