Advertise Here
Need an introduction to XML Document Type Definitions? Learn about the building blocks of DTD, how to define DTD elements in XML documents, how to define the legal attributes of XML elements, how to validate DTE, and how to test for DTD errors. - ?
Extensible Markup Language

Search XML Files

XML Files RSS Feed XML Files Updates

 


DTD - Entities

by Jan Egil Refsnes

back next

Entities

  • Entities as variables used to define shortcuts to common text.
  • Entity references are references to entities.
  • Entities can be declared internal.
  • Entities can be declared external

Internal Entity Declaration

Syntax: 
<!ENTITY entity-name "entity-value">

DTD Example:
<!ENTITY writer "Jan Egil Refsnes.">
<!ENTITY copyright "Copyright XML101.">
XML example:
<author>&writer;&copyright;</author>
 

External Entity Declaration

Syntax: 
<!ENTITY entity-name SYSTEM "URI/URL">

DTD Example:
<!ENTITY writer    SYSTEM "http://www.xml101.com/entities/entities.xml">
<!ENTITY copyright SYSTEM "http://www.xml101.com/entities/entities.dtd">
XML example:
<author>&writer;&copyright;</author>
 
back next
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 DevX XML Content 
- W3C Has a New XML Standard: XProc
- The Key XForms Enhancements in Version 1.1
- Performing Hierarchical Restructuring Using ANSI SQL
- Taking XML Validation to the Next Level: Explore CAM's Expressive Power
- Taking XML Validation to the Next Level: Introducing CAM

Jump to : Top Of Page or HOME