Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » facets
facets [message #582029] Mon, 05 January 2004 10:41
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. for
----------------------> 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.

[I repeated the posting with a mior corection. Hope you dont mind!!!!]
Previous Topic:Facets
Next Topic:href help
Goto Forum:
  


Current Time: Sat Aug 30 06:33:48 EDT 2014

Powered by FUDForum. Page generated in 0.06614 seconds