Writing DTDs for XLink Objects

Given that these objects are instances of a data type, it's possible to create DTDs for them. The notation for DTD creation matches what you've used before.

Consider the following element, which is an instance of an XLink object:

<!ELEMENT MyLink (#PCDATA)>

You could write the following attribute list for it:

<!ATTLIST MyLink
 xlink:show (new |replace |embed |undefined) #IMPLIED
 xlink:actuate (onLoad |onRequest |undefined) #IMPLIED
 xlink:type (simple|extended|locator|arc|resource|title
      none) #IMPLIED
 xlink:title (CDATA) #IMPLIED
 xlink:href (CDATA)  #REQUIRED >

Note

This book has only scratched the surface of what can be done with the creation of links in XML. Once again, I encourage you to visit http://www.w3.org/TR/2000/WD-xlink ...

Get Sams Teach Yourself XML in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.