Property list definitions
There are many common uses of property lists in which the property list must be structured in a certain way. For example, when editing a .scriptSuite file which is necessary for a developer to add Applescript support to his/her application, only a small set of keys are used, and the values stored must conform to certain types. To help create and edit lists with predefined structures such as this, property list definitions can be greatly helpful.
In a structured property list, most or all of the data items in the list will be associated with a definition element that describes what the content of that data item should be. Each element has a name, starting with the root of your property list, which is always associted with the element "<Root>". The root element then defines what element each of its subitems should be associated with, then a subitem's element defines what element each of its subitems is associated with, and so on. In this manner, potentially every item in the property list can have a definition element assigned to it.
A definition element can specify several characteristics of the objects it gets assigned to. First, an element can define what class or classes an object can be. One element may specify that its object can only be a string, another may work only with dictionaries, and yet another may be able to be associated with any type. For elements assigned to arrays and dictionaries, the element can specify what type or types the object's subitems can be. An element can also define default values for newly created subitems.
While editing a property list, you can tell PlistEdit Pro to start using a property list definition by selecting the definition under Definition->Change Definition (or you can have it automatically choose a definition based on file extension or file name by checking the "Use definitions automatically when opening files" option in the preferences). If you have the "Show column for definition elements" preference on, a new column will appear titled "Element" which will show you the name of the definition element that each item in the property list is currently associated with. Items associated with a definition elements will have the pop-up in the Class column disabled, since the class for that item is restricted by its element type.
See also: