September 2003
Intermediate to advanced
336 pages
7h 20m
English
DTDs, unfortunately, are not namespace aware. When writing a DTD for a document that uses namespaces, you must declare the prefixed names, as shown below.
<!ELEMENT chess:game (chess:move+)> <!ELEMENT chess:move (#PCDATA)>
If the documents don't use a prefix, you declare the unprefixed names instead.
<!ELEMENT game (move+)> <!ELEMENT move (#PCDATA)>
You must further declare the namespace attributes just as you would any other attribute.
<!ATTLIST chess:game xmlns:chess
CDATA "http://namespaces.cafeconleche.org/chess" #FIXED>
<!ATTLIST game xmlns CDATA
"http://namespaces.cafeconleche.org/chess" #FIXED>
This is rather annoying and inconvenient. Fortunately, the parameterization techniques discussed in Item 7 enable ...
Read now
Unlock full access