On Sat, May 30, 2009 at 4:36 PM, Mukul Gandhi <[email protected]> wrote:
> 1. I cannot do,
> schemaGrammar.addGlobalTypeDecl(elementPSVI.getTypeDefinition());
> if the type is an anonymous type.
>
> It seem, *I need to do this* to have a fully populated schema.
It seems I have found the workaround (as below):
I can do,
XSTypeDefinition typeDef = elementPSVI.getTypeDefinition();
if (!typeDef.getAnonymous()) {
schemaGrammar.addGlobalTypeDecl(elementPSVI.getTypeDefinition());
}
So, I do .addGlobalTypeDecl only if the type is not anonymous.
So in this case, an XSElementDecl has all the necessary information.
Therefore, the following call is sufficient for this example:
schemaGrammar.addGlobalElementDecl((XSElementDecl)elementPSVI.getElementDeclaration());
It seems, my problem is solved. But any comments on the approach I am
following would be great..
--
Regards,
Mukul Gandhi
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]