package com.jxml.quick.examples.convert;
import com.jxml.quick.*;
import org.xml.sax.*;
import java.util.*;

public class Y2A extends QConverterSupport
{
	public int v;	// attribute v
	public ArrayList xys=new ArrayList(); // list of "x" and "y" child elements

	/**
	 * Process a non-root element.
	 */
	public void cvt(DocumentHandler destination, Integer x)
		throws SAXException
	{
		setDestination(destination);
		if (x.intValue()!=0) // Check for default value
			addIntAttribute("x",x);
		if (v!=0) // Check for default value
			addIntAttribute("y",v);
		startElement("a");
		int s=xys.size();
		int i;
		for (i=0;i<s;i+=2) // Process children
		{
			Integer xc=(Integer)xys.get(i);
			Y2A yc=(Y2A)xys.get(i+1);
			yc.cvt(destination,xc);
		}
		endElement("a");
	}
}
