Re: Redefining redefines

I think you're misunderstanding the note in the specification.  It is not 
referring to or prohibiting a 3-deep chain of redefinitions.  It's 
covering the case where you, for whatever reason, re-reference the SAME 
redefinition. 

It's Not about: 

        File C redefines File B redefines File A

that's definitely legal if each of the redefinitions meets the rules.

The note  is about:

        File B redefines A
        File C redefines A

It says that this is legal if the redefinitions turn out to be the same. 
It's discouraged because the processor may have to waste effort just doing 
the checking that they are the same.  This can come up when you have 
complicated patterns of file inclusions/redefinitions;  it's analagous to 
multiple inclusions of the same .h file in the C programming language.

I think you can do what you want.  Hope this helps.

------------------------------------------------------------------------
Noah Mendelsohn                                    Voice: 1-617-693-4036
Lotus Development Corp.                            Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142
------------------------------------------------------------------------







Mark Feblowitz <mfeblowitz@frictionless.com>
Sent by: xmlschema-dev-request@w3.org
12/13/01 08:10 AM

 
        To:     "Xmlschema-Dev (E-mail)" <xmlschema-dev@w3.org>, "'support@xmlspy.com'" 
<support@xmlspy.com>
        cc:     (bcc: Noah Mendelsohn/CAM/Lotus)
        Subject:        Redefining redefines

There are situations in which the redefinition of a type, and the 
subsequent
redefinition of the redefined type, are desirable. One such case is where 
a
schema user would like to extend a type, not just from the original source
but based on the extension of another schema user's extension (Company C
extends type T from Company B, who picked it up from Company A and 
redefined
it). 

I notice in the Rec that this is discouraged:

In all cases there must be a top-level definition item of the appropriate
name and kind in the <redefine> <http://www.w3.org/TR/xmlschema-1/> d schema
document. 
                                 NOTE: The above is carefully worded so 
that multiple
equivalent <redefine> <http://www.w3.org/TR/xmlschema-1/> ing of the same
schema document will not constitute a violation of clause 2
<http://www.w3.org/TR/xmlschema-1/>  of Schema Properties Correct (§3.15.6)
<http://www.w3.org/TR/xmlschema-1/> , but applications are allowed, indeed
encouraged, to avoid <redefine> <http://www.w3.org/TR/xmlschema-1/> ing the
same schema document in the same way more than once to forestall the
necessity of establishing identity component by component (although this
will have to be done for the individual redefinitions themselves).
Indeed, XML Spy requires that the redefined schema contain a type 
definition
for a type that is to be redefined - that a redefinition is not 
sufficient.
So it is not possible to redefine a redefined type.

So the question is, is this something that is likely to change, or will
validators vary on whether or not they support cascading redefines?

Thanks,

Mark


----------------------------------------------------------------------------
----
 
Mark Feblowitz                                   [t] 617.715.7231
Frictionless Commerce Incorporated     [f] 617.495.0188 
XML Architect                                     [e]
mfeblowitz@frictionless.com
400 Technology Square, 9th Floor 
Cambridge, MA 02139 
www.frictionless.com 
 

Received on Friday, 14 December 2001 22:40:30 UTC