Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: deriving complexTypes from imported types

From: noah_mendelsohn@--.---.---
To: gayathri veerarajan <gaytri_v@-----.--.-->
Date: 4/17/2004 6:57:00 PM
Gayathri Veerarajan asks:

>> can I derive  a new complexType from an imported type with the same name. 
...
>> here the new complex type is of different namespace. 

Your question is not quite clear, but I believe the answer is yes in any 
case.  Specifically:

If you have a complex type a:t you can as easily derive a b:t as you could 
b:t2 (presuming a: and b: are bound to different namespaces).   The name 
of a type, element declaration etc. consists of the pair of {nsUri, 
localname}.  In these examples, the localnames are t, t2, etc.  If any 
part of the name is different, you are defining a new type, which is fine. 
 

The other thing you can do with care is to redefine the same type in the 
same namespace.  Thus, a:t is a redefinition of a:t.  This is done using 
<xsd:redefine>, and is often used as a means of evolving a schema.  When 
you redefine a:t, the redefined version completely replaces the base for 
all uses in the schema (except of course, that the original is used as the 
base for the derivation.)

I hope this helps.

--------------------------------------
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------








gayathri veerarajan <gaytri_v@y...>
Sent by: xmlschema-dev-request@w...
04/16/2004 03:10 AM

 
        To:     xmlschema-dev@w...
        cc:     (bcc: Noah Mendelsohn/Cambridge/IBM)
        Subject:        deriving complexTypes from imported types


can I derive  a new complexType from an imported type with the same name. 
 
<complexType name="Camera">
 <complexContent>
  <extension base="camera:Camera">
   <sequence>
       <element name="Serial No" type="string"/>
    </sequence>
  </extension>
 </complexContent>
</complexType>
 
I know that this can be done by defining the complexType only with the 
same target namespace. here the new complex type is of different 
namespace. is this possible? 
with regards,
V.gayathri.
 


Yahoo! India Matrimony: Find your partner online.


From mhk@m...  Sun Apr 18 17:22:01 2004
Return-Path: <mhk@m...>
X-Original-To: xmlschema-dev@l


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent