Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Grouping within a group?

From: Chris Gannon <chris@-----------.--->
To: NULL
Date: 7/2/2009 11:08:00 AM
> > If you need more help then please show us a code sample of the XML inpu=
t
> > =A0 so that we have some data to write an XSLT stylesheet against.

Hey Martin,
This is my guess at the XML file structure. I'm only including 2
different structures and only a few rows...
<!-- Structure 1 -->
<dsQueryResponse>
	<Rows>
		<Row>
			<Meeting_x0020_Date>2009-08-27T05:00:00Z</Meeting_x0020_Date>
			<bsc_SiteProperties>New Hire Orientation</bsc_SiteProperties>
			<_x0023_>1</_x0023_>
			<Task>Reserve room</Task>
		<Row>
		<Row>
			<Meeting_x0020_Date>2009-08-27T05:00:00Z</Meeting_x0020_Date>
			<bsc_SiteProperties>New Hire Orientation</bsc_SiteProperties>
			<_x0023_>2</_x0023_>
			<Task>Place order with Catering</Task>
		<Row>
		<Row>
			<Meeting_x0020_Date>2009-08-27T05:00:00Z</Meeting_x0020_Date>
			<bsc_SiteProperties>New Hire Orientation</bsc_SiteProperties>
			<_x0023_>3</_x0023_>
			<Task>Request A/V equipment</Task>
		<Row>
		<Row>
			<Meeting_x0020_Date>2009-08-27T05:00:00Z</Meeting_x0020_Date>
			<bsc_SiteProperties>Welcome Back Session</bsc_SiteProperties>
			<_x0023_>1</_x0023_>
			<Task>Prepare invitation list</Task>
		<Row>
		<Row>
			<Meeting_x0020_Date>2009-08-27T05:00:00Z</Meeting_x0020_Date>
			<bsc_SiteProperties>Welcome Back Session</bsc_SiteProperties>
			<_x0023_>2</_x0023_>
			<Task>Contact invitees</Task>
		<Row>
		<Row>
			<Meeting_x0020_Date>2009-08-27T05:00:00Z</Meeting_x0020_Date>
			<bsc_SiteProperties>Welcome Back Session</bsc_SiteProperties>
			<_x0023_>3</_x0023_>
			<Task>Invite guest speaker</Task>
		<Row>
		<Row>
			<Meeting_x0020_Date>2009-09-04T05:00:00Z</Meeting_x0020_Date>
			<bsc_SiteProperties>General Assembly</bsc_SiteProperties>
			<_x0023_>1</_x0023_>
			<Task>Reserve Auditorium</Task>
		<Row>
		<Row>
			<Meeting_x0020_Date>2009-09-04T05:00:00Z</Meeting_x0020_Date>
			<bsc_SiteProperties>General Assembly</bsc_SiteProperties>
			<_x0023_>2</_x0023_>
			<Task>Compile Multi-Media files</Task>
		<Row>
		<Row>
			<Meeting_x0020_Date>2009-09-04T05:00:00Z</Meeting_x0020_Date>
			<bsc_SiteProperties>General Assembly</bsc_SiteProperties>
			<_x0023_>3</_x0023_>
			<Task>Notify attendees</Task>
		<Row>
	</Rows>
</dsQueryResponse>


<!-- Structure 2 -->
<dsQueryResponse>
<Rows>
<Row Meeting_x0020_Date=3D"2009-08-27T05:00:00Z" bsc_SiteProperties=3D"New
Hire Orientation" _x0023_=3D"1" Task=3D"Reserve room"/>
<Row Meeting_x0020_Date=3D"2009-08-27T05:00:00Z" bsc_SiteProperties=3D"New
Hire Orientation" _x0023_=3D"2" Task=3D"Place order with Catering"/>
<Row Meeting_x0020_Date=3D"2009-08-27T05:00:00Z" bsc_SiteProperties=3D"New
Hire Orientation" _x0023_=3D"3" Task=3D"Request A/V equipment"/>
<Row Meeting_x0020_Date=3D"2009-08-27T05:00:00Z"
bsc_SiteProperties=3D"Welcome Back Session" _x0023_=3D"1" Task=3D"Prepare
invitation list"/>
<Row Meeting_x0020_Date=3D"2009-08-27T05:00:00Z"
bsc_SiteProperties=3D"Welcome Back Session" _x0023_=3D"2" Task=3D"Contact
invitees"/>
<Row Meeting_x0020_Date=3D"2009-08-27T05:00:00Z"
bsc_SiteProperties=3D"Welcome Back Session" _x0023_=3D"3" Task=3D"Invite
guest speaker"/>
<Row Meeting_x0020_Date=3D"2009-09-04T05:00:00Z"
bsc_SiteProperties=3D"General Assembly" _x0023_=3D"1" Task=3D"Reserve
Auditorium"/>
<Row Meeting_x0020_Date=3D"2009-09-04T05:00:00Z"
bsc_SiteProperties=3D"General Assembly" _x0023_=3D"2" Task=3D"Compile Multi=
-
Media files"/>
<Row Meeting_x0020_Date=3D"2009-09-04T05:00:00Z"
bsc_SiteProperties=3D"General Assembly" _x0023_=3D"3" Task=3D"Notify
attendees"/>
</Rows>
</dsQueryResponse>


<!-- The current XSL stylesheet:  -->
<xsl:template match=3D"/" xmlns:asp=3D"http://schemas.microsoft.com/ASPNET/
20" xmlns:__designer=3D"http://schemas.microsoft.com/WebParts/v2/
DataView/designer"
xmlns:SharePoint=3D"Microsoft.SharePoint.WebControls">
<xsl:call-template name=3D"dvt_1" />
</xsl:template>

<xsl:template name=3D"dvt_1">
<xsl:variable name=3D"Rows" select=3D"/dsQueryResponse/Rows/Row" />
<table>
<tr>
<th>Meeting Date</th>
<th>Meeting Site</th>
<th>#</th>
<th>Task</th>
</tr>
<xsl:call-template name=3D"dvt_1.body">
<xsl:with-param name=3D"Rows" select=3D"$Rows" />
<xsl:with-param name=3D"FirstRow" select=3D"$FirstRow" />
<xsl:with-param name=3D"LastRow" select=3D"$LastRow" />
</xsl:call-template>
</xsl:template>

<xsl:template name=3D"dvt_1.body">
<xsl:param name=3D"Rows" />
<xsl:param name=3D"FirstRow" />
<xsl:param name=3D"LastRow" />
<xsl:for-each select=3D"$Rows">
<tr>
<td>
<xsl:value-of select=3D"ddwrt:FormatDate(string(@Meeting_x0020_Date),
number($Language), 1)" />
</td>
<td>
<xsl:value-of select=3D"@bsc_SiteProperties" />
</td>
<td>
<xsl:if test=3D"@_x0023_ !=3D ''">
<xsl:value-of select=3D"format-number(@_x0023_,'#,##0')" />
</xsl:if>
</td>
<td>
<xsl:value-of select=3D"@Task" />
</td>
</tr>
</xsl:for-each>
</xsl:template>



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent