Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » resolve XSDSimpleTypeDefinition
resolve XSDSimpleTypeDefinition [message #64383] Fri, 07 October 2005 17:47 Go to next message
Eclipse User
Originally posted by: abanerjee.vitria.com

Hi Ed,

I wish to determine the primitive type of a XSDSimpleTypeDefinition. By
using XSDConstants.isAnySimpleType(simpleType.getBaseTypeDefinitio n() I
know that the simple type is a built in type. I want to convert the simple
type to XSDAnySimpleType so that I can access it's subclasses.

Thanks,
-Anindita.
Re: resolve XSDSimpleTypeDefinition [message #64406 is a reply to message #64383] Fri, 07 October 2005 18:30 Go to previous message
Eclipse User
Originally posted by: merks.ca.ibm.com

Anindita,

Built-in types are the ones in the schema for schema and even in that
schema there is a type hierarchy so your first assertion isn't a good
one. If xsdSimleTypeDefinition.getPrimitiveTypeDefinition() ==
xsdSimpleTypeDefinition, then it is a primitive type from the schema for
schemas. If you want to compute a type hierarchy, you have to compute
it by visiting all the types and keeping track of base types, i.e.,
there is no relation ship from type to all subtypes; that relation is
unbounded...


Anindita Banerjee wrote:

> Hi Ed,
>
> I wish to determine the primitive type of a XSDSimpleTypeDefinition.
> By using
> XSDConstants.isAnySimpleType(simpleType.getBaseTypeDefinitio n() I know
> that the simple type is a built in type. I want to convert the simple
> type to XSDAnySimpleType so that I can access it's subclasses.
>
> Thanks,
> -Anindita.
>
Re: resolve XSDSimpleTypeDefinition [message #596866 is a reply to message #64383] Fri, 07 October 2005 18:30 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25943
Registered: July 2009
Senior Member
Anindita,

Built-in types are the ones in the schema for schema and even in that
schema there is a type hierarchy so your first assertion isn't a good
one. If xsdSimleTypeDefinition.getPrimitiveTypeDefinition() ==
xsdSimpleTypeDefinition, then it is a primitive type from the schema for
schemas. If you want to compute a type hierarchy, you have to compute
it by visiting all the types and keeping track of base types, i.e.,
there is no relation ship from type to all subtypes; that relation is
unbounded...


Anindita Banerjee wrote:

> Hi Ed,
>
> I wish to determine the primitive type of a XSDSimpleTypeDefinition.
> By using
> XSDConstants.isAnySimpleType(simpleType.getBaseTypeDefinitio n() I know
> that the simple type is a built in type. I want to convert the simple
> type to XSDAnySimpleType so that I can access it's subclasses.
>
> Thanks,
> -Anindita.
>
Previous Topic:resolve XSDSimpleTypeDefinition
Next Topic:Generates an XSD with annotations from an ECore model
Goto Forum:
  


Current Time: Wed Jul 30 07:20:04 EDT 2014

Powered by FUDForum. Page generated in 2.85609 seconds