Grouping by a piece of a date

Subject: Grouping by a piece of a date
From: Jeff Saylor <JSaylor@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 6 Sep 2000 10:15:45 -0400
To all,

I have been lurking for some time and am less than green, but I can't figure
out how to do this and am hoping somebody can give me some instruction:
given xml with date attributes, I want to be able to group them by day.
Using the Muenchian method I can group by the entire value, but I can't
figure out how to group by only a piece of it.  For example, given the
following XML:

<xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
	<s:Schema id="RowsetSchema">
		<s:ElementType name="row" content="eltOnly">
			<s:AttributeType name="iID" rs:number="1">
				<s:datatype dt:type="int" dt:maxLength="4"
rs:precision="10" rs:fixedlength="true" rs:maybenull="false"/>
			</s:AttributeType>
			<s:AttributeType name="dCreated" rs:number="7"
rs:nullable="true" rs:writeunknown="true">
				<s:datatype dt:type="dateTime"
rs:dbtype="timestamp" dt:maxLength="16" rs:scale="3" rs:precision="23"
rs:fixedlength="true"/>
			</s:AttributeType>
			<s:extends type="rs:rowbase"/>
		</s:ElementType>
	</s:Schema>	
	<rs:data>
		<z:row iID="1" dCreated="1900-01-01T01:00:00"/>
		<z:row iID="2" dCreated="1900-01-02T01:00:00"/>
		<z:row iID="3" dCreated="1900-01-02T02:00:00"/>
		<z:row iID="4" dCreated="1900-01-04T01:00:00"/>
	</rs:data>
</xml>

Using XSLT, how is it possible to get:

	1900-01-01	- Item1
	1900-01-02	- Item2 Item3
	1900-01-04	- Item4

Much appreciation in advance for any and all insights and effort - I've been
wracking myself for quite some time on this.

(Note that I am using the MSXML July Preview release and the XML was
generated using MS ADO 2.5)


Cheers, 
  
  
Jeffrey J. Saylor 
Senior Internet Developer 
Diamond Technology, Inc. 
707 Mendham Blvd., Suite 104 
Orlando, FL 32825 
Phone: (407) 262-9000 Ext 266 
Fax: (407) 262-9010 
Email: jsaylor@xxxxxxxxxxxxxxxxxxxxx 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread