|
To access the contents, click the chapter and section titles.
Platinum Edition Using HTML 4, XML, and Java 1.2
System IdentifierA system identifier is a URI (uniform resource identifier), which may be used to retrieve the DTD. If youve ever opened a Web page in a browser or downloaded a file from an FTP site, you have already seen one form of a URI called a URL (uniform resource locator). URLs are special forms of URIs intended for network (Internet) use. You will see the more technically precise name of URI used more often than URL, but for the majority of uses, the two terms are virtually interchangeable. A system identifier can reference an absolute location, as in <!DOCTYPE book SYSTEM /mount/usr/home/dtds/book.dtd> <!DOCTYPE book SYSTEM http://wwwin.synopsys.com/~north/dtds/book.dtd> or it can be a reference to a relative location: <!DOCTYPE book SYSTEM dtds/book.dtd> <!DOCTYPE book SYSTEM ../../dtds/book.dtd> Public IdentifierA public identifier is the officially recorded identifier for a DTD. Obviously, it would be impossible to register every DTD. Instead, the person or company who creates DTD registers itself. The International Standards Organization (ISO) is responsible under the provisions of ISO 9070 for the registrations, but authority to issue identifiers and the associated recordkeeping are delegated to the American Graphic Communication Association (AGCA). A public identifier has the following form: reg.type // owner //DTD description // language These parts have the following meanings:
An example of the public identifier for a DTD developed by me could then be -//Jim ODonnell//DTD Simple Web Page//EN An XML processor attempting to retrieve the DTDs content may use the public identifier to try to generate a location. This is not always possible, so the public identifier must be followed by a so-called system literal, which is simply a URI. Using the public identifier and the system literal, the documentation type declaration would then look like this: <!DOCTYPE home.page PUBLIC -//Jim ODonnell//DTD Simple Web Page//EN home.dtd> Note that before a match is attempted, all strings of whitespace in the public identifier are normalized to single space characters, and leading and trailing whitespace is removed. Developing the DTD from XMLMany ways exist to describe information models, technically known as schemas. Indeed, several XML development activities are devoted to defining schemas for describing XML data. One such schema is the XML DTD. The task of developing a DTD can be as simple or as difficult as you make it. It all depends on what you want to do with the information you intend to model with the DTD and what you intend to do with the information after it has been marked up. The easiest, quickest, and simplest method of creating an XML DTD is to start by creating an XML document and working backward. Identifying ElementsFor relatively simple Web pagesand some of the simple applications that we have discussed so far typing out the intended XML document and then marking it up will most likely give you a flying start on developing your DTD. Before you do, though, make sure that you have a clear idea of what you want to achieve with the DTD. You will learn about this in more detail later in this chapter, but you need to be aware of what kind of markup you want to support. It can be
|
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement. |