On Sat, Feb 27, 2010 at 10:49 AM, Ishan Jayawardena <[email protected]> wrote:
> When it comes to the implementation of SCD, we are going to need a
> Java object for this "assembled schema" but XSModel is defined as a
> Java interface. So how can we produce an object for this purspose? Can
> we use org.apache.xerces.impl.xs.XSModelImpl.java to create this
> object?

yes, we can construct the XSModelImpl (which implements the XSModel
interface, so you're actual working with XSModel) object from scratch
and add, schema components to it.

The constructor of, XSModelImpl looks like following:
XSModelImpl(SchemaGrammar[] grammars)

So, first you have to construct a SchemaGrammar object (or an array of
it) and add schema components to it, using the desired, add* methods.

But I suggest, that for SCD implementation, instead of constructing
XSModelImpl from scratch, you can you the XSLoader implementation to
construct a XSModel (ref,
http://xerces.apache.org/xerces2-j/javadocs/xs/org/apache/xerces/xs/XSLoader.html).



-- 
Regards,
Mukul Gandhi

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to