6.6 Entity Declarations

General Entities:

Declaration <!ENTITY name value>
Reference in CDATA and PCDATA&name;
Reference for ENTITY type name
<!ENTITY cis "cis.ohio-state.edu" >
...
<email>
  <to>you@&cis;,
      they@cis.ohio-state.edu
  </to>
  <from>me@&cis;</from>
  Hello world!
</email>
<!ELEMENT foo EMPTY >
<!ATTLIST foo
          at ENTITY #REQUIRED >

<!ENTITY x "abc" >
...
<foo at="x" />

Parametric Entities:

Declaration<!ENTITY % name value>
Reference %name;
<!ELEMENT eat (#PCDATA) >
<!ELEMENT sleep EMPTY >
<!ENTITY % how "eat | sleep" >
<!ELEMENT live (%how;)* >
...
<live>
  <eat>bread</eat>
  <eat>cake</eat>
  <sleep />
</live>