John,
Please use the newsgroup, not the mailing list...
I believe I've already suggested getting the type and testing if the
namespace of that type is the schema for schema namespace, i.e.,
XSDConstants.isSchemaForSchemaNamespace(xsdSimpleTypeDefinition.getTargetNamespace())
is true; if it's not true, ask for the base type of the simple type and
repeat the testing until you end up with a type in the schema for
schemas. It sounds like that's the type you want.
John Dous wrote:
Dear Ed. Merks,
The problem is that I can't get the correct Derived Data Type name of
XSDSimpleTypeDefinition element. For example if the xsd file has two
elements :
<xs:element
name="direct-short" type="xs:short"/>
<xs:element name="link-short" type="newType" />
<xs:element name="newType">
<xs:restriction
base="xs:short"/>
</xs:element>
I am waiting to take the correct "short" value for both above elemens (direct-short,link-short)
Try No 1. (XSDSimpleTypeDefinition.getName)
the first element direct-short with the method
XSDSimpleTypeDefinition.getName returns "short"
the second element link-short with the method XSDSimpleTypeDefinition.getName returns "newType"
Try No 2.(XSDSimpleTypeDefinition.getBaseType.getName)
the first element direct-short with
the method XSDSimpleTypeDefinition.getBaseType returns "int"
the second element link-short with the method XSDSimpleTypeDefinition.getBaseType
returns "short"
I would like to get the correct "short"
value in any case. How can do this? Could you give me any example?
Thanks in advance!
Regards,
John Dous
Invite your mail contacts to join your friends list with Windows
Live Spaces. It's easy! Try it!
_______________________________________________
xsd-dev mailing list
xsd-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/xsd-dev
|