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 5994617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:50:36+00:00 2026-05-22T23:50:36+00:00

<xml> <TimeCal Cal =1> <DateUse DateUse=2010-08-30/> <DateUse DateUse=2010-08-31/> <DateUse DateUse=2010-09-01/> <DayCode DayCode=Mon/> <DayCode DayCode=Tue/>

  • 0
<xml>
<TimeCal Cal ="1">
<DateUse DateUse="2010-08-30"/>
<DateUse DateUse="2010-08-31"/>
<DateUse DateUse="2010-09-01"/>
 <DayCode DayCode="Mon"/>
<DayCode DayCode="Tue"/>
<DayCode DayCode="Wed"/>
    </TimeCal> 
<TimeCal Cal="2">
<DateUse  DateUse ="2010-09-01"/>
<DateUse  DateUse ="2010-09-02"/>
<DateUse  DateUse ="2010-09-06"/>
<DateUse  DateUse ="2010-09-07"/>
<Day Day="Mon"/>
<Day Day="Tue"/>
<Day Day="Wed"/>
<Day Day="Thu"/>
</TimeCal>
<TimeCal Cal="3">
<DateUse  DateUse ="2010-09-03"/>
<DateUse  DateUse ="2010-09-10"/>
<DateUse  DateUse ="2010-09-01"/>
<Day Day="Fri"/>
</TimeCal>
<TimeCal Cal="4">
<DateUse  DateUse ="2010-08-29"/>
<DateUse  DateUse ="2010-09-05"/>
<DateUse  DateUse ="2010-09-01"/>
<Day Day="Sun"/>
</TimeCal>
<TimeCal Cal="5">
<DateUse  DateUse ="2010-09-04"/>
<DateUse  DateUse ="2010-09-11"/>
<DateUse  DateUse ="2010-09-02"/>
<Day Day="Sat"/>
</TimeCal>
</xml>

OUTPUT I want

DateUse          Cals
---------------- ----------------
2010-08-30       1
2010-08-31       1
2010-09-01       1, 2, 3, 4
2010-09-02       2, 5
2010-09-03       3
2010-09-04       5

and so on

Assume that output (xml) as step1 now step2 output as follows from the step1 results

Unique Cal Associated Day

1 Mon, Tue, Wed
3 Fri
5 Sat
2, 5 Mon, Tue, Wed, Thu, SAT
1, 2, 3, 4 Mon, Tue, Wed, Mon, Tue, Wed, Thu, Fri, Sun

  • 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-22T23:50:36+00:00Added an answer on May 22, 2026 at 11:50 pm

    Here is an XSLT 1.0 solution with formatting

    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
    >
      <xsl:output method="text" indent="no" omit-xml-declaration="yes" />
      <xsl:strip-space elements="*"/>
    
        <xsl:template match="/xml/TimeCal/DateUse">
          <xsl:variable name="dateUse" select="@DateUse"/>
          <xsl:choose>
            <xsl:when test="not(preceding::DateUse[@DateUse=$dateUse])">
              <xsl:text>&#xD;&#xA;</xsl:text><xsl:value-of select="$dateUse"/>
              <xsl:text>&#x9;</xsl:text>
              <xsl:apply-templates select="//TimeCal[DateUse/@DateUse=$dateUse]" mode="distinct"/>
            </xsl:when>
          </xsl:choose>
        </xsl:template>
    
      <xsl:template match="TimeCal" mode="distinct">
        <xsl:value-of select="@Cal"/>
        <xsl:text>,</xsl:text>
      </xsl:template>
    
    
    </xsl:stylesheet>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

XML seems to be the language of the day, but it's not type safe
XML Schema specifies occurrence indicators (maxOccurrence, minOccurrence). Is there a best practice in which
XML: <A><B></B></A> or <A></A> I want to get all A nodes that do not
xml.etree.ElementTree.parse is choking on my xhtml file. I saw somewhere that lxml can handle
XML sample ( original link ): <records> <record index=1> <property name=Username>Sven</property> <property name=Domain>infinity2</property> <property
XML is cool in flex, but I have an annoying problem to solve, caused
The XML Schema Part 2 specifies that an instance of a datatype that is
This XML file contained archived news stories for all of last year. I was
The XML I'm trying to validate is as follows: <root> <element attribute=foo> <bar/> </element>
Which XML validation tools can you recommend for both performance and accuracy, each of

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.