[xsl] table in html with exactly four columns in xsl

Subject: [xsl] table in html with exactly four columns in xsl
From: "Markus Hanel" <markus.hanel@xxxxxx>
Date: Thu, 25 Sep 2003 20:31:23 +0200 (MEST)
I am a beginner with xml, and my problem is to create a table in html 
with rows and exactly 4 columns to number automatic a few forms. 
The last row should be filled up to 4 columns with empty cells or one cell
with "colspan".
this last row problem i could not solved!
many thanks!

this should be the form!
test1  test2  test3  test4 
test5  test6  test7  test8 
test9  test10 test11 test12 
test13 empty  empty  empty
          cell       cell     cell

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<?xml-stylesheet href="tabelle.xsl" type="text/xsl"?>
<!DOCTYPE interview SYSTEM "tabelle.dtd">

with the xsl

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

<xsl:param name="cols" select="4" />

<xsl:template match="interview">

<table border="1">
  <xsl:apply-templates select="//form[position() mod $cols = 1]" mode="row"

<xsl:template match="form" mode="row">
  <xsl:apply-templates select=". |following-sibling::form[position() &lt;
$cols]" mode="cell" />

<xsl:template match="form" mode="cell">
  <xsl:apply-templates />


NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService

Jetzt kostenlos anmelden unter http://www.gmx.net

+++ GMX - die erste Adresse für Mail, Message, More! +++

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread