"Jason E. Stewart" <[EMAIL PROTECTED]> writes:

> "Jason E. Stewart" <[EMAIL PROTECTED]> writes:
> 
> > I've been wrestling with printing out the values of Entities defined
> > in the internal subset of the DOCTYPE. I've discovered that to get the
> > info I need to have setCreateEntityReferenceNodes(TRUE). I would love
> > to know where this is documented anywhere in Xerces. And what do
> > entity reference nodes have to do with this? I'm retrieving data from
> > the doctype, not asking for the entities used in the document, or
> > maybe I'm confused about what entity reference nodes really are... 
> 
> To add to the illogic of the situation. If I add an entity to the
> doctype, but do not use it in the text of the document, it has no
> value when I access it in the doctype.
> 
> Is or is not the doctype returned by DOM_Document::getDoctype()
> supposed to represent the static view of what was in the XML file? If
> so why then does the information change when depending on what is in
> the file *after* the doctype???

OK. After digging a bit I find this:

void DOMParser::populateDocumentType()
{

        NameIdPoolEnumerator<DTDEntityDecl> entityPoolEnum = 
((DTDValidator*)fValidator)->getEntityEnumerator();
        
        while(entityPoolEnum.hasMoreElements()) {
                DTDEntityDecl* entityDecl = &entityPoolEnum.nextElement();
                EntityImpl* entity = 
((DocumentImpl*)fDocument.fImpl)->createEntity(entityDecl->getName());
                entity->setPublicId(entityDecl->getPublicId());
                entity->setSystemId(entityDecl->getSystemId());
                entity->setNotationName(entityDecl->getNotationName());
                fDocumentType->entities->setNamedItem( entity );
        }
}

So the entities that get created here only have their name set, which
is what I have seen. But nowhere can I find how the child text nodes
get added in some cases.

I'd really appreciate some assistance with this one,
jas.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to