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

/**
 * Models a selection element in QDML.
 * The contentModel elements held by a selection element defines alternative content
 * sub-models within the element content of another element.
 <pre>
DTD:

&lt;!ELEMENT selection (<a href="QDMContentModel.html#remList">rem*</a>, <a href="#contentList">(item|selection|sequence)</a>+)>

&lt;!ATTLIST selection
&nbsp;&nbsp;&nbsp;&nbsp;<a href="QDMContentModel.html#label">label</a> CDATA #IMPLIED
&nbsp;&nbsp;&nbsp;&nbsp;<a href="QDMContentModel.html#cref">cref</a> CDATA #IMPLIED
&nbsp;&nbsp;&nbsp;&nbsp;<a href="QDMContentModel.html#optional">optional</a> CDATA "False"
&nbsp;&nbsp;&nbsp;&nbsp;<a href="QDMContentModel.html#repeating">repeating</a> CDATA "False"
&nbsp;&nbsp;&nbsp;&nbsp;ID id #IMPLIED
>
 </pre>
 */
public class QDMSelection extends QDMSequence 
{
	public void init(Map coinMap, Map contentMap)
		throws SAXException
	{
		if (initialized)
			return;
		cminit(coinMap,contentMap);
		int s;
		int i;

		s=contentList.size();
		for(i=0;i<s;++i)
		{
			QDMContentModel cm=(QDMContentModel)contentList.get(i);
			cm.init(coinMap,contentMap);
		}

		if (content!=null && (content instanceof QDMSequence))
		{
			QDMSequence seq=(QDMSequence)content;
			contentList.addAll(seq.contentList);
		}
	}
}
