Steps for Defining Entities in DTDs

The procedures for defining general entities and parameter entities are almost the same.

To define an entity in the Tree tab:
1. Click the DTD node.
2. In the left tool bar, click New Entity or New Parameter Entity .
3. Type the name of the new entity and press Enter. Stylus Studio displays the properties for the new entity in the Properties window. If the Properties window is not visible, select View > Properties from the Stylus Studio menu bar to display it.
4. In the Properties window, check the value of the Location property.

If you want to define the value for this entity in this DTD, the value should be Internal. Otherwise, the value should be External. If you need to change the value of the Location property, double-click its current value. In the drop-down menu that appears, double-click the new value.

5. If the value of the Location property is External, skip this step. If the value of the Location property is Internal, double-click the Value field and enter the value of the entity. Definition of your entity is complete. You do not perform the remaining steps in this procedure.
6. If the value of the Location property is External, specify a value for System ID. Double-click the field to enter a value. The value of System ID is a path to a file. It can be a URL or a file system path.

Although you can also specify a value for the Public ID property, Stylus Studio ignores any value you specify. A Public ID is a string that some parsers can resolve to an address, which they then use to locate a file. Stylus Studio does not have this capability.

7. If you are defining a parameter entity, you are done. If you are defining a general entity, check the value of the Parsed property. If necessary, double-click the value of the Parsed property to change it. The value of the Parsed property indicates whether the value of the entity is parsed XML. For example, if the entity refers to an image file, you do not want Stylus Studio to try to parse it.
 
Free Stylus Studio XML Training:
W3C Member