[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Thats a good idea, but the output has to look like this html:
So I don´t know how to iterate this. Can you give me a hint on that? Thanks a lot. I appreciate your help!
Michael
Emmanuil Batsis (Manos) wrote:
D-89075 ulm
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Re: [xsl] xsl:for-each question
Subject: Re: [xsl] xsl:for-each question From: Michael Olszynski <m.olszynski@xxxxxxxxxxxxx> Date: Thu, 30 Oct 2003 15:30:52 +0100 |
Thats a good idea, but the output has to look like this html:
<table width="100%" border="1"> <tr> <td>point1</td> <td>s-point1</td> <td>s-s-point1</td> <td>s-s-s-point1</td> </tr> <tr> <td> </td> <td>s-point-2</td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td>s-poin-3</td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td>s-point-4</td> <td>s-s-point1</td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td>s-s-point2</td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td>s-s-point3</td> <td>s-s-s-point1</td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td>s-s-s-point2</td> </tr> <tr> <td>point2</td> <td>s-point1</td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td>s-point2</td> <td>s-s-spoint1</td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td>s-s-point2</td> <td> </td> </tr> <tr> <td> </td> <td>s-point3</td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td>s-point4</td> <td> </td> <td> </td> </tr> </table>
So I don´t know how to iterate this. Can you give me a hint on that? Thanks a lot. I appreciate your help!
Michael
Emmanuil Batsis (Manos) wrote:
Michael Olszynski wrote:
Thank you very much, you´re right. I´m yet not really in the thinking of templates. I still try to "program" my xslt like I´m used to do it with Java-Programs.
How about using a list instead of a table and let (X)HTML do the formatting for you like:
* point1 o subpoint1.1 + subsubpoint1.1.1 # subsubpoint1.1.1.1 o subpoint1.2 * point2 * point3 * point4
test.xml: =============================== <?xml-stylesheet href="test.xsl" type="text/xsl"?> <root> <topic name="point1"> <topic name="subpoint1.1"> <topic name="subsubpoint1.1.1"> <topic name="subsubpoint1.1.1.1"> </topic> </topic> </topic> <topic name="subpoint1.2"> </topic> </topic> <topic name="point2"> </topic> <topic name="point3"> </topic> <topic name="point4"> </topic> </root>
test.xsl:
===============================
<?xml version="1.0"?>
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/"> <html><head></head><body> <ul> <xsl:apply-templates/> </ul> </body></html> </xsl:template>
<xsl:template match="topic"> <li> <xsl:value-of select="@name"/> <xsl:if test="topic"> <ul> <xsl:apply-templates/> </ul> </xsl:if> </li> </xsl:template>
<xsl:template match="@*|text()"/> </xsl:transform>
-- Michael Olszynski Dipl.-Ing.(FH) Software Engineer
___ |X__________________________________________________________ X|
eXXcellent solutions gmbh In der Wanne 55
D-89075 ulm
e | m.olszynski@xxxxxxxxxxxxx t | +49 [0]731-55026-39 f | +49 [0]731-55026-99 i | www.exxcellent.de ________________________________________________________________
Geschäftsführer: Dr. Martina Maier, Wilhelm Zorn, Gerhard Gruber Sitz der Gesellschaft: Ulm, Registergericht: Ulm HRB 4309
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] xsl:for-each question, Emmanuil Batsis (Man | Thread | Re: [xsl] xsl:for-each question, Cas Tuyn |
Re: [xsl] Select statement within H, andrew . curry | Date | RE: [xsl] Creating then using eleme, Passin, Tom |
Month |
Keywords