

				Xsl transformace xml na html			
							
					Mám xml:
<?xml version="1.0" encoding="windows-1250" ?> 
<?xml-stylesheet type="text/xsl" href="auto-html2.xsl"?>
<auto>
	<input>
		<label>Značka: </label>
		<name>znacka</name>
		<type>text</type>
		<value>Renault</value>
	</input>
	<input>
		<label>Model: </label>
		<name>model</name>
		<type>text</type>
		<value>Clio</value>
	</input>
	<input>
		<label>RZ (SPZ): </label>
		<name>spz</name>
		<type>text</type>
		<value>1AC2889</value>
	</input>
        ...
</auto>
K němu mám xsl:
<?xml version="1.0" encoding="windows-1250" ?> 
<xsl:stylesheet version="1.0" xmlns:xsl="www.w3.org/1999/XSL/Transform">
<xsl:template match="input">
	<tr>
		<td width="200px"><label for="{name}"><xsl:value-of select="label" /></label></td>
		<td>
			<xsl:choose>
				<xsl:when test="type='text'">
  					<input type="{type}" name="{name}" id="{name}" value="{value}" /> 
  				</xsl:when>
  				...
  			</xsl:choose>
  		</td>
  	</tr>
</xsl:template>
</xsl:stylesheet><?xml version="1.0" encoding="windows-1250" ?> 
<xsl:stylesheet version="1.0" xmlns:xsl="www.w3.org/1999/XSL/Transform">
<xsl:import href="input.xsl" /> 
<xsl:template match="auto">  	
<html>
<head></head>
<body>
	<table width="900px" cellspacing="0" cellpadding="2">  	
   		<xsl:apply-templates select="input" />
  	</table>
</body>
</html> 
</xsl:template> 
</xsl:stylesheet>Výsledkem je html tabulka, kde každý řádek má 2 buňky - v první je label inputu, ve 2. input.
A já bych chtěla, aby v té tabulce byly na jednom řádku 3 inputy, tedy 6 sloupců. Jak to udělat?
Už jsem to vyřešila
šablona pro vypsání auta:
šablona pro vypsání jednoho řádku: