473,382 Members | 1,290 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

XSLT empty table header

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

Mar 19 '07 #1
2 2557
in message <11**********************@o5g2000hsb.googlegroups. com>,
marianowic ('m*********@gmail.com') wrote:
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>
--
si***@jasmine.org.uk (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
Mar 20 '07 #2
<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.


On Mar 20, 2:02 pm, Simon Brooke <s...@jasmine.org.ukwrote:
in message <1174347134.497328.114...@o5g2000hsb.googlegroups. com>,

marianowic ('mariano...@gmail.com') wrote:
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>

--
s...@jasmine.org.uk (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

Mar 21 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sylvia | last post by:
Hi, I'm trying to render a XML structure to HTML using XSLT. My XML describe the header of a table with a complex and not linear structure. The first row of the header table always contains the...
4
by: Chris Kettenbach | last post by:
Hi Peter, I get error when processing the stylesheet. It errors here. <xsl:for-each select="registration)=1]"> specifically: Expression does not return a DOM node. registration)=1]<--
2
by: Richard L Rosenheim | last post by:
Is it possible to include addition tags in a XSLT file, that the XSLT processor will, for all practical purposes, ignore? What I'm looking to do is to include a section to contain information...
3
by: thomas.porschberg | last post by:
Hi, I want to read records from a database and export it in an arbitrary format. My idea was to feed a class with a String array fetched from the database and let this class fire SAX events as...
0
by: DAnne | last post by:
Hi, I'm very new to xslt and this is my first time posting to a Forum so please forgive me if I transgress any protocols. I have to do a tally report. This report is divided up into sections....
0
by: DAnne | last post by:
I'm trying to do a simple count function in xslt and it's turning out to be extremely painful. I have a report that brings back a set of responses for each question per section in an Audit. I...
1
by: Foxpointe | last post by:
Given some arbitrary XHTML, I'd like to obtain a 'simplified' XHTML result which strips out a large subset of standard elements and attributes - but not all. The main things I would like to...
2
by: Adam dR. | last post by:
I have an xml file similar to: <menu> <menuitem name="home" show="false"/> <menuitem name="about" show="true"/> <menuitem name="links" show="true"/> <menuitem name="games" show="true"/>...
0
by: miamikk | last post by:
I am XML newbie. I have question about inserting dynamic text in the header of HTML table. This is the site I have created (Only Report Type 1 is working)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.