?
Solved

Re-ask ?? Sort date/time ascending sorta of working??

Posted on 2007-11-30
3
Medium Priority
?
787 Views
Last Modified: 2013-11-18
From an earlier question to EE I wanted the "Planned" node sorted, which it does sort of. If you look at the HTML file the 11/30/07 are at the bottom, when they should be at the top...

SMZ                12/02/07 2:00pm
UMZ                12/02/07 3:00pm
EDAS Broker  12/02/07 12:00pm
IPS R7.6        11/30/07 5:30am
IPS R7.6        11/30/07 9:00am
IPS R7.6        11/30/07 2:00pm

thanks
 

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
<xsl:output method="html" indent="yes" />
<xsl:template match="/">
          <HTML>
               <HEAD>
                 <style type="text/css">
BODY {margin:0; background-color="ivory"}
H1 {font:bold 18pt Verdana; margin-top:1em; color:"#8b0000"}
DIV {font:bold; font-size:11px;height:20px}
pre {word-wrap:break-word;font-family: arial,san-serif;margin-top:2px;margin-bottom:2px;font-size:11px;font-weight:bold}
	</style>
               </HEAD>
                
               <!-- Start of HTML Body -->
               <BODY>
   <H1 align="center">Managed Deployment Weekend Implementation - Status Report</H1>
                         <DIV id="listing">
                         <xsl:apply-templates select="MILE"/>
                    </DIV>
                </BODY>
               <!-- End of HTML Body -->
          </HTML>
     </xsl:template>
     <!-- Start of Templates -->
     <xsl:template match="MILE">
          <TABLE width="100%" border="1" borderColor="black" valign="TOP" align="center">
               <TR bgColor="#3399FF" borderColorDark="black" borderColorLight="black">
                    <TD>
                         <font color="black">
                              <DIV align="center">Project Name</DIV>
                         </font>
                    </TD>
                   <TD>
                         <font color="black">
                              <DIV align="center">Planned Date/Time</DIV>
                         </font>
                    </TD>
                    <TD>
                         <font color="black">
                              <DIV align="center">Actual Date/Time</DIV>
                         </font>
                    </TD>
		<TD>
                         <font color="black">
                              <DIV align="center">Milestone Marker</DIV>
                         </font>
                    </TD>
		<TD>
                         <font color="black">
                              <DIV align="center">Status</DIV>
                         </font>
                    </TD>
                    <TD>
                         <font color="black">
                              <DIV align="center">Next Milestone/Time of Status for Project</DIV>
                         </font>
                    </TD>
                    <TD>
                         <font color="black">
                              <DIV align="center">Comments</DIV>
                         </font>
                    </TD>
               </TR>
                 <xsl:for-each select="Project">	 
<xsl:sort order="ascending" select="substring-after(substring-after(substring-before(Planned, ' '), '/'), '/')" data-type="number"></xsl:sort>
<xsl:sort order="ascending" select="substring-before(substring-after(substring-before(Planned, ' '), '/'), '/')" data-type="number"></xsl:sort>
<xsl:sort order="ascending" select="substring-before(Planned, '/')" data-type="number"></xsl:sort>
<xsl:sort order="ascending" select="substring(substring-after(Planned, ':'),3, 2)" data-type="text"></xsl:sort>
<xsl:sort order="ascending" select="substring-before(substring-after(Planned, ' '), ':')" data-type="number"></xsl:sort>
<xsl:sort order="ascending" select="substring-after(substring-after(Planned, ' '), ':')" data-type="text"></xsl:sort>
                    <TR bgColor="#f0f0f0">
                         <TD>
                              <DIV align="center">
                                   <font color="black">
                                       <xsl:value-of select="ProjectName"/>
		 </font>
                              </DIV>
                         </TD>
                         <TD>
                              <DIV align="center">
	  <xsl:call-template name="tTextParser">
	<xsl:with-param name="pText" select="Planned/text()"/>
</xsl:call-template>
                    </DIV>
                         </TD>
                         <TD>
                              <DIV align="center">
		  <font color="red">
	        <xsl:call-template name="tTextParser">
	   <xsl:with-param name="pText" select="Actual/text()"/>
	       </xsl:call-template>
	   </font>
	 </DIV>
               </TD>
		 <TD>
                        <DIV align="center">
                            <xsl:call-template name="tTextParser">
	   <xsl:with-param name="pText" select="MileStones/text()"/>
	  </xsl:call-template>
                              </DIV>
                         </TD>
                         <TD>
                       <DIV align="center">
                     <xsl:call-template name="tTextParser">
	  <xsl:with-param name="pText" select="Status/text()"/>
	   </xsl:call-template>
                       </DIV>
                         </TD>
                         <TD>
                          <DIV align="center">
	     <xsl:call-template name="tTextParser">
	   <xsl:with-param name="pText" select="Next/text()"/>
	   </xsl:call-template>
	  </DIV>
              </TD>
	 <TD>
                   <DIV align="center">
	  <font color="red">
	     <xsl:call-template name="tTextParser">
	   <xsl:with-param name="pText" select="Comments/text()"/>
	  </xsl:call-template>
	  </font>
	   </DIV>
               </TD>
             </TR>
               </xsl:for-each>
          </TABLE>
	   </xsl:template>
		   <xsl:template name="tTextParser">
          <xsl:param name="pText"/>
                   <pre><xsl:value-of select="$pText"/></pre>          
     </xsl:template>
	</xsl:stylesheet>

Open in new window

0
Comment
Question by:Richard Kreidl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 2000 total points
ID: 20384248
swap line 67 and line 66
and you ll be OK
0
 
LVL 2

Author Closing Comment

by:Richard Kreidl
ID: 31411971
Thanks a lot
0
 
LVL 60

Expert Comment

by:Geert Bormans
ID: 20384774
welcome
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question