Reputation: 6962
Is it possible, within a DTD, to define an element to have an open/unrestricted attribute list?
I know it can be defined an element to have unrestricted child elements:
<!ELEMENT element_name ANY>
But, tutorials and references that I have already consulted seem to assume that the attribute list for an element must be complete. And I couldn't find any explicit reference to this situation.
Upvotes: 0
Views: 308
Reputation: 38033
Not if you wish to validate it. (ZVON gives a good overview of DTD): http://zvon.org/xxl/DTDTutorial/General/contents.html. If you do not use a validator then any well-formed XML is allowed.
In XSD schema it is possible to allow undeclared attributes including those from other namespaces (namespaces are very difficult to manage in DTDs).
Upvotes: 1