Re: pervasiveness of a redefine

"Michael Kay" <mhk@mhk.me.uk> writes:

> # 
> # > Also, what is the "scope" of a redefine
> # 
> # Unbounded.
> # 
>
> OK, so what about:
>
> <a xsi:noNamespaceSchemaLocation="some.uri">
>   <b><c><d>
>     <a xsi:noNamespaceSchemaLocation="some.other.uri">
>
> where some.other.uri references a schema document that contains 
>
> <xs:redefine schemaLocation="some.uri">
>
> Which definitions are used to validate each of the two <a> elements?
>
> I expect the answer will be that these schema locations are only hints, so
> it's entirely implementation-defined: yes?

Yes, but the interesting question then obviously is "What if the
implementation respects the hints?".

Answer -- it's an error!  The REC protects you against this sort of
thing, in section 4.3.2 _How schema definitions are located on the Web_ [1]

 "4. xsi:schemaLocation and xsi:noNamespaceSchemaLocation
     [attributes] can occur on any element. However, it is an error if
     such an attribute occurs after the first appearance of an element
     or attribute information item within an element information item
     initially *validated* whose [namespace name] it addresses."

ht

[1] http://www.w3.org/TR/2004/PER-xmlschema-1-20040318/structures-with-errata.html#schema-loc
-- 
 Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                     Half-time member of W3C Team
    2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
            Fax: (44) 131 650-4587, e-mail: ht@inf.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 Monday, 29 March 2004 07:46:55 UTC