Re: Entity References (trivial question)

Richard Tobin (richard@cogsci.ed.ac.uk)
Tue, 20 Oct 1998 15:56:36 +0100 (BST)


> > <!ENTITY % DocumentBase SYSTEM "../">
> > <!ENTITY % DtdBase SYSTEM "%DocumentBase;config/">
> > <!ENTITY % SpecificDocumentType SYSTEM
> > "%DtdBase;specific_document_type.dtd">

> Parameter entity references aren't interpreted inside system literals.

Also you didn't want the SYSTEM keywords in at least the first two
declarations.

You can achieve the effect you want by having a parameter entity
expand to the whole entity declaration:

<!ENTITY % DocumentBase "../">
<!ENTITY % DtdBase "%DocumentBase;config/">

<!ENTITY % SpecificDocumentTypeDecl
"<!ENTITY &#37; SpecificDocumentType SYSTEM '%DtdBase;spec_doc_type.dtd'>">
%SpecificDocumentTypeDecl; <!-- this defines SpecificDocumentType -->

%SpecificDocumentType;

-- Richard