Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 856341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:13:09+00:00 2026-05-15T08:13:09+00:00

In the if block below I want to be also test whether @Timestamp is

  • 0

In the if block below I want to be also test whether @Timestamp is smaller than the previous Message‘s timestamp. How can I achieve this?

<xsl:for-each select="Message">
    <xsl:sort select="position()" data-type="number" order="descending"/>
    <xsl:variable name="newclass">
        <xsl:if test="@Timestamp + 60 &gt; $ctimestamp">new</xsl:if>
    </xsl:variable>

    <tr><td class="debugtime">
        <xsl:value-of select="@Time"/>
    </td><td class="{$newclass}">
        <xsl:value-of select="node()"/>
    </td></tr>
</xsl:for-each>

Example XML

<Message Time="2010/06/17 04:23:32" Timestamp="1276773812">message1</Message>
<Message Time="2010/06/17 04:23:32" Timestamp="1276773812">message2</Message>
<Message Time="2010/06/17 04:23:33" Timestamp="1276773813">message3</Message>
<Message Time="2010/06/17 04:23:33" Timestamp="1276773813">message4</Message>

Update:
I have implemented both variations of the current answers but to no luck. It always doesn’t seem to work properly for the second elements onwards, in that it will bold the first correctly but no more (although sometimes it will do the third). Updated if block code below.

<xsl:if test="@Timestamp + 60 &gt; $ctimestamp">
    <xsl:if test="position() = 1">
        new
    </xsl:if>
    <xsl:if test="position() != 1 and ../Message[position()-1]/@Timestamp - 1 &lt; @Timestamp">
        new
    </xsl:if>
</xsl:if>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T08:13:09+00:00Added an answer on May 15, 2026 at 8:13 am
    @Timestamp &lt; preceding-sibling::Message[1]/@Timestamp
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The simple code block below can be served up in a static HTML page
in the code below at first if statements block (there will be more than
I have a code something below: function showHideOptions() { $(#template1, #template2, #template3, #template4).css(display,none); $(this).css(display,block);
If I declare a variable within a block (see below) is there a way
How to find below comment block(s) with javascript/jquery regex: /* some description here */
I am using the below code to block the taskbar which is working perfectly.
I have html and css as below - .title { display: block; background-color: red;
In the test below, the Bar and Baz blocks contain identical specs. Leaving aside
** New EDIT ** so what I'm trying to do is this. I want
The test class below verifies that a simple HttpService gets content from a given

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.