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 August 15th, 2007, 07:43 AM
Authorized User
 
Join Date: Mar 2007
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default XSLT Calendar

This is my XML file and there can be even 12 months data,i am generating it on rum time, so months can be increased or there can only be one month. i want to display a calendar based on how many months are there, suppose there are 3 montsh data in my xml file so i want to display three calendars for those months. and where element Day is not equal to element Sold then background color for that cell of the Calendar should be green else red. and one more thing i am also getting the input from user in form of date, like user says from 15th March to 25 July, so these two colors should be appl to only within these two dates rest days should be gray. can anyone help me to sort this out.


XML
-------------------------
<?xml version="1.0" encoding="iso-8859-1"?>
<ToursReport>
  <Tours>
     <Month>8</Month>
     <Year>2007</Year>
     <Day1>10</Day1>
     <Sold1>0</Sold1>
     <Day2>10</Day2>
     <Sold2>0</Sold2>
     <Day3>10</Day3>
     <Sold3>0</Sold3>
     <Day4>10</Day4>
     <Sold4>0</Sold4>
     <Day5>10</Day5>
     <Sold5>0</Sold5>
     <Day6>10</Day6>
     <Sold6>0</Sold6>
     <Day7>10</Day7>
     <Sold7>0</Sold7>
     <Day8>10</Day8>
     <Sold8>0</Sold8>
     <Day9>10</Day9>
     <Sold9>0</Sold9>
     <Day10>10</Day10>
     <Sold10>0</Sold10>
     <Day11>10</Day11>
     <Sold11>0</Sold11>
     <Day12>10</Day12>
     <Sold12>0</Sold12>
     <Day13>10</Day13>
     <Sold13>0</Sold13
     ><Day14>10</Day14>
     <Sold14>0</Sold14
     <Day15>10</Day15>
     <Sold15>3</Sold15>
     <Day16>10</Day16>
     <Sold16>0</Sold16>
     <Day17>10</Day17>
     <Sold17>0</Sold17>
     <Day18>10</Day18>
     <Sold18>0</Sold18>
     <Day19>10</Day19>
     <Sold19>0</Sold19>
     <Day20>10</Day20>
     <Sold20>0</Sold20>
     <Day21>10</Day21>
     <Sold21>0</Sold21>
     <Day22>10</Day22>
     <Sold22>0</Sold22>
     <Day23>10</Day23>
     <Sold23>0</Sold23>
     <Day24>10</Day24>
     <Sold24>0</Sold24>
     <Day25>10</Day25>
     <Sold25>0</Sold25>
     <Day26>10</Day26>
     <Sold26>0</Sold26>
     <Day27>10</Day27>
     <Sold27>0</Sold27>
     <Day28>10</Day28>
     <Sold28>0</Sold28>
     <Day29>10</Day29>
     <Sold29>0</Sold29>
     <Day30>10</Day30>
     <Sold30>0</Sold30>
     <Day31>10</Day31>
     <Sold31>0</Sold31>
 </Tours>

 <Tours>
  <Month>9</Month>
  <Year>2007</Year>
  <Day1>10</Day1>
  <Sold1>0</Sold1>
  <Day2>10</Day2>
  <Sold2>0</Sold2>
  <Day3>10</Day3
  ><Sold3>0</Sold3>
  <Day4>10</Day4>
  <Sold4>0</Sold4>
  <Day5>10</Day5>
  <Sold5>0</Sold5>
  <Day6>10</Day6>
  <Sold6>0</Sold6>
  <Day7>10</Day7>
  <Sold7>0</Sold7>
  <Day8>10</Day8>
  <Sold8>0</Sold8>
  <Day9>10</Day9>
  <Sold9>0</Sold9>
  <Day10>10</Day10>
  <Sold10>0</Sold10>
  <Day11>10</Day11>
  <Sold11>0</Sold11>
  <Day12>10</Day12>
  <Sold12>0</Sold12>
  <Day13>10</Day13>
  <Sold13>0</Sold13>
  <Day14>10</Day14>
  <Sold14>0</Sold14>
  <Day15>10</Day15>
  <Sold15>0</Sold15>
  <Day16>10</Day16>
  <Sold16>0</Sold16>
  <Day17>10</Day17>
  <Sold17>0</Sold17>
  <Day18>10</Day18>
  <Sold18>0</Sold18>
  <Day19>10</Day19>
  <Sold19>0</Sold19>
  <Day20>10</Day20>
  <Sold20>0</Sold20>
  <Day21>10</Day21>
  <Sold21>0</Sold21>
  <Day22>10</Day22>
  <Sold22>0</Sold22>
  <Day23>10</Day23>
  <Sold23>0</Sold23>
  <Day24>10</Day24>
  <Sold24>0</Sold24>
  <Day25>10</Day25>
  <Sold25>0</Sold25>
  <Day26>10</Day26>
  <Sold26>0</Sold26>
  <Day27>10</Day27>
  <Sold27>0</Sold27>
  <Day28>10</Day28>
  <Sold28>0</Sold28>
  <Day29>10</Day29>
  <Sold29>0</Sold29>
  <Day30>10</Day30>
  <Sold30>0</Sold30>
  <Day31>0</Day31>
  <Sold31>0</Sold31>
 </Tours>
</ToursReport>


I Love XML and family
__________________
I Love XML and family
 
Old August 15th, 2007, 10:38 AM
Friend of Wrox
 
Join Date: Jul 2006
Posts: 430
Thanks: 28
Thanked 5 Times in 5 Posts
Send a message via Yahoo to bonekrusher
Default

try here

http://www.topxml.com/code/default.a...20020711152545








Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP: XML/XSLT/ASP.NET Calendar Control kwilliams XSLT 14 May 8th, 2008 03:43 PM
General XSLT Questions in the XSLT Forum jminatel BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 0 March 31st, 2008 07:50 PM
Calendar like calendar in AJAX in ASP.NET h@ckerz ASP.NET 2.0 Professional 0 February 19th, 2008 12:56 AM
Can XSLT read DTD/schema and Generate XSLT.. ROCXY XSLT 1 November 6th, 2006 09:39 AM
dynamic xslt -> xslt creation namespace problem jkmyoung XSLT 2 July 15th, 2006 12:42 AM





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