Entities: some examples


  <!ENTITY mdash "&#x2014;">
  <!ENTITY hcu "Humanities Computing Unit">
  <!ENTITY fig1 SYSTEM "fig1.bmp" NDATA BMP>
  <!ENTITY % foodTypes 
        "(veg|prot|fat|sugar|flavour|unspec)">

A parameter entity is one way of changing the range of values permitted for attribute values.

<!ATTLIST food type %foodTypes; #IMPLIED>

Entity definitions (of whatever kind) in the DTD may be over-ridden in the DTD subset:

<!DOCTYPE cookBook SYSTEM "cookbook.dtd" [
<!ENTITY % foodTypes "(good|bad|indifferent)">
]>


19 Next | First| Previous XML: the refresher