Re: QName data type: default namespace

"Kay, Michael" <Michael.Kay@softwareag.com> writes:

> Thanks for the information.
> 
> This proposal means that it may be impossible to use the QName data type in
> a schema for XSLT stylesheets, since our names do not use the default
> namespace when unqualified (they behave like attribute names, not like
> element names).

True.

> Since XSLT is one of the main users of QNames as attribute values, this
> seems rather a shame...

We made the decision based primarily on Schema's _own_ use of QNames,
for which it was very clear to us that the element rule, rather than
the attribute rule, was the right way to go.  We understood at the
time that this meant that the use of prefixes in XPath expressions
could not be captured by the built-in QName type.  But since we
couldn't handle XPath expressions themselves in _any_ case (they are
of course not restricted to QNames), we decided to go ahead.
 
> We could still use xs:QName to achieve validation, but the typed value
> produced by validation would be wrong.

That would, in my opinion, be wrong.  Rather like using <P>...</P> to
mark up table rows -- you woudl be lying about the semantics.  Better
off just defining a type using a pattern.

By the way, where in a schema for XSLT stylesheets would you _use_
QName, were it to have the semantics you desire?

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2002, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.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]

Received on Thursday, 18 July 2002 11:51:12 UTC