Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 8. Validation and Using DTDs > Declaring a Public External DTD

Declaring a Public External DTD

If my Wonders of the World DTD becomes very popular, and there are copies of it distributed far and wide, I would want it to be possible for the public to declare it in their own XML documents using its formal public identifier (the name I just created for it on page 108).

Figure 8.9. This time, the XML parser will use the public identifier to try and find the DTD, perhaps in a public repository. If that proves unsuccessful, it will use the DTD referenced by the given URI.
x m l
<?xml version="1.0"?>
												<!DOCTYPE ancient_wonders PUBLIC
												"-//kehogo//DTD WowML 2.0//EN"
												"http://www.kehogo.com/dtd
												/wonders-master.dtd">
												<ancient_wonders>
												<wonder>
												<name language="English">
												Colossus of Rhodes</name>
												...
												</wonder>
												</ancient_wonders>



  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial