Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: Multiple and circular import/include

From: "Bill Michell" <bill.michell@---.--.-->
To: "vivek agarwal" <vivekorama@-----.--->, "Bob Schloss" <rschloss@--.---.--->
Date: 3/3/2005 9:33:00 AM
I find them really useful...

I have a generic "asset" that can have many types of extension - but any =
instance of that asset need to be able to contain other assets - either r=
eferences, or completely embedded inline.

The core document contains the basic asset definition but the extensions =
each live in their own schema - that needs a reference to the core docume=
nt - which in turn needs a reference to the current collection of extensi=
on schemae...

In other words elements can be nested recursively so the schema documents=
 need to be able to express that nesting. 



-- 
Bill Michell
Development Team Leader, Broadcast Platforms, BBC News Interactive.



-----Original Message-----
From: xmlschema-dev-request@w... [mailto:xmlschema-dev-request@w...] =
On Behalf Of vivek agarwal
Sent: Wednesday, March 02, 2005 9:03 PM
To: Bob Schloss
Cc: xmlschema-dev@w...
Subject: Re: Multiple and circular import/include


Thanks Bob!
But, I still don't understand why the spec allows circular references!? I=
s there a reason? or is it just like that?

Thanks,
Vivek.



On Tue, 1 Mar 2005 15:17:04 -0500, Bob Schloss <rschloss@u...> wrot=
e:
> 
> 
> Vivek,
> 
>       It is not an error to include the same schema document as the 
> target of multiple <include> or <import> directives.
> 
>       Circular <include> or <import> directives are permitted.
> 
>       This is my mental model:
> 
> 1. The processor fetches your top-level schema document, and then 
> keeps fetching any other schemas which are referenced through 
> directives, transitively, but whenever it sees a directive targetting =

> something it has already fetched, it doesn't fetch it again.  At the =

> end of this process, the "actual schema" to be used for processing now =

> exists in memory, having been merged from 1...n individual documents =

> having the XML representation of XML Schema.
> 
> 2. Then the processor starts doing whatever it plans to do (validation =

> of instance documents during parsing, generating Data Binding code, 
> generating UI forms, or whatever).
> 
>       Because of subtleties associated with <redefine>, for the sanity =

> of anyone who may have to maintain what you design, I would try to 
> avoid circular redefines.
> 
>             Good Luck,
>             Bob
> 
> Scalable XML Infrastructure
> IBM Thomas J Watson Research Center
> Yorktown Heights, New York, USA
> http://www.research.ibm.com/XML
> 
>              vivek agarwal
>              <vivekorama@gmail
>              .com>                                                     =
 To
>              Sent by:                  xmlschema-dev@w...
>              xmlschema-dev-req                                         =
 cc
>              uest@w...
>                                                                    Subj=
ect
>                                        Multiple and circular
>              03/01/2005 01:41          import/include
>              AM
> 
>              Please respond to
>                vivek agarwal
> 
> 
> Hi,
> 
> I have a question on multiple and circular import/include each, if 
> somebody could help.
> 
> Is it an error to import/include a schema more than once?
> A import/includes B1 and B2.
> Both B1, and B2, import/includes C.
> What is the expected behaviour of the processor in such a case?
> 
> Are circular import/includes allowed?
> A import/includes B, and B import/includes A?
> What is the expected behaviour of the processor in such a case?
> 
> Thanks,
> Vivek.
> 
>


http://www.bbc.co.uk/

This e-mail (and any attachments) is confidential and may contain
personal views which are not the views of the BBC unless specifically
stated.
If you have received it in error, please delete it from your system. 
Do not use, copy or disclose the information in any way nor act in
reliance on it and notify the sender immediately. Please note that the
BBC monitors e-mails sent or received. 
Further communication will signify your consent to this.


From tuquenukem@h... Fri Mar 04 03:38:41 2005
Received: from bart.w3.org ([128.30.52.40])
	by frink.w3.org with esmtp (Exim 4.44)
	id 1D73eD-00005Z-Co
	for xmlschema-d


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