You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Andy Putnins <pu...@lett.com> on 2009/02/24 01:59:07 UTC

Re: SchemaTypeLoader.unloadXsd() method?

Radu - thanks for responding.

After posting my original question, I discovered the XmlBeans.compileXsd method 
that takes a SchemaTypeSystem argument and augments it with the passed-in schema, 
	"augumenting the SchemaTypeSystem passed in by incrementally adding 
	the given XML schema definitions."

However, the documentation only states that 
	"These could be ... modifications to the already existing definitions 
	(if the Schema document is already recorded in the existing SchemaTypeSystem)"

This seems to contradict "there isn't any way to replace an already loaded type".
What actually happens here?

	- Andy

On Mon, 23 Feb 2009 15:16:37 -0800  Radu Preotiuc wrote:
 > Actually, there isn't any way to replace an already loaded type (by
 > design, think Java classes). Once you have other types depending on it
 > and documents validated/typed accordingly, you can't really change the
 > type without things becoming inconsistent.
 > 
 > What you can do, is create another SchemaTypeLoader with the new
 > versions of the types and "union" it with the existing one:
 > 
 > XmlBeans.typeLoaderUnion(new SchemaTypeLoader[] {new_TL, existing_TL});
 > 
 > keeping in mind that typeLoaders earlier in the path take precedence.
 > Then, you load all your documents with this new TL and gradually phase
 > out the old one.
 > 
 > Radu
 > 
 > On Sat, 2009-02-21 at 12:33 -0500, Andy Putnins wrote:
 > > Is there some way to remove a schema from a SchemaTypeLoader?
 > > 
 > > The situation arises when I need to replace an already loaded schema
 > > in a running system with a new version that may have added, deleted,
 > > and moved elements and attributes.
 > > 
 > > 	- Andy
 > > 
 > > 
 > > ---------------------------------------------------------------------
 > > To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
 > > For additional commands, e-mail: user-help@xmlbeans.apache.org
 > > 
 > 
 > 
 > ---------------------------------------------------------------------
 > To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
 > For additional commands, e-mail: user-help@xmlbeans.apache.org
 > 

	- Andy
________________________________________________________________
Andris Putnins, Principal
Lett Engineering		phone:  (847) 997-0002
300 Bramble Lane		fax:    (847) 550-0633
Deer Park, IL 60011		email:  putnins@lett.com


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org