RE: Differentiate between unprefixed local element and global unprefixed element

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 UTC