下面列出了怎么用org.w3c.dom.Entity的API类实例代码及写法,或者点击链接到github查看源代码。
/**
* Returns the markup content of the given entity name in the external entities
* and null otherwise.
*
* @param entityName the entity name to search.
* @param entityRange the hovered range.
* @param document the DOM document
* @param request the hover request.
* @return the markup content of the given entity name in the external entities
* and null otherwise.
*/
private static MarkupContent searchInExternalEntities(String entityName, Range entityRange, DOMDocument document,
IHoverRequest request) {
ContentModelManager contentModelManager = request.getComponent(ContentModelManager.class);
Collection<CMDocument> cmDocuments = contentModelManager.findCMDocument(document, null, false);
for (CMDocument cmDocument : cmDocuments) {
List<Entity> entities = cmDocument.getEntities();
for (Entity ent : entities) {
DTDEntityDecl entity = (DTDEntityDecl) ent;
if (entityName.equals(entity.getName())) {
boolean markdown = request.canSupportMarkupKind(MarkupKind.MARKDOWN);
return EntitiesDocumentationUtils.getDocumentation(entity, EntityOriginType.EXTERNAL, markdown);
}
}
}
return null;
}
/**
* Collect local entities declared in the DOCTYPE.
*
* @param document the DOM document.
* @param entityRange the entity range.
* @param markdown true if the documentation can be formatted as markdown and
* false otherwise.
* @param response the completion response.
*/
private static void collectLocalEntityProposals(DOMDocument document, Range entityRange, boolean markdown,
ICompletionResponse response) {
DOMDocumentType docType = document.getDoctype();
if (docType == null) {
return;
}
NamedNodeMap entities = docType.getEntities();
for (int i = 0; i < entities.getLength(); i++) {
Entity entity = (Entity) entities.item(i);
if (entity.getNodeName() != null) {
// provide completion for the locally declared entity
MarkupContent documentation = EntitiesDocumentationUtils.getDocumentation((DTDEntityDecl) entity,
EntityOriginType.LOCAL, markdown);
fillCompletion(entity.getNodeName(), documentation, entityRange, response);
}
}
}
/**
* Collect external entities.
*
* @param document the DOM document.
* @param entityRange the entity range.
* @param markdown true if the documentation can be formatted as markdown and
* false otherwise.
* @param request the completion request.
* @param response the completion response.
*/
private static void collectExternalEntityProposals(DOMDocument document, Range entityRange, boolean markdown,
ICompletionRequest request, ICompletionResponse response) {
ContentModelManager contentModelManager = request.getComponent(ContentModelManager.class);
Collection<CMDocument> cmDocuments = contentModelManager.findCMDocument(document, null, false);
for (CMDocument cmDocument : cmDocuments) {
List<Entity> entities = cmDocument.getEntities();
for (Entity entity : entities) {
if (entity.getNodeName() != null) {
// provide completion for the external declared entity
MarkupContent documentation = EntitiesDocumentationUtils.getDocumentation((DTDEntityDecl) entity,
EntityOriginType.EXTERNAL, markdown);
fillCompletion(entity.getNodeName(), documentation, entityRange, response);
}
}
}
}
/**
* The getUnparsedEntityURI function returns the URI of the unparsed
* entity with the specified name in the same document as the context
* node (see [3.3 Unparsed Entities]). It returns the empty string if
* there is no such entity.
*/
public String getUnparsedEntityURI(String name)
{
// Special handling for DOM input
if (_document != null) {
String uri = "";
DocumentType doctype = _document.getDoctype();
if (doctype != null) {
NamedNodeMap entities = doctype.getEntities();
if (entities == null) {
return uri;
}
Entity entity = (Entity) entities.getNamedItem(name);
if (entity == null) {
return uri;
}
String notationName = entity.getNotationName();
if (notationName != null) {
uri = entity.getSystemId();
if (uri == null) {
uri = entity.getPublicId();
}
}
}
return uri;
}
else {
return super.getUnparsedEntityURI(name);
}
}
/**
* NON-DOM Factory method; creates an Entity having this Document as its
* OwnerDoc. (REC-DOM-Level-1-19981001 left the process of building DTD
* information unspecified.)
*
* @param name The name of the Entity we wish to provide a value for.
*
* @throws DOMException(NOT_SUPPORTED_ERR) for HTML documents, where
* nonstandard entities are not permitted. (HTML not yet implemented.)
*/
public Entity createEntity(String name)
throws DOMException {
if (errorChecking && !isXMLName(name, xml11Version)) {
String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "INVALID_CHARACTER_ERR", null);
throw new DOMException(DOMException.INVALID_CHARACTER_ERR, msg);
}
return new EntityImpl(this, name);
}
public boolean isEntityUnparsed(String name) {
if (fEntities != null) {
Entity entity = (Entity) fEntities.getNamedItem(name);
if (entity != null) {
return (entity.getNotationName() != null);
}
}
return false;
}
public void doctypeDecl(DocumentType node) throws XNIException {
/** Create new DocumentType node for the target. */
if (fDocumentImpl != null) {
DocumentType docType = fDocumentImpl.createDocumentType(node.getName(), node.getPublicId(), node.getSystemId());
final String internalSubset = node.getInternalSubset();
/** Copy internal subset. */
if (internalSubset != null) {
((DocumentTypeImpl) docType).setInternalSubset(internalSubset);
}
/** Copy entities. */
NamedNodeMap oldMap = node.getEntities();
NamedNodeMap newMap = docType.getEntities();
int length = oldMap.getLength();
for (int i = 0; i < length; ++i) {
Entity oldEntity = (Entity) oldMap.item(i);
EntityImpl newEntity = (EntityImpl) fDocumentImpl.createEntity(oldEntity.getNodeName());
newEntity.setPublicId(oldEntity.getPublicId());
newEntity.setSystemId(oldEntity.getSystemId());
newEntity.setNotationName(oldEntity.getNotationName());
newMap.setNamedItem(newEntity);
}
/** Copy notations. */
oldMap = node.getNotations();
newMap = docType.getNotations();
length = oldMap.getLength();
for (int i = 0; i < length; ++i) {
Notation oldNotation = (Notation) oldMap.item(i);
NotationImpl newNotation = (NotationImpl) fDocumentImpl.createNotation(oldNotation.getNodeName());
newNotation.setPublicId(oldNotation.getPublicId());
newNotation.setSystemId(oldNotation.getSystemId());
newMap.setNamedItem(newNotation);
}
append(docType);
}
}
/**
* The getUnparsedEntityURI function returns the URI of the unparsed
* entity with the specified name in the same document as the context
* node (see [3.3 Unparsed Entities]). It returns the empty string if
* there is no such entity.
*/
public String getUnparsedEntityURI(String name)
{
// Special handling for DOM input
if (_document != null) {
String uri = "";
DocumentType doctype = _document.getDoctype();
if (doctype != null) {
NamedNodeMap entities = doctype.getEntities();
if (entities == null) {
return uri;
}
Entity entity = (Entity) entities.getNamedItem(name);
if (entity == null) {
return uri;
}
String notationName = entity.getNotationName();
if (notationName != null) {
uri = entity.getSystemId();
if (uri == null) {
uri = entity.getPublicId();
}
}
}
return uri;
}
else {
return super.getUnparsedEntityURI(name);
}
}
/**
* NON-DOM Factory method; creates an Entity having this Document as its
* OwnerDoc. (REC-DOM-Level-1-19981001 left the process of building DTD
* information unspecified.)
*
* @param name The name of the Entity we wish to provide a value for.
*
* @throws DOMException(NOT_SUPPORTED_ERR) for HTML documents, where
* nonstandard entities are not permitted. (HTML not yet implemented.)
*/
public Entity createEntity(String name)
throws DOMException {
if (errorChecking && !isXMLName(name, xml11Version)) {
String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "INVALID_CHARACTER_ERR", null);
throw new DOMException(DOMException.INVALID_CHARACTER_ERR, msg);
}
return new EntityImpl(this, name);
}
public boolean isEntityUnparsed(String name) {
if (fEntities != null) {
Entity entity = (Entity) fEntities.getNamedItem(name);
if (entity != null) {
return (entity.getNotationName() != null);
}
}
return false;
}
public void doctypeDecl(DocumentType node) throws XNIException {
/** Create new DocumentType node for the target. */
if (fDocumentImpl != null) {
DocumentType docType = fDocumentImpl.createDocumentType(node.getName(), node.getPublicId(), node.getSystemId());
final String internalSubset = node.getInternalSubset();
/** Copy internal subset. */
if (internalSubset != null) {
((DocumentTypeImpl) docType).setInternalSubset(internalSubset);
}
/** Copy entities. */
NamedNodeMap oldMap = node.getEntities();
NamedNodeMap newMap = docType.getEntities();
int length = oldMap.getLength();
for (int i = 0; i < length; ++i) {
Entity oldEntity = (Entity) oldMap.item(i);
EntityImpl newEntity = (EntityImpl) fDocumentImpl.createEntity(oldEntity.getNodeName());
newEntity.setPublicId(oldEntity.getPublicId());
newEntity.setSystemId(oldEntity.getSystemId());
newEntity.setNotationName(oldEntity.getNotationName());
newMap.setNamedItem(newEntity);
}
/** Copy notations. */
oldMap = node.getNotations();
newMap = docType.getNotations();
length = oldMap.getLength();
for (int i = 0; i < length; ++i) {
Notation oldNotation = (Notation) oldMap.item(i);
NotationImpl newNotation = (NotationImpl) fDocumentImpl.createNotation(oldNotation.getNodeName());
newNotation.setPublicId(oldNotation.getPublicId());
newNotation.setSystemId(oldNotation.getSystemId());
newMap.setNamedItem(newNotation);
}
append(docType);
}
}
/**
* The getUnparsedEntityURI function returns the URI of the unparsed
* entity with the specified name in the same document as the context
* node (see [3.3 Unparsed Entities]). It returns the empty string if
* there is no such entity.
*/
public String getUnparsedEntityURI(String name)
{
// Special handling for DOM input
if (_document != null) {
String uri = "";
DocumentType doctype = _document.getDoctype();
if (doctype != null) {
NamedNodeMap entities = doctype.getEntities();
if (entities == null) {
return uri;
}
Entity entity = (Entity) entities.getNamedItem(name);
if (entity == null) {
return uri;
}
String notationName = entity.getNotationName();
if (notationName != null) {
uri = entity.getSystemId();
if (uri == null) {
uri = entity.getPublicId();
}
}
}
return uri;
}
else {
return super.getUnparsedEntityURI(name);
}
}
public boolean isEntityUnparsed(String name) {
if (fEntities != null) {
Entity entity = (Entity) fEntities.getNamedItem(name);
if (entity != null) {
return (entity.getNotationName() != null);
}
}
return false;
}
public void doctypeDecl(DocumentType node) throws XNIException {
/** Create new DocumentType node for the target. */
if (fDocumentImpl != null) {
DocumentType docType = fDocumentImpl.createDocumentType(node.getName(), node.getPublicId(), node.getSystemId());
final String internalSubset = node.getInternalSubset();
/** Copy internal subset. */
if (internalSubset != null) {
((DocumentTypeImpl) docType).setInternalSubset(internalSubset);
}
/** Copy entities. */
NamedNodeMap oldMap = node.getEntities();
NamedNodeMap newMap = docType.getEntities();
int length = oldMap.getLength();
for (int i = 0; i < length; ++i) {
Entity oldEntity = (Entity) oldMap.item(i);
EntityImpl newEntity = (EntityImpl) fDocumentImpl.createEntity(oldEntity.getNodeName());
newEntity.setPublicId(oldEntity.getPublicId());
newEntity.setSystemId(oldEntity.getSystemId());
newEntity.setNotationName(oldEntity.getNotationName());
newMap.setNamedItem(newEntity);
}
/** Copy notations. */
oldMap = node.getNotations();
newMap = docType.getNotations();
length = oldMap.getLength();
for (int i = 0; i < length; ++i) {
Notation oldNotation = (Notation) oldMap.item(i);
NotationImpl newNotation = (NotationImpl) fDocumentImpl.createNotation(oldNotation.getNodeName());
newNotation.setPublicId(oldNotation.getPublicId());
newNotation.setSystemId(oldNotation.getSystemId());
newMap.setNamedItem(newNotation);
}
append(docType);
}
}
/**
* The getUnparsedEntityURI function returns the URI of the unparsed
* entity with the specified name in the same document as the context
* node (see [3.3 Unparsed Entities]). It returns the empty string if
* there is no such entity.
*/
public String getUnparsedEntityURI(String name)
{
// Special handling for DOM input
if (_document != null) {
String uri = "";
DocumentType doctype = _document.getDoctype();
if (doctype != null) {
NamedNodeMap entities = doctype.getEntities();
if (entities == null) {
return uri;
}
Entity entity = (Entity) entities.getNamedItem(name);
if (entity == null) {
return uri;
}
String notationName = entity.getNotationName();
if (notationName != null) {
uri = entity.getSystemId();
if (uri == null) {
uri = entity.getPublicId();
}
}
}
return uri;
}
else {
return super.getUnparsedEntityURI(name);
}
}
/**
* NON-DOM Factory method; creates an Entity having this Document as its
* OwnerDoc. (REC-DOM-Level-1-19981001 left the process of building DTD
* information unspecified.)
*
* @param name The name of the Entity we wish to provide a value for.
*
* @throws DOMException(NOT_SUPPORTED_ERR) for HTML documents, where
* nonstandard entities are not permitted. (HTML not yet implemented.)
*/
public Entity createEntity(String name)
throws DOMException {
if (errorChecking && !isXMLName(name, xml11Version)) {
String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "INVALID_CHARACTER_ERR", null);
throw new DOMException(DOMException.INVALID_CHARACTER_ERR, msg);
}
return new EntityImpl(this, name);
}
public boolean isEntityUnparsed(String name) {
if (fEntities != null) {
Entity entity = (Entity) fEntities.getNamedItem(name);
if (entity != null) {
return (entity.getNotationName() != null);
}
}
return false;
}
public void doctypeDecl(DocumentType node) throws XNIException {
/** Create new DocumentType node for the target. */
if (fDocumentImpl != null) {
DocumentType docType = fDocumentImpl.createDocumentType(node.getName(), node.getPublicId(), node.getSystemId());
final String internalSubset = node.getInternalSubset();
/** Copy internal subset. */
if (internalSubset != null) {
((DocumentTypeImpl) docType).setInternalSubset(internalSubset);
}
/** Copy entities. */
NamedNodeMap oldMap = node.getEntities();
NamedNodeMap newMap = docType.getEntities();
int length = oldMap.getLength();
for (int i = 0; i < length; ++i) {
Entity oldEntity = (Entity) oldMap.item(i);
EntityImpl newEntity = (EntityImpl) fDocumentImpl.createEntity(oldEntity.getNodeName());
newEntity.setPublicId(oldEntity.getPublicId());
newEntity.setSystemId(oldEntity.getSystemId());
newEntity.setNotationName(oldEntity.getNotationName());
newMap.setNamedItem(newEntity);
}
/** Copy notations. */
oldMap = node.getNotations();
newMap = docType.getNotations();
length = oldMap.getLength();
for (int i = 0; i < length; ++i) {
Notation oldNotation = (Notation) oldMap.item(i);
NotationImpl newNotation = (NotationImpl) fDocumentImpl.createNotation(oldNotation.getNodeName());
newNotation.setPublicId(oldNotation.getPublicId());
newNotation.setSystemId(oldNotation.getSystemId());
newMap.setNamedItem(newNotation);
}
append(docType);
}
}
/**
* Search the given entity name in the external entities.
*
* @param document the DOM document.
* @param entityName the entity name.
* @param entityRange the entity range.
* @param locations the location links
* @param request the definition request.
* @param cancelChecker the cancel checker.
*/
private static void searchInExternalEntities(String entityName, Range entityRange, DOMDocument document,
List<LocationLink> locations, IDefinitionRequest request, CancelChecker cancelChecker) {
ContentModelManager contentModelManager = request.getComponent(ContentModelManager.class);
Collection<CMDocument> cmDocuments = contentModelManager.findCMDocument(document, null, false);
for (CMDocument cmDocument : cmDocuments) {
List<Entity> entities = cmDocument.getEntities();
for (Entity entity : entities) {
fillEntityLocation((DTDEntityDecl) entity, entityName, entityRange, locations);
}
}
}
/**
* The getUnparsedEntityURI function returns the URI of the unparsed
* entity with the specified name in the same document as the context
* node (see [3.3 Unparsed Entities]). It returns the empty string if
* there is no such entity.
*/
public String getUnparsedEntityURI(String name)
{
// Special handling for DOM input
if (_document != null) {
String uri = "";
DocumentType doctype = _document.getDoctype();
if (doctype != null) {
NamedNodeMap entities = doctype.getEntities();
if (entities == null) {
return uri;
}
Entity entity = (Entity) entities.getNamedItem(name);
if (entity == null) {
return uri;
}
String notationName = entity.getNotationName();
if (notationName != null) {
uri = entity.getSystemId();
if (uri == null) {
uri = entity.getPublicId();
}
}
}
return uri;
}
else {
return super.getUnparsedEntityURI(name);
}
}
/**
* NON-DOM Factory method; creates an Entity having this Document as its
* OwnerDoc. (REC-DOM-Level-1-19981001 left the process of building DTD
* information unspecified.)
*
* @param name The name of the Entity we wish to provide a value for.
*
* @throws DOMException(NOT_SUPPORTED_ERR) for HTML documents, where
* nonstandard entities are not permitted. (HTML not yet implemented.)
*/
public Entity createEntity(String name)
throws DOMException {
if (errorChecking && !isXMLName(name, xml11Version)) {
String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "INVALID_CHARACTER_ERR", null);
throw new DOMException(DOMException.INVALID_CHARACTER_ERR, msg);
}
return new EntityImpl(this, name);
}
public boolean isEntityUnparsed(String name) {
if (fEntities != null) {
Entity entity = (Entity) fEntities.getNamedItem(name);
if (entity != null) {
return (entity.getNotationName() != null);
}
}
return false;
}
public void doctypeDecl(DocumentType node) throws XNIException {
/** Create new DocumentType node for the target. */
if (fDocumentImpl != null) {
DocumentType docType = fDocumentImpl.createDocumentType(node.getName(), node.getPublicId(), node.getSystemId());
final String internalSubset = node.getInternalSubset();
/** Copy internal subset. */
if (internalSubset != null) {
((DocumentTypeImpl) docType).setInternalSubset(internalSubset);
}
/** Copy entities. */
NamedNodeMap oldMap = node.getEntities();
NamedNodeMap newMap = docType.getEntities();
int length = oldMap.getLength();
for (int i = 0; i < length; ++i) {
Entity oldEntity = (Entity) oldMap.item(i);
EntityImpl newEntity = (EntityImpl) fDocumentImpl.createEntity(oldEntity.getNodeName());
newEntity.setPublicId(oldEntity.getPublicId());
newEntity.setSystemId(oldEntity.getSystemId());
newEntity.setNotationName(oldEntity.getNotationName());
newMap.setNamedItem(newEntity);
}
/** Copy notations. */
oldMap = node.getNotations();
newMap = docType.getNotations();
length = oldMap.getLength();
for (int i = 0; i < length; ++i) {
Notation oldNotation = (Notation) oldMap.item(i);
NotationImpl newNotation = (NotationImpl) fDocumentImpl.createNotation(oldNotation.getNodeName());
newNotation.setPublicId(oldNotation.getPublicId());
newNotation.setSystemId(oldNotation.getSystemId());
newMap.setNamedItem(newNotation);
}
append(docType);
}
}
/**
* The getUnparsedEntityURI function returns the URI of the unparsed
* entity with the specified name in the same document as the context
* node (see [3.3 Unparsed Entities]). It returns the empty string if
* there is no such entity.
*/
public String getUnparsedEntityURI(String name)
{
// Special handling for DOM input
if (_document != null) {
String uri = "";
DocumentType doctype = _document.getDoctype();
if (doctype != null) {
NamedNodeMap entities = doctype.getEntities();
if (entities == null) {
return uri;
}
Entity entity = (Entity) entities.getNamedItem(name);
if (entity == null) {
return uri;
}
String notationName = entity.getNotationName();
if (notationName != null) {
uri = entity.getSystemId();
if (uri == null) {
uri = entity.getPublicId();
}
}
}
return uri;
}
else {
return super.getUnparsedEntityURI(name);
}
}
/**
* NON-DOM Factory method; creates an Entity having this Document as its
* OwnerDoc. (REC-DOM-Level-1-19981001 left the process of building DTD
* information unspecified.)
*
* @param name The name of the Entity we wish to provide a value for.
*
* @throws DOMException(NOT_SUPPORTED_ERR) for HTML documents, where
* nonstandard entities are not permitted. (HTML not yet implemented.)
*/
public Entity createEntity(String name)
throws DOMException {
if (errorChecking && !isXMLName(name, xml11Version)) {
String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "INVALID_CHARACTER_ERR", null);
throw new DOMException(DOMException.INVALID_CHARACTER_ERR, msg);
}
return new EntityImpl(this, name);
}
public boolean isEntityUnparsed(String name) {
if (fEntities != null) {
Entity entity = (Entity) fEntities.getNamedItem(name);
if (entity != null) {
return (entity.getNotationName() != null);
}
}
return false;
}
public void doctypeDecl(DocumentType node) throws XNIException {
/** Create new DocumentType node for the target. */
if (fDocumentImpl != null) {
DocumentType docType = fDocumentImpl.createDocumentType(node.getName(), node.getPublicId(), node.getSystemId());
final String internalSubset = node.getInternalSubset();
/** Copy internal subset. */
if (internalSubset != null) {
((DocumentTypeImpl) docType).setInternalSubset(internalSubset);
}
/** Copy entities. */
NamedNodeMap oldMap = node.getEntities();
NamedNodeMap newMap = docType.getEntities();
int length = oldMap.getLength();
for (int i = 0; i < length; ++i) {
Entity oldEntity = (Entity) oldMap.item(i);
EntityImpl newEntity = (EntityImpl) fDocumentImpl.createEntity(oldEntity.getNodeName());
newEntity.setPublicId(oldEntity.getPublicId());
newEntity.setSystemId(oldEntity.getSystemId());
newEntity.setNotationName(oldEntity.getNotationName());
newMap.setNamedItem(newEntity);
}
/** Copy notations. */
oldMap = node.getNotations();
newMap = docType.getNotations();
length = oldMap.getLength();
for (int i = 0; i < length; ++i) {
Notation oldNotation = (Notation) oldMap.item(i);
NotationImpl newNotation = (NotationImpl) fDocumentImpl.createNotation(oldNotation.getNodeName());
newNotation.setPublicId(oldNotation.getPublicId());
newNotation.setSystemId(oldNotation.getSystemId());
newMap.setNamedItem(newNotation);
}
append(docType);
}
}
/**
* The getUnparsedEntityURI function returns the URI of the unparsed
* entity with the specified name in the same document as the context
* node (see [3.3 Unparsed Entities]). It returns the empty string if
* there is no such entity.
*/
public String getUnparsedEntityURI(String name)
{
// Special handling for DOM input
if (_document != null) {
String uri = "";
DocumentType doctype = _document.getDoctype();
if (doctype != null) {
NamedNodeMap entities = doctype.getEntities();
if (entities == null) {
return uri;
}
Entity entity = (Entity) entities.getNamedItem(name);
if (entity == null) {
return uri;
}
String notationName = entity.getNotationName();
if (notationName != null) {
uri = entity.getSystemId();
if (uri == null) {
uri = entity.getPublicId();
}
}
}
return uri;
}
else {
return super.getUnparsedEntityURI(name);
}
}
/**
* NON-DOM Factory method; creates an Entity having this Document as its
* OwnerDoc. (REC-DOM-Level-1-19981001 left the process of building DTD
* information unspecified.)
*
* @param name The name of the Entity we wish to provide a value for.
*
* @throws DOMException(NOT_SUPPORTED_ERR) for HTML documents, where
* nonstandard entities are not permitted. (HTML not yet implemented.)
*/
public Entity createEntity(String name)
throws DOMException {
if (errorChecking && !isXMLName(name, xml11Version)) {
String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "INVALID_CHARACTER_ERR", null);
throw new DOMException(DOMException.INVALID_CHARACTER_ERR, msg);
}
return new EntityImpl(this, name);
}
public boolean isEntityUnparsed(String name) {
if (fEntities != null) {
Entity entity = (Entity) fEntities.getNamedItem(name);
if (entity != null) {
return (entity.getNotationName() != null);
}
}
return false;
}