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

On Sat, 2012-12-08 at 12:56 +0000, 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.

It was/is possible to do this with a DTD, too.

It's useful e.g. for a version attribute
  <!ATTLIST sock-weaving-pattern
    version #FIXED "1.0"
  >
so that attempts to apply that DTD (or schema in your case, more
generally) against a document that said version="2.0" would fail.

Liam

-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
"It's better to do a mediocre job than a good one, because then people
will feel good when they correct you."

Received on Saturday, 8 December 2012 19:24:59 UTC