Architecting and designing > XML schema design > The XML diagram > Definition and symbol properties > General and parameter entities > Parameter (XML element and XML attribute) entities > XML element entity (DTDs only)
  
XML element entity (DTDs only)
The Element Entity symbol is used to represent a parameter entity that is a list of elements. (Parameter entities can be used with elements and with attributes.)
Within DTDs, parameter entities allow reusable text throughout the DTD code, making programming easier. The parameter entity is a simple text substitution macro in which the shorthand % represents the definition, eliminating the need to re-type the same definition every time that it is used in a diagram. A parameter entity is located solely within the DTD (that is, not in the XML instance document).
Their general form is:
<!ENTITY % entity_name "entity_type">
When importing DTDs, the parameter entity's unsupported references are fully expanded, and their replacement text becomes a text entity definition. The attribute will no longer contain that entity reference. Following the initial reversal of a DTD that contains unsupported material, the text will be replaced in the content of where it was used.
Within BizTalk, the Element Entity is expanded in every place where it is referenced. Definition replacement must be done manually when a BizTalk file is created.
Modeling an element entity
When you draw an element entity on a diagram, you should also attach as children the (one or more) elements that constitute the element entity. If you do not draw child elements, the parameter entity declaration will be generated to the DTD, but there will be no definition for it.
An Element Entity symbol (of the same name and schema) will only decompose to show its children one time per diagram. All other occurrences will be denoted with a tick mark in the lower right-hand corner. You can draw parent or child Element Entities. Siblings of the same name and schema are not allowed.
Definition properties
Comments
The definition defined as text can come from a list, or can be any alphanumeric characters typed in by the user.
See also Location of generated comments and processing instructions.
Processing Instructions
Processing instructions are passed to an application. They typically contain a declaration of the target application and whatever instructions the application needs to process the XML schema.
Text in this field will be generated into the schema file, and formatted like this:
<?--your processing instructions go here-->
See also Location of generated comments and processing instructions.
Description
Text in the Description field does not get generated to a DTD, but is generated to a BizTalk schema. You can enter a description of the modeling element, or its use in the schema. The description can be included in a report. By default, it is included in HTML reports.
XML Schema
Specifies one and only one schema (see What is an XML schema?) that will be used throughout the diagram, and/or the XML Schema definition that XML element and attributes are keyed to. Note that all elements and element attributes created on the diagram will default to this schema name. Attribute and element symbols can be keyed to one and only one schema. If the schema is renamed, all elements and attributes that use it will be rekeyed to the new name. “Names” can be the same as long as they are keyed to different schemas.
The attribute and element instances will use the diagram’s schema by default, however, this is not required. Element and attribute symbols using schema outside that of the diagram will display with dotted borders.
Source properties
Source Data
The dropped data structure name
Source Attribute
The dropped attribute name
See also
Parameter (XML element and XML attribute) entities