Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Structured tables in XML

Status
Not open for further replies.

anne

Programmer
Jan 11, 2001
1
0
0
US
Hi !

I wrote in my XML document :

<liste type=&quot;tableau&quot; titre=&quot;Evaluation du risque de formation des sulfures&quot;>
<element>
<element>
<corps>Somme des notes</corps>
</element>
<element>
<corps>Risque</corps>
</element>
</element>
<element>
<element>
<corps>0 - 5</corps>
</element>
<element>
<corps>Nul</corps>
</element>
</element>
<element>

yes it's in French !!

And I wrote in my XSL stylesheet :

<xsl:template match=&quot;liste&quot;>
<xsl:choose>
<xsl:when test=&quot;@type[. = 'liste']&quot;>
<ul>
<xsl:apply-templates/>
</ul>
</xsl:when>
<xsl:when test=&quot;@type[. = 'tableau']&quot;>
<center>
<text align=&quot;justify&quot;>
<table border=&quot;2&quot;>
<td bgcolor=&quot;#0D3092&quot;>
<font color=&quot;white&quot;>
<b>
<xsl:value-of select=&quot;@titre&quot;/>
</b>
</font>
</td>
<xsl:apply-templates/>
</table>
</text>
</center>
</xsl:when>
</xsl:choose>
</xsl:template>

and this :

<xsl:template match=&quot;element/element&quot;>
<blockquote>
<div align=&quot;justify&quot;>
<tr>
<td>
<xsl:value-of select=&quot;corps&quot;/>
<xsl:apply-templates/>
</td>
</tr>
</div>
</blockquote>
</xsl:template>


but my table is not structured ! How can I do to have it structured ?
Can you help me please ?!
Thanks

Anne
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top