protected void serializeEntityReference(
EntityReference node,
boolean bStart)
throws SAXException {
if (bStart) {
EntityReference eref = node;
// entities=true
if ((fFeatures & ENTITIES) != 0) {
// perform well-formedness and other checking only if
// entities = true
// well-formed=true
if ((fFeatures & WELLFORMED) != 0) {
isEntityReferneceWellFormed(node);
}
// check "unbound-prefix-in-entity-reference" [fatal]
// Raised if the configuration parameter "namespaces" is set to true
if ((fFeatures & NAMESPACES) != 0) {
checkUnboundPrefixInEntRef(node);
}
// The filter should not apply in this case, since the
// EntityReference is not being expanded.
// should we pass entity reference nodes to the filter???
}
if (fLexicalHandler != null) {
// startEntity outputs only Text but not Element, Attr, Comment
// and PI child nodes. It does so by setting the m_inEntityRef
// in ToStream and using this to decide if a node is to be
// serialized or not.
fLexicalHandler.startEntity(eref.getNodeName());
}
} else {
EntityReference eref = node;
// entities=true or false,
if (fLexicalHandler != null) {
fLexicalHandler.endEntity(eref.getNodeName());
}
}
}