Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Facets retrieving - getFacetContents
Facets retrieving - getFacetContents [message #603236] Mon, 25 August 2008 02:11
Muhamad Nazir is currently offline Muhamad NazirFriend
Messages: 24
Registered: July 2009
Junior Member
Hi Ed and all,

I would like to know, what's the best way in retrieving facets. I noticed
a thread saying that we should use getFacetContents but which one should I
use in order to easily retrieve the facets, faster and better. Is it using
SimpleTypeDefinition or TypeDefinition directly?

I have something like this:
<!-- xsd snippet starts here -->
<xsd:complexType name="orderType">
<xsd:element name="noOfOrder" minOccurs="0" type="xsd:integer"/>
<!-- xsd snippet ends here -->

//java code starts here
XSDParticle particle = (XSDParticle)obj;
XSDElementDeclaration element = (XSDElementDeclaration)

if(null != element.getTypeDefinition()) {
XSDTypeDefinition typeDef = element.getTypeDefinition();
XSDSimpleTypeDefinition simpleTypeDef = null;

if(null != typeDef.getSimpleType()) {
simpleTypeDef = typeDef.getSimpleType();
// this is the question:
//should I use this simpleTypeDef here???? or is there any simpler


Previous Topic:Format of serialized XML
Next Topic:Facets retrieving - getFacetContents
Goto Forum:

Current Time: Sat May 26 17:58:41 GMT 2018

Powered by FUDForum. Page generated in 0.01697 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top