xml-xmlbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arne Jacobs <ja...@tzi.de>
Subject problem with SchemaTypeLoaders and xsi:type attributes
Date Tue, 18 Nov 2003 16:22:32 GMT
i'm using the XmlBeans.compileXsd() method to compile an XML schema at 
runtime (i don't create a hierarchy of java classes).

if i now use the resulting SchemaTypeSystem to construct an xml document 
at runtime (with the help of the XmlCursor class), i find that 
everything works fine, except in the case where derived types should be 
used with the xsi:type (from the xml instance schema) attribute.

the problem seems to be that, when resolving the given derived type in 
the XmlObject.set() or the XmlObject.validate() methods, the only 
SchemaTypeLoader which is searched for that type, is the built in type 
system. XmlBeans also searches the file system for .xsb files, which i 
do not have (compiled at runtime...).

when parsing the result of the xmlText() method of the said xml document 
using a "typeloaderunion" of my compiled SchemaTypeSystem and the built 
in type system, the document is found valid. in this case, both type 
systems are search for the derived type and this found in my 
runtime-compiled SchemaTypeSystem.

i know wonder how i can get the XmlBeans to search my own 
SchemaTypeSystem when constructing the xml document at runtime, too.

i don't want to have to compile the java classes and .xsb-files each 
time i use another schema...

hoping that you can help me,


- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-user-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/

View raw message