to the main page... about these slides...

Modifying existing definitions

Two extra attribute types:
RenewID
As ID but need not be unique: overrides previously occuring IDs and RenewIDs of same name.
CurrIDRef
IDRef refers to the last occuring ID or RenewID,
CurrIDRef refers to the latest, previously occuring not containing the CurrIDRef.
("previous", "last", etc., assumes obvious textual ordering in the XML document)

This mechanism is used by the DSD language itself.

Example:

Assume that in some existing DSD, a book element has been defined:
  <ElementDef ID="book">
    <Constraint IDRef="book-constraint"/>
  </ElementDef>

  <ConstraintDef ID="book-constraint"> ... </ConstraintDef>

Now we want to reuse this DSD (using include), but extend the book constraint:
  <ConstraintDef RenewID="book-constraint">
    <Constraint CurrIDRef="book-constraint"/>
    ...<i>the extension</i>...
  </Constraint>

Note: no need to copy or change the contents of the original DSD!