Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 19th, 2012, 08:11 AM
Registered User
 
Join Date: Sep 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Hide Column both header and table cell in XSLT

Dear All,

Please help me on how to hide column both header and table cell based on click of the check box

Thanks,
Sivasankari
 
Old September 19th, 2012, 08:40 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

You need to provide some context. What is your input (a spreadsheet? HTML?). What output do you want (HTML?). What environment are you in (XSLT 1.0 in the browser?) What does your current code look like?

People on this forum are keen to help, but they aren't mind-readers.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old September 19th, 2012, 08:47 AM
Registered User
 
Join Date: Sep 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here is my code, i need to hide "Q4 2012" based on my checkbox check.Please help me.

<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp " ">
<!ENTITY reg "®">
]>
<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
<xsl:template match='/'>
<table class='dataGrid1' cellspacing='0' border="0">
<tr >
<td style="background-color:#FFFFFF" width="2%" colspan='3'>&nbsp;</td>

<td class='dataGrid1Header' nowrap="true" align="center">
<span id='spnReferralCount'>
<a Title='Sort by Referral Count'>Jul 12</a>
</span>
</td>

<td class='dataGrid1Header' nowrap="true" style="background-color:#579CC6" >
<span id='spnReferralPercentage'>
<a Title='Sort by Referral Percentage'>Q4 2012</a>
</span>
</td>
<tr>

<tr>
<xsl:for-each select="Record">
<td class='bor' colspan='3' nowrap="true">
<font color="#3768B9">
<b>
<xsl:value-of select='@CategoryName' />

</b>
</font>&nbsp;
</td>
<td class='bor' align="Right" style="background-color:#E3F1F4">
<font color="#3768B9">
<b>
<xsl:value-of select='@Q412' />
</b>
</font>&nbsp;
</td>

</xsl:for-each>

</tr>
</table>
Thanks,
Sivarani
 
Old September 20th, 2012, 04:53 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Do you know what HTML you want your stylesheet to produce? If you don't then you have an HTML problem, not an XSLT problem: you should never start coding in XSLT or any other language until you know what output you want your program to produce. If you do know what HTML you want to output, then tell us.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
Appending two values in same cell of table row in xslt shah_tab BOOK: Beginning XSLT and XPath : Transforming XML Documents and Data 0 January 4th, 2012 02:14 PM
hide certain column in a table lscjtw XSLT 2 August 2nd, 2007 01:26 PM
XSLT Table Row with repetitive first cell the cause XSLT 5 July 3rd, 2007 01:29 PM
hide/show header with javascript crmpicco Javascript How-To 2 April 10th, 2006 03:45 AM
Fixing header, and first column of table. rupen CSS Cascading Style Sheets 5 October 21st, 2005 08:33 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.