Why #FIXED?

The idea of an attribute that has a value that's fixed and can't be changed strikes many as odd, the first time they encounter it. But there are common applications; suppose, for example, that I insert a pointer here to my favorite piece of the XML spec. When I do this, I use an element named Sref (for Spec-ref), which becomes an A element in the HTML version. However, in all cases, I want that pointer to get another attribute target='spec' ", so that when you use it, it takes effect in the left-hand frame, which is named spec.

So that I don't have to enter that attribute in each Sref element, the internal subset contains this:

<!ATTLIST Sref target CDATA #FIXED "spec">

There are lots of places where #FIXED attributes are useful, and you can expect to run across them regularly.

Back-link to spec

Copyright © 1998, Tim Bray. All rights reserved.