xml-xmlbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Mould" <andr...@softsell.com>
Subject RE: Getting to the SchemaTypeSystem of compiled schemas
Date Sat, 31 Jul 2004 09:54:11 GMT
Thanks for that, Radu. 

Looks like the <typesystemname> has to be qualified with its parent classes,
eg: schema.system.typeFoo. Or to be more complete:

  SchemaTypeSystem sts = (SchemaTypeSystem) 
       org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.forName (
               "schema.system." + typeName, myClassLoader);

Without the qualifying prefix I just get null.

Presumably if you don't know the name of the <typesystemname> (eg because
you didn't compile the schema), you have to scan the JAR entries to find
"schema/system"?

- Andrew

> -----Original Message-----
> From: Radu Preotiuc-Pietro [mailto:radup@bea.com]
> Sent: Friday, July 30, 2004 2:09 PM
> To: xmlbeans-user@xml.apache.org
> Subject: RE: Getting to the SchemaTypeSystem of compiled schemas
> 
> 
> Yes, you can do that, the method is not private in the Java
> sense, but it's not part of the public API. The method is 
> SchemaTypeSystemImpl.forName(<typesystemname>, <clasloader>) 
> <typesystemname> is the unique id of the typesystem (you can 
> set it using the undocumented "-name" option to scomp). 
> <classloader> is a classloader that can access the generated 
> classes. As you can see, this is undocumented territory, but 
> in my experience it works.
> 
> Radu
> 
> -----Original Message-----
> From: Eric Vasilik
> Sent: Friday, July 30, 2004 8:55 AM
> To: xmlbeans-user@xml.apache.org
> Subject: RE: Getting to the SchemaTypeSystem of compiled schemas
> 
> 
> I seem to recall that there might me a method somewhere (perhaps
> private) which you can pass the File of a jar and load the
> schema info into a SchemaTypeSystem.  Radu, is this possible?
> 
> - Eric
> 
> > -----Original Message-----
> > From: Andrew Mould [mailto:andrewm@softsell.com]
> > Sent: Thursday, July 29, 2004 1:27 AM
> > To: xmlbeans-user@xml.apache.org
> > Subject: Getting to the SchemaTypeSystem of compiled schemas
> > 
> > Hi there,
> > 
> > Is there a way of obtaining the SchemaTypeSystem from a JAR file
> > containing a compiled schema? I can see how to do it from an 
> > uncompiled schema
> file
> > (XmlBeans.compileXsd()), but I want to do it from the
> compiled schema
> jar
> > without knowing in advance what the jar contains.
> > 
> > Thanks in advance,
> > 
> > - Andrew
> > 
> > 
> > 
> > -
> ---------------------------------------------------------------------
> > 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/
> 
> 
> -
> ---------------------------------------------------------------------
> 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/
> 
> 
> -
> ---------------------------------------------------------------------
> 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/
> 
> 
> 


- ---------------------------------------------------------------------
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/


Mime
View raw message