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

/**
 * Removes IDs.
 */
public class Element extends OCMrootPeerSupport
{
	/**
	 * User-provided code to perform the conversion.
	 */
	public void cvt(Object param)
		throws SAXException, IOException
	{
		int i,s;

		OCMelement element=(OCMelement)dataModel;

		s=element.attributes.size();
		for (i=0;i<s;++i)
		{
			OCMattribute a=(OCMattribute)element.attributes.get(i);
			if (!"ID".equals(a.name))
				addStringAttribute(a.name,a.text);
		}

		startElement(element.name);

		s=element.elements.size();
		if (s==0)
			addStringContent(element.text);
		else
			doCvt(element.elements,this);

		endElement(element.name);
	}
}
