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 March 2nd, 2007, 01:38 PM
Authorized User
Join Date: Mar 2007
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dynamic Display Problem

Hello everyone!

new on the forum, great to be here!

I am almost done with displaying successfully a table that will show a calendar in a month format, etc.

XML file: http://www.mamaliga.com/test/os_3_months.xml
XSL file: http://www.mamaliga.com/test/os_3_months.xsl

However, if a certain "Day" element has some "Time" elements, I'd like their "slots" attributes to be displayed when toggling on the day number link (The ones containing the folders).

For example if someone clicks on day #3, I'd like to show the two existing "slot" attributes values of "10:30 am" and "11:00 am".

Currently when I click on the folder, the show/hide function works, but there are no "slot" values displayed...

Just for your info, this should be some sort of an online schedulyng system...

Anything I am doing wrong?


Old March 3rd, 2007, 04:49 AM
joefawcett's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts

You are using an obsolete and unsupported transformation language that came out before XSLT was finalised.
Try switching to the official version. Your first step would be to change the namespace from "http://www.w3.org/TR/WD-xsl" to "http://www.w3.org/1999/XSL/Transform". You may have other changes to make as the elements used are somewhat different although I can't see anything obvious.
I can't see anything in your code that attempts to process the Time/@slot attributes.


Joe (Microsoft MVP - XML)
Old March 5th, 2007, 03:02 PM
Authorized User
Join Date: Mar 2007
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts

Thanks Joe!

I switched the namespace from "http://www.w3.org/TR/WD-xsl" to "http://www.w3.org/1999/XSL/Transform".

quote:I can't see anything in your code that attempts to process the Time/@slot attributes.

That's exactly where I need help since I am not sure how to use that. This is what I use to toggle the visibility using Javascript on the onClick event of the main header link. I am assuming the trouble is somewhere in the "<xsl:template match="Day[Time]">" template:

    <xsl:template match="Week">
            <xsl:apply-templates select="Day"/>
    <xsl:template match="Day">
                <xsl:attribute name="CLASS">clsTocItem</xsl:attribute>
                <xsl:attribute name="HREF"><xsl:value-of select="@href"/></xsl:attribute>
                <xsl:attribute name="TARGET">rep</xsl:attribute>
                <xsl:attribute name="ONCLICK"><xsl:value-of select="@onClick"/></xsl:attribute>
                <xsl:value-of select="@date"/>
    <xsl:template match="Day[Time]">
            <LI CLASS="clsShowHide">
                <A ONCLICK="Toggle()" HREF="javascript:">
                    <xsl:attribute name="CLASS">clsTocHeading</xsl:attribute>
                    <xsl:value-of select="@date"/>
                <UL CLASS="clsItemsHide">
                    <xsl:apply-templates select="Day"/>

Similar Threads
Thread Thread Starter Forum Replies Last Post
dynamic display using logic tags rajesh_css Struts 1 December 23rd, 2008 03:42 AM
Dynamic Date Display velcrobomb SQL Language 3 April 3rd, 2007 10:10 AM
Dynamic Form Display Morn ASP.NET 2.0 Basics 0 March 13th, 2007 03:30 PM
How display large amount of dynamic text relaytest49 ASP.NET 2.0 Professional 2 October 6th, 2006 02:19 PM
How to dynamic display the content of the table? myhrvod Pro Java 0 August 3rd, 2006 12:42 AM

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