W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2003

RE: Differentiate between unprefixed local element and global unprefixed element

From: Neil Bradley <Neil.Bradley@rubus.com>
Date: Mon, 19 May 2003 14:00:22 +0100
Message-ID: <7C978F5EDA227E478ABADE03D23599731DA51B@brkmail.rubus.com>
To: <xmlschema-dev@w3.org>

This answer to my question below appears to rule-out the possibility that <unprefixed> could be defined as a local element child of the <fragment> element that is required to not include the prefix.

Neil.


-----Original Message-----
From: Jeni Tennison [mailto:jeni@jenitennison.com]
Sent: 19 May 2003 13:53
To: Neil Bradley
Cc: xmlschema-dev@w3.org
Subject: Re: Differentiate between unprefixed local element and global
unprefixed element


Hi Neil,

> The issue has been discussed before, but without a satisfactory
> answer.
>
> <doc xmlns="DOC_NAMESPACE">
>   <X:fragment xmlns:X="FRAGMENT_NAMESPACE">
>     <unprefixed>???</unprefixed>
>   </X:fragment>
> </doc>
>
> How does an XML Schema processor attempt to validate the
> <unprefixed> element, as:
> 1) a possible local element to the <fragment> element?
> 2) a possible global element belonging to the default namespace?
> 3) both (but if so, in what order)?

Since the <unprefixed> element does not have a prefix, it is in the
default namespace. The default namespace that is in-scope at the
<unprefixed> element is the DOC_NAMESPACE. Therefore the schema
validator should validate the <unprefixed> element against the element
declaration for the {DOC_NAMESPACE}unprefixed element, which will be a
top-level (global) declaration.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Monday, 19 May 2003 08:59:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:37 GMT