Hi,

I'm using the code below to get the count of the enumeration facets for
a simple type (the pST is an XSSimpleTypeDefinition pointer) and the
count always comes back as some totally bogus number like 9246.  I
checked the example code (in PSVIWriterHandlers.cpp) and see that it
does virtually the same thing.  So what could be wrong here?

XSMultiValueFacetList* pFL = pST->getMultiValueFacets();

if ( pFL == 0 )
        return 0;

unsigned int nSize = pFL->size();
if ( nSize == 0 )
        return 0;

unsigned int nCount = 0;

for ( unsigned int i = 0; i < nSize; i++ )
{
        XSMultiValueFacet* pMV = pFL->elementAt(i);
        if ( pMV->getFacetKind() ==
XSSimpleTypeDefinition::FACET_ENUMERATION )
        {
                StringList* pSL = pMV->getLexicalFacetValues();
                if ( pSL )
                {
                        nCount = pSL->size();
                }
        }
}
return nCount;

Thanks for any help here,

Elisha Berns
[EMAIL PROTECTED]
tel. (310) 556 - 8332
fax (310) 556 - 2839




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

Reply via email to