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 December 27th, 2006, 02:16 PM
Registered User
 
Join Date: Dec 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to smi13y
Default Hide/show rows in a table

Hi all.I have xml file: http://phpfi.com/188452 and report.xsl that is used to show xml file in browser: http://phpfi.com/188453. In xml file there is a table with one main task and two subtasks. How can i make that if you click on main task name you can colapse/expand subtasks below?

Any idea is welcome...

 
Old December 27th, 2006, 04:26 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

I think you are asking an HTML question rather than an XSLT question. Do you know how to write a dynamic HTML page that achieves this effect? (the usual way is for the onClick method to toggle the CSS class of the relevant elements to switch them from visible to hidden). If you do, then you can write an XSLT transformation that produces this HTML page as output. If you don't, then you need to ask on an HTML forum, not here. Never try to write an XSLT stylesheet, or a program in any other language, until you know what output you want it to produce - in this case, the output is an HTML page.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old December 27th, 2006, 05:10 PM
Registered User
 
Join Date: Dec 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to smi13y
Default

This is what i want to produce: http://www.ekcsoft.com/coding/js_hideexample.php. I can use the javascript form there but i don't know how to implement it in xsl stylesheet. I don't think this is html question because i know how to produce this using html but i don't know how to make this using xsl.

Thank you for your response.

 
Old December 27th, 2006, 05:28 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Which part of the HTML are you finding it difficult to generate, and why?

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old December 28th, 2006, 07:52 AM
Registered User
 
Join Date: Dec 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to smi13y
Default

Well, i don't know how to implement that javascript in xsl and make it work. I'm a c++ programmer and i need this just for reporting some data in browser, that is all. For more info check :http://timesaver.sourceforge.net/

It would be great if you could just help me make that script work on my table, because i don't have time to learn all about xsl...

 
Old December 28th, 2006, 07:09 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Sorry, but if you don't have time to learn from me, then I certainly don't have time to teach you.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old December 28th, 2006, 08:48 PM
Registered User
 
Join Date: Dec 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to smi13y
Default

no problem, thank ypu for your respose.






Similar Threads
Thread Thread Starter Forum Replies Last Post
HIDE/SHOW pallone Javascript How-To 11 April 16th, 2007 10:24 AM
How to hide control and show no space? rsearing ASP.NET 2.0 Basics 3 March 18th, 2007 09:39 AM
how to show/hide forms ? ashrafzia C# 3 November 3rd, 2006 11:07 AM
show/hide row(s) eugz Beginning PHP 0 March 19th, 2006 10:10 PM





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