Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

When to use attrubutes enumerated (one value) + required versus fixed

Status
Not open for further replies.
Jul 17, 2007
1
US
Hello,

I am checking some dtds and I found that all of them have a list of attributes like this:

<!ATTLIST elementName attributeName (1) #REQUIRED >

As you can see the list of enumerated values includes only one value... I was wondering why use the combination of enumerated + required instead of default value of fixed, for example:

<!ATTLIST elementName attributeName CDATA #FIXED "1">

It is not complete clear for me what is the difference between these two definitions, can someone explain me the differences and implications of using each one?

 
The main different between them is that the #REQUIRED attribute is required for a document to be vaiid, and the #FIXED attribute, though, is allowed to be appeared or not appeared in the instance document.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top