Defining entities

Defining entities

Entities enable you to include predefined values, external XML or non-XML files in an XML model targeted with a DTD.

When an XML processor reads an entity reference in an XML document, it will replace this entity reference by its value defined in the DTD file of the XML document.

An entity reference is the entity name preceded by an ampersand and followed by a semicolon.

For example: &glossary; will be replaced by See Glossary.

The W3C has predefined five entities for XML tags:

Entity name

Reference

Value

Less than

<

<

Greater than

>

>

Ampersand

&

&

Apostrophe

'

Quotation

"

 

 

 

In an XML model, you just need to type the name and the value of an entity.

Defining entity properties

To display an entity property sheet, double-click its name or its icon in the

Browser tree view.

The General page of an entity property sheet displays the following properties:

 

Property

Description

 

Name

Name of the entity. It must be a no-colon-name (See Glossary)

 

Code

Code of the entity. It must be a no-colon-name

 

Comment

Descriptive label of the entity

 

Stereotype

Sub-classification used to extend the semantics of an object

 

 

without changing its structure. It can be predefined or user-

 

 

defined

122

 

PowerDesigner

 

Page 134
Image 134
Sybase XML manual Defining entities, Defining entity properties, 122, Entity name Reference Value