XML Name spaces, XHTML, XHTML validation |
|
XML namespaces |
|
If you only are using your own Document Type Definition file, you probably do not need to use namespaces. Sometimes you may use more than one Document Type Defintion. For example, you might wish to use two DTDs that have specified a phone element. You can use namespaces to say which one you wish to use. The two different uses of phone element can be managed if they are in different namespaces. Unfortinuatly, Document Type Definitions do not support local names for namespaces. The lack of local names limits how namespaces can be used. The link at the left goes to a discussion of the limited way in which Document Type Definitions can be used to provide some support for namespaces. |
|
XHTML document type |
|
XML declaration
When you write an XHTML page, the first line should be the XML declaration.
I suggest you use: |
|
XHTML DOCTYPE declaration
The next line must be the DOCTYPE tag, to specify XHTML.
Again, do NOT put a blank line or comment before the XHTML DOCTYPE declaration.
There are two very commonly used DOCTYPE tags used for XHTML.
One is for standard strict XHTML;
it does not allow deprecated elements and attributes that are being phased out.
The second is for standard transitional XHTML;
it allows deprecated elements and attributes.
The text lists some additional DOCTYPE tags. The strict DOCTYPE is: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> The transitional DOCTYPE is: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
Differences between HTML and XHTM |
|
The link to the left goes to a short list of the differences between HTML and XHTML. These differences are because XHTML must be HTML and also XML. |
|
Reading assignment |
|
Reading assignments are in Chapter 3: XML Namespaces Chapter 18: XHTML
You may also wish to refer to a book on XHTML.
If you do not have a good one, I suggest: |
|