<?xml version="1.0" encoding="ISO-8859-1"?>

<jsp:root	xmlns:jsp="http://java.sun.com/JSP/Page" 
				xmlns:c="http://java.sun.com/jsp/jstl/core" 
				xmlns:fe="http://www.emdt.ardeo.net/jsp/fe"
				version="2.0">
	<jsp:directive.page contentType="text/html" />
	<table class="group-tabular" width="100%" >
		<tr>
			<th></th>
			<fe:forEach var="child" element="${currentElement}">
				<c:choose>
					<c:when test="${child.tagName == 'cols'}">
						<fe:forEach var="col" element="${child}" tagName="col">
							<th><c:out value="${col.firstChild.nodeValue }"/></th>
						</fe:forEach>
					</c:when>
				</c:choose>
			</fe:forEach>
		</tr>
		<fe:forEach var="rowElement" element="${currentElement}" tagName="row">
			<tr>
				<fe:forEach var="element" element="${rowElement}">
					<fe:formElement var="fe" element="${element}"/>
					<fe:getAttribute var="class" element="${element}" attribute="class"/>
						<c:choose>
							<c:when test="${element.tagName == 'label' and element.firstChild != null}">
								<td><c:out value="${element.firstChild.nodeValue }"/></td>
							</c:when>
							<c:otherwise>
								<td>
									<c:if test="${class == 'input'}">
										<c:set var="currentElement" value="${element}" scope="request"/>
										<jsp:include flush="true" page="${currentElement.nodeName}.jsp"/>
									</c:if>
								</td>
							</c:otherwise>
						</c:choose>
				</fe:forEach>
			</tr>
		</fe:forEach>
	</table>
</jsp:root>