Facets [message #34651] |
Mon, 05 January 2004 15:36 |
Eclipse User |
|
|
|
Originally posted by: crscca.bol.net.in
Hi,
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)
or
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.
|
|
|
Powered by
FUDForum. Page generated in 0.03480 seconds