Quackit Logo
HTML
CSS
Scripting
Database
Hosting
Design
XML

DTD Attribute Types - IDREF

The attribute type of IDREF is used for referring to an ID value of another element in the document.

Syntax:

Code

Example:

Code

Valid XML - The following XML document would be valid, as it conforms to the above DTD:

Code

Invalid XML - The following XML document would be invalid. This is because the "manager_id" attribute of the second element contains a value that isn't the same as a value of another element that contains an attribute with a type of ID:

Code

Enjoy this page?

  1. Link to this page (copy/paste into your own website or blog):
  2. Link to Quackit using one of these banner ads.

Thanks for supporting Quackit!

Sponsored Link: Design CODE-FREE Websites