Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

How you define entities in DTD?
 We can say that entities are nothing other than variable we use entities to define shortname of big standard text and also use to define special character.Entity consist of these three terms &(ampersand), entitiy name and ;(semicolon).

To declare entity internally : 

Syntax:
<!ENTITY entity-name "entity-value">
Example:
DTD Example:
<!ENTITY writer "Micky Mouse">
<!ENTITY copyright "Copyright WaltDisney">
XML example:
<author>&writer;&copyright;</author> 

To declare entity externally : 

Syntax:
<!ENTITY entity_name SYSTEM "URI/URL">
Example:
A DTD Example:
<!ENTITY writer SYSTEM "http://www.r4r.co.in/entities.dtd">
<!ENTITY copyright SYSTEM "http://www.r4r.co.in/entities.dtd">
A XML example:
<author>&writer;&copyright;</author>
 
Posted By: Name:Rajesh Kr URL: How you define entities in DTD?