writer.write( "// String type\n");
writer.write( "// Number of " + classname + " elements = " + (type.getEnumerationdata().size() - 1) + "\n");
Iterator i = type.getEnumerationdata().iterator();
int iIndex = 0;
BaseType baseTypeForArray = (BaseType) i.next();
while( i.hasNext())
{
if( iIndex == 0)
{
writer.write( "//\tif( ");
}
else
{
writer.write( " ||\n//\t ");
}
QName qnElement = (QName) i.next();
writer.write( "!strcmp( value, " + classname+ "_" + qnElement.getNamespaceURI() + ")");
iIndex++;
}
writer.write( "//)\n//\t{\n");
writer.write( "//\t\treturn 1;\n");
writer.write( "//\t}\n");
}
else
{
writer.write( "// Non-string type\n");
writer.write( "// Number of " + classname + " enums = " + (type.getEnumerationdata().size() - 1) + "\n");
Iterator i = type.getEnumerationdata().iterator();
int iIndex = 0;
BaseType baseTypeForArray = (BaseType) i.next();
while( i.hasNext())
{
if( iIndex == 0)
{