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

Re: Differentiate between unprefixed local element and global unprefixed element

From: Jeni Tennison <jeni@jenitennison.com>
Date: Mon, 19 May 2003 13:52:48 +0100
Message-ID: <80-821381034.20030519135248@jenitennison.com>
To: "Neil Bradley" <Neil.Bradley@rubus.com>
CC: xmlschema-dev@w3.org

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:52:58 GMT

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