required/optional/fixed for xlink:type in sample schema docs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

A casual reading of XLink (both 1.0 and 1.1) might lead one to suppose
(it did lead me to suppose) that an xlink:type attribute had to be
explicitly in the markup for it to be recognised as "an XLink
element".

But in fact both 1.0 and 1.1 make clear, in the Application
Conformance section, that applications can work at the infoset level,
and interpret markup constraints at that level, so an EII is an XLink
EII if it has an an AII whose expanded name is
{http://www.w3.org/1999/xlink,type} (or, in XLink 1.1 only, no such
AII, but one whose expanded name is
{http://www.w3.org/1999/xlink,href}).

It follows that, contrary to my initial belief, the sample DTD in
appendix B of both versions of the spec, is correct in supplying
appropriate default values for xlink:type in the ATTLIST declarations
for the various elements (simple, extended, locator, etc.) which it
defines.

But I'm not sure that was the best possible design, and I'm
_certainly_ not sure it's right to carry it forward into the XML
Schema and Relax NG schemas.

The question boils down to these two alternatives:

 <xs:attribute ref="xlink:type" fixed="extended"/>
 <xs:attribute ref="xlink:type" fixed="extended" use="required"/>

In the first case, the xlink:type need not be present.  If it is, it
must be 'extended'.  If it isn't, it defaults (in the PSVI) to
'extended'.

In the second case, the xlink:type attribute _must_ be present, and it
must be 'extended'.

Given that schema validation may well be independent of xlink
recognition, I think we should use the latter formulation.

I also _believe_ that is the only possible formulation in Relax-NG,
which doesn't _do_ defaults.

If those two schema language versions work that way, I am inclined to
change the DTD to require explicit xlink:type (except for the simple
link case, of course) as well.

Comments?

[Note that all of this is, as it were, editorial, as the schema
appendices are non-normative]

ht
- -- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
                         Half-time member of W3C Team
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFIe75qkjnJixAXWBoRAqLVAJ9ftRiExwRrO77/k4N8pFWOpiDqdQCfcESm
fKhzbKC4rLNyXDqJiOKzdvI=
=LaRo
-----END PGP SIGNATURE-----

Received on Monday, 14 July 2008 21:01:01 UTC