- From: Chris Lilley <chris@w3.org>
- Date: Fri, 10 Jan 2003 17:21:20 +0100
- To: www-tag@w3.org, Jeni Tennison <jeni@jenitennison.com>
- CC: Robin Berjon <robin.berjon@expway.fr>
On Friday, January 10, 2003, 4:29:20 PM, Jeni wrote:
JT> Hi Chris,
>> On Thursday, January 9, 2003, 1:50:54 PM, Robin wrote:
>> RB> Another issue is that they are normally (in all cases I've seen
>> RB> them used in at least) sensitive to the default namespace.
>>
>> Sensitive in that they can't use it?
JT> Sensitive in that they *do* use it. If, in XML Schema, you have:
JT> <schema xmlns="http://www.w3.org/2001/XMLSchema">
JT> <element name="foo" type="string" />
JT> </schema>
JT> the type attribute holds an QName; the default namespace is used when
JT> interpreting this QName; since the value of the type attribute doesn't
JT> have a prefix, the processor uses the default namespace and recognises
JT> the value of the type attribute as being
JT> {http://www.w3.org/2001/XMLSchema}string.
Okay; so how do I declare an attribute that can take a Qname as its
attribute value, when I want that value to be an attribute name which
uncludes unprefixed attributes? Its seems from what you are saying that
I can't, which is a problem. A big problem, given that the majority of
attribute in practice are not namespaced.
JT> This differs from XPath where the default namespace is *not* used to
JT> resolve prefix-less QNames.
That was what I was thinking of when I wrote that it was not used. Oh
joy, two different ways of resolving the same thing.
JT> It sounds as if you're saying that the default namespace would not
JT> apply when interpreting the value of the xml:idAttr attribute.
Yes.
JT> This means that the value of the xml:idAttr is not an xs:QName
JT> (per XML Schema's definition), but a NameTest (per XPath's
JT> definition).
Thanks for the warning about Schemas use of QNames. OK, pity, I would
rather have used W3C XML Schema definitions throughout.
--
Chris mailto:chris@w3.org
Received on Friday, 10 January 2003 11:21:25 UTC