Line from *.xsd
<xsd:element name="A" type="TypeA" minOccurs="1" maxOccurs="unbounded"
nillable="true"/>

How could I get the information about minOccurs="1" maxOccurs="unbounded"
properties ?
I expected that following code will return mw what I want

    SchemaGrammar* grammar = (SchemaGrammar*)
parser.getValidator().getGrammar();
    RefHash3KeysIdPoolEnumerator<SchemaElementDecl> elemEnum =
grammar->getElemEnumerator();
    if (elemEnum.hasMoreElements())
    {
        while(elemEnum.hasMoreElements())
        {
            // Element's properties
            const SchemaElementDecl& curElem = elemEnum.nextElement();
            ContentSpecNode* cSpecNode = curElem.getContentSpec();

            if( !cSpecNode) {

    switch( cSpecNode->getType() )
    {
        case ContentSpecNode::Leaf:             cout << "Leaf"; break;
        case ContentSpecNode::ZeroOrOne:        cout << "ZeroOrOne"; break;
        case ContentSpecNode::ZeroOrMore:       cout << "ZeroOrMore"; break;
// That is what I need
    ...
    }


But this does not work
Could you suggest smth ?


Peter A. Volchek
Software Engineer
Metis International, Inc.
[EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to