RE: [xsl] group data in XSL

Subject: RE: [xsl] group data in XSL
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Thu, 19 Aug 2004 10:07:05 +0100
I don't think you understood the reply to you original message.

<xsl:for-each-group> is an XSLT 2.0 construct. To use it, you need an XSLT
2.0 processor. The only XSLT 2.0 processor available at present is Saxon
(currently version 8.0). Any XSLT 1.0 processor will report an error if it
sees this construct.

Michael Kay
 

> -----Original Message-----
> From: Tham Tinh [mailto:khautinh@xxxxxxxxx] 
> Sent: 19 August 2004 00:05
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE: [xsl] group data in XSL
> 
> Please Help.
> 
> Error still when I put my xml.xml and xsl.xslt
> together in ASP.NET and use with xml control.
> 
> I saved the following code as xsl.xslt
> 
> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
> 	<xsl:template match="/">
> 		<xsl:for-each-group select="/dsWMSRpt/WMSReport"
> group-by="ReportUnitTitle">
> 				Administration Code: <xsl:value-of
> select="AdministrationCode"/>
> 				Report Title:        <xsl:value-of
> select="ReportUnitTitle"/>
> 				<!--xsl:for-each
> select="current-group()/PositionNumber"-->
> 					Position Number: <xsl:value-of
> select="PositionNumber"/>
> 				<!--/xsl:for-each-->
> 		</xsl:for-each-group>
> 	</xsl:template>
> </xsl:stylesheet>
> 
> 
> And the following as xml.xml
> 
> 
>  <?xml version="1.0" standalone="yes"?>
> 
>  <dsWMSRpt>
>  	<WMSReport>
>  		<AdministrationCode>ABC</AdministrationCode>
>  		<ReportUnitTitle>Financial Div</ReportUnitTitle>
>  		<PositionNumber> 0934</PositionNumber>
>  	</WMSReport>
>  	<WMSReport>
>  		<AdministrationCode>ABC</AdministrationCode>
>  		<ReportUnitTitle>Part Div</ReportUnitTitle>
>  		<PositionNumber> 4563</PositionNumber>
>  	</WMSReport>
>  	<WMSReport>
>  		<AdministrationCode>ABC</AdministrationCode>
>  		<ReportUnitTitle>Financial Div</ReportUnitTitle>
>  		<PositionNumber> K948</PositionNumber>
>  	</WMSReport>
>  	<WMSReport>
>  		<AdministrationCode>ABC</AdministrationCode>
>  		<ReportUnitTitle>Human Resource
> Div</ReportUnitTitle>
>  		<PositionNumber> 6453</PositionNumber>
>  	</WMSReport>
>  	<WMSReport>
>  		<AdministrationCode>ABC</AdministrationCode>
>  		<ReportUnitTitle>HumanResource
> Div</ReportUnitTitle>
>  		<PositionNumber> 9655</PositionNumber>
>  	</WMSReport>
>  	<WMSReport>
>  		<AdministrationCode>ABC</AdministrationCode>
>  		<ReportUnitTitle>Sale Div</ReportUnitTitle>
>  		<PositionNumber> SDWE</PositionNumber>
>  	</WMSReport>
>  	<WMSReport>
>  		<AdministrationCode>ABC</AdministrationCode>
>  		<ReportUnitTitle>Sale Div</ReportUnitTitle>
>  		<PositionNumber> 4577</PositionNumber>
>  	</WMSReport>
>  </dsWMSRpt>
> 
> Error:
> 
> Server Error in '/TransformationTest' Application.
> The XML declaration is unexpected. Line 1, position 4.
> 
> Description: An unhandled exception occurred during
> the execution of the current web request. Please
> review the stack trace for more information about the
> error and where it originated in the code. 
> 
> Exception Details: System.Xml.XmlException: The XML
> declaration is unexpected. Line 1, position 4.
> 
> 
> =====
> "It is essential to know that to be a happy person, a happy 
> family, a happy society, it is very crucial to have a good 
> heart, that is very crucial,"
> Dalai Lama
> 
> 
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail Address AutoComplete - You start. We finish.
> http://promotions.yahoo.com/new_mail 

Current Thread