The @mode attribute

The @mode attribute is used on most schema specification elements and has four possible values:

  • mode="delete": delete this feature
  • mode="add": add this new feature
  • mode="change": change just the parts of this feature that I am specifying here
  • mode="replace": replace this feature completely with my version

When in doubt, use it!

We’ve now seen a few examples of the mode attribute and it’s worth pausing for a second to pay closer attention to it. You can use it on almost all of the schema specification elements we’re covering in this tutorial. Even though they’re valid without it, a processor may not process your ODD properly if it’s not present, so you should get in the habit of using it.

It has several possible values:

  • mode="delete": delete this feature
  • mode="add": add this new feature
  • mode="change": change just the parts of this feature that I am specifying here
  • mode="replace": replace this feature completely with my version

It is important to understand the differences between the "change" and "replace" values, because, although they seem very similar, they are just different enough to cause you problems. If there is anything that you want to keep from the TEI’s definition of the element/attribute/value, use the "change" value.

Introduction to Writing ODDs slide 07 of 24
© 2010 Syd Bauman, Julia Flanders, and the Women Writers Project This TEI-encoded XML file is available under the terms of the Creative Commons Attribution-ShareAlike 3.0 (Unported) license.