Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Facets
Facets [message #582003] Mon, 05 January 2004 15:36
Raster Mising name is currently offline Raster Mising nameFriend
Messages: 75
Registered: July 2009

Suppose after loading a schema I am examining the different element and
attribute declarations and trying to record the facets against them.

1. ---> I have with me (XSDElementDeclaration) or
(XSDAttributeDeclaration) instances as starting points (and they are not
refernces and if they are they have been resolved).

2. ----> On either of these declarations I can invoke the following to
obtain typedenitions

XSDTypeDefinition typeDef1= decl .getTypeDefinition() //decl is either
(XSDElementDeclaration) or (XSDAttributeDeclaration)
XSDTypeDefinition typeDef2= decl.getAnonymousTypeDefinition() //decl is
either (XSDElementDeclaration) or (XSDAttributeDeclaration)

//here using getAnonymousTypeDefinition()

3.---> If a typeDefinition is an instance of XSDSimpleTypeDefinition they are
usable for obtaining facets.

4.---> I can obtain further XSDSimpleTypeDefinitions by invoking
getSimpleType() on these typedefs.

XSDSimpleTypeDefinition typeDef3= typeDef.getSimpleType() //typeDef can be
typeDef1 or typeDef2

5.---> I can have another typedef from this typedef

XSDTypeDefinition typeDef4 = typeDef3.getBaseType(); //lets assume this
base type is the last base.

6.----> All of these typeDefinitions are simpleTypeDefinitions- typeDef1,
typeDef2, typeDef3, typeDef4 and more than one m ay be not null.

----------------------> Q) Which typedef do I use to obtain the facets-
enumeration, min, max, pattern etc.
----------------------> a)Elem ents
----------------------> b)Attributes

(Do I simply try to obtain facets from all of them and if the facets are
not null record them ? Has someone documented some guidelines?)

Thank you.
Previous Topic:Facets
Next Topic:facets
Goto Forum:

Current Time: Mon Aug 10 00:14:05 GMT 2020

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

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

Back to the top