David,

You're correct the classes in org.apache.xmlbeans.impl.xb.xsdschema are the 
classes XMLBeans uses internally to load up xsd files. They are just compiled 
xbeans of schema4schemas xsd, (because of this bootstrap is required) but you 
can use them directly. 

Those classes will help you deal with .xsd files in XML sense, but it seems you 
need to ask schema specific questions. For this you'll have to compile (use 
XMLBeans.compileXsd() ) the xsd files into a TypeSystem and than using the 
TypeSystem/SchemaType interfaces you can ask schema related questions (see java 
doc and articles linked from XMLBeans website).

Cezar

> -----Original Message-----
> From: M. David Allen [mailto:dmal...@mitre.org]
> Sent: Wednesday, December 02, 2009 12:14 PM
> To: user@xmlbeans.apache.org
> Subject: Processing schema instances
> 
> 
> I'm trying to use XMLBeans to process schema instances (that is, actual
> schema files).  I've found that XMLBeans seems to have the types baked in
> to
> do this, via org.apache.xmlbeans.impl.xb.xsdschema.SchemaDocument;
> SchemaDocument doc = SchemaDocument.Factory.parse(relative);
> 
> So that works.  But I'm not finding any javadocs for these classes as they
> look like internals that might not have been meant for XMLBeans users.
> 
> I need to ask questions of a schema instance such as, "which types are
> derived from somepref:FooType"? and to get a list of all elements a schema
> defines, with their corresponding types.
> 
> Using XMLBeans to process schemas like they were any other document (i.e.
> conforming to the XML schema schema) seemed like the way to go.  Is there
> a
> different API I should be checking to do this?
> 
> Thanks
> --
> View this message in context: http://old.nabble.com/Processing-schema-
> instances-tp26613672p26613672.html
> Sent from the Xml Beans - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
> 

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

Reply via email to