Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 2nd, 2007, 01:38 PM
Authorized User
Points: 145, Level: 2
Points: 145, Level: 2 Points: 145, Level: 2 Points: 145, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2007
Location: , , .
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?

Thanks!
Gabi



Reply With Quote
  #2 (permalink)  
Old March 3rd, 2007, 04:49 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

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)
Reply With Quote
  #3 (permalink)  
Old March 5th, 2007, 03:02 PM
Authorized User
Points: 145, Level: 2
Points: 145, Level: 2 Points: 145, Level: 2 Points: 145, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2007
Location: , , .
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Joe!

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

 
Quote:
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:

Code:
    <xsl:template match="Week">
        <tr>
            <xsl:apply-templates select="Day"/>
        </tr>
    </xsl:template>
    <xsl:template match="Day">
        <td>
            <A>
                <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"/>
            </A>
        </td>
    </xsl:template>
    <xsl:template match="Day[Time]">
        <td>
            <LI CLASS="clsShowHide">
                <A ONCLICK="Toggle()" HREF="javascript:">
                    <xsl:attribute name="CLASS">clsTocHeading</xsl:attribute>
                    <xsl:value-of select="@date"/>
                </A>
                <UL CLASS="clsItemsHide">
                    <xsl:apply-templates select="Day"/>
                </UL>
            </LI>
        </td>
    </xsl:template>
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 03:38 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.