package com.jxml.quick.util.dtd2qdml;
import com.wutka.dtd.*;
import com.jxml.quick.*;
import org.xml.sax.*;
import java.util.*;
import com.jxml.quick.ocm.*;
import java.io.*;

/**
 * Extracts QJML data.
 */
public class QCDTDChoice extends OCMpeerSupport
{
	/**
	 * User-provided code to perform the conversion.
	 */
	public void cvt(Object param)
		throws SAXException, IOException
	{
		DTDChoice dm=(DTDChoice)dataModel;

		DTDCardinal cardinal=dm.cardinal;
		if (DTDCardinal.OPTIONAL.equals(cardinal)
		||  DTDCardinal.ZEROMANY.equals(cardinal))
			addBooleanAttribute("optional",true);
		if (DTDCardinal.ONEMANY.equals(cardinal)
		||  DTDCardinal.ZEROMANY.equals(cardinal))
			addBooleanAttribute("repeating",true);
		startElement("selection");
		Vector v=dm.getItemsVec();
		doCvt(v,this);
		endElement("selection");
	}
}
