xerces-c-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alberto Massari <amass...@datadirect.com>
Subject Re: Retrieve list of valid children based on element name.
Date Wed, 24 Jan 2007 14:35:40 GMT
XSTypeDefinition is just the base class; depending on the value 
returned by getTypeCategory() you have to cast it to either a 
XSComplexTypeDefinition or XSSimpleTypeDefinition, where you will 
find the rest of the informations.


At 08.29 24/01/2007 -0600, Timothy Strimple wrote:
>Boris Kolpackov wrote:
>>Hi Timothy,
>>I am somewhat confused by your description, but if you managed to get
>>a, say, PSVIElement for an element in your instance, then you can get
>>to XSTypeDefinition which describes the type that was used to validate
>>this element. From XSTypeDefinition you should be able to get the
>>complete content model of a type, including elements and attributes.
>I must be missing something then. From what I can tell, the 
>XSTypeDefinition only provides functions for retrieving the name and 
>namespace of the type. I'm looking at the documentation here, 
>which exposes the following functions.
>const XMLCh* getName()
>const XMLCh* getNamespace()
>XSNamespaceItem* getNamespaceItem()
>TYPE_CATEGORY getTypeCategory()
>XSTypeDefinition* getBaseType()
>bool isFinal(short toTest)
>short getFinal()
>bool getAnonymous()
>bool derivedFromType(const XSTypeDefinition *const ancestorType)
>bool derivedFrom(const XMLCh *typeNamespace, const XMLCh *name)
>None of which seem to be able to do what I need. Could you provide 
>some pseudo code for using XXTypeDefinition to get the valid 
>children / attributes of the element?
>  Tim

View raw message