On page 121 there is a special note about the need for declaring attributes in the DTD for the namespace declarations that will be used in the instance documents.
Quote:
|
As far as DTDs are concerned, namespace declarations, such as xmlns:contacts="http://wiley.com/contacts", are also treated as attributes. Although the Namespace Recommendation insists that xmlns statements are declarations and not attributes, DTDs must declare them in an ATTLIST declaration if they are used. Again, this is because the W3C finalized the syntax for DTDs before the Namespace Recommendation was completed.
|
However, no examples are given and the authors do not even mention what type to use. Can I assume that the following is correct:
Code:
<!ATTLIST rootElementName xmlns:contacts CDATA #IMPLIED>
Wouldn't this also imply that, once this is specified in the DTD that the writers of the instance documents are essentially locked in not only to always using the prefix chosen in the DTD but also they have no choice as to which namespace must be the default one?
Finally, if the DTD contained a #FIXED value for the namespace then isn't it true that the instance document wouldn't really need a namespace declaration at all?