XSLT empty table header

M

marianowic

Hello.
I fighting with xsl transforamtions and I have the following problem:

I'm building dynamic table and everything works beautiful when the are
some date in the xml file. But when the table supose to be empty, I
want it(table) to disapear (visible = false). But I get the header of
the table.
Is there any property or something that can fix it (make everything
disapear??
Thanks a lot for help... marianowic
 
S

Simon Brooke

Hello.
I fighting with xsl transforamtions and I have the following problem:

I'm building dynamic table and everything works beautiful when the are
some date in the xml file. But when the table supose to be empty, I
want it(table) to disapear (visible = false). But I get the header of
the table.
Is there any property or something that can fix it (make everything
disapear??
Thanks a lot for help... marianowic

Are you outputting HTML?

Are you using XSL of the general structure:

<table>
<xsl:apply-templates select="row"/>
</table>

If so you probably want something of the form

<xsl:if test="row">
<table>
<xsl:apply-templates select="row"/>
</table>
</xsl:if>


--
(e-mail address removed) (Simon Brooke) http://www.jasmine.org.uk/~simon/

;; IE 3 is dead, but Netscape 4 still shambles about the earth,
;; wreaking a horrific vengeance upon the living
;; anonymous
 
S

swami

<xsl:variable name="kount" select="count( name)" />
<xsl:if test="kount<>0>
<table>
</table>
</xsl:if>


I think this code might do for you.

Swami.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top