Re: A practical use case for a fixed ID attribute?
Liam R E Quin <[email protected]> Sat, 08 Dec 2012 14:23:26 -0500
| Newsgroups | gmane.text.xml.schema.devel |
|---|---|
| Organization | W3C - World Wide Web Consortium |
| Message-ID | <[email protected]> |
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."