entity-declaration

built-in data type

Purpose

Every sgml-dtd and xml-dtd instance contains two shelves of type entity-declaration, which can be obtained through the operators declared-general-entities and declared-parameter-entities. These shelves are keyed by entity name.

The following example program outputs names of all entities declared by an SGML DTD:

  process
     do sgml-parse document creating sgml-dtds{"input"} scan #main-input
        suppress
     done
  
     repeat over declared-parameter-entities of sgml-dtds{"input"} as e
        output "%" || key of e || "%n"
     again
     repeat over declared-general-entities of sgml-dtds{"input"} as e
        output key of e || "%n"
     again