package com.jxml.quick.util.qdml2dtd;
import com.jxml.quick.model.qdml.*;
import com.jxml.quick.*;
import org.xml.sax.*;
import java.util.*;
import com.jxml.quick.ocm.*;
import java.io.*;

/**
 * Extracts DTD data.
 */
public class QCSelection extends OCMpeerSupport
{
	/**
	 * User-provided code to perform the conversion.
	 */
	public void cvt(Object param)
		throws SAXException, IOException
	{
		QDMSelection dm=(QDMSelection)dataModel;
		if (dm.optional && dm.repeating )
			addStringAttribute("cardinal","ZEROMANY");
		else if (dm.optional)
			addStringAttribute("cardinal","OPTIONAL");
		else if (dm.repeating)
			addStringAttribute("cardinal","ONEMANY");
		else 
			addStringAttribute("cardinal","NONE");
		startElement("choice");
		doCvt(dm.contentList ,param );
		endElement("choice");
	}
}
