Re: A practical use case for a fixed ID attribute?

Orthogonality is important in language design. You shouldn't impose 
restrictions just because you think something isn't useful. Is it useful 
to be able to write $x+0, or $x*1? Probably not, but it would be wrong 
to have a rule that prevents it. So preventing use of "fixed" for one 
particular data type because you can't see a use for it would equally be 
wrong.

Michael Kay
Saxonica


On 08/12/2012 12:56, Costello, Roger L. wrote:
> Hi Folks,
>
> In XML Schema 1.1 it is possible to declare an attribute of type ID and fix its value. For example:
>
> <attribute name="instructor" type="ID" fixed="Professor-Johnson" />
>
> Yesterday I showed that example to my class and they challenged me on the usefulness of this.
>
> I could not think of a single practical use case for a fixed ID attribute.
>
> Do you have a practical use case for a fixed ID attribute?
>
> /Roger
>
>

Received on Sunday, 9 December 2012 12:56:39 UTC