Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Need to combine duplicate tags in the file

From: "Vandna Sharma" <sharmav@---------.--->
To: <xmlschema-dev@--.--->
Date: 4/4/2007 9:43:00 AM
I am trying to combine the meter number when there is any duplicate =
meter number in the file.  Can some please help.

<xsl:variable name="MeterNumber">
							<xsl:value-of =
select="count(Record[@Name='6000']/Meter_Number)"/>
								 </xsl:variable>
						=09
				<xsl:choose>
					<xsl:when test="Record[@Name='6000']">=09
						<ServiceInformation>
						=09
							<xsl:when test="$MeterNumber= 1">
							<xsl:for-each select="Record[@Name='6000']/Meter_Number">
								<Service>
									<MeterInformation>
								=09
										=09



XML FILE

<Record Name="1000" RecNum="1">
			<Rec_Indicator>1000</Rec_Indicator>
			<Doc_Id>1009271927</Doc_Id>
			<Record Name="2000" RecNum="2">
				<Rec_Indicator>2000</Rec_Indicator>
				<Sender_Trans_Id>C63433</Sender_Trans_Id>
				<Record Name="3000" RecNum="3">
					<Rec_Indicator>3000</Rec_Indicator>
					<Sender_Trans_Id>C63433</Sender_Trans_Id>
					<Id_Code>8S</Id_Code>
					<DUNS_Number>100</DUNS_Number>
					<Name>DELIVERY</Name>
				</Record>
				<Record Name="3000" RecNum="4">
					<Rec_Indicator>3000</Rec_Indicator>
					<Sender_Trans_Id>C63433</Sender_Trans_Id>
					</Record>
				<Record Name="3000" RecNum="5">
					<Rec_Indicator>3000</Rec_Indicator>
					<Sender_Trans_Id>C63433</Sender_Trans_Id>
					<Id_Code>SJ</Id_Code>
					<DUNS_Number>343341</DUNS_Number>
					<Name>ENERGY</Name>
				</Record>
				<Record Name="4000" RecNum="6">
					<Rec_Indicator>4000</Rec_Indicator>
					<Postal_Code>7214618</Postal_Code>
				</Record>
				<Record Name="5000" RecNum="7">
					<Rec_Indicator>5000</Rec_Indicator>
					<Premise_Type_Code>01</Premise_Type_Code>
				</Record>
				<Record Name="6000" RecNum="8">
					<Rec_Indicator>6000</Rec_Indicator>
					<Meter_Number>057676727GE</Meter_Number>
					</Record>
				<Record Name="6000" RecNum="8">
					<Rec_Indicator>6000</Rec_Indicator>
					<Meter_Number>057676727GE</Meter_Number>
					</Record>
				<Record Name="6000" RecNum="8">
					<Rec_Indicator>6000</Rec_Indicator>
					<Meter_Number>123590890HE</Meter_Number>
					</Record>
			</Record>
			<Record Name="9900" RecNum="9">
				<Rec_Indicator>9900</Rec_Indicator>
				<Doc_Id>1009271927</Doc_Id>
				<Records_Generated>5862</Records_Generated>
			</Record>
		</Record>



Thanks
Vandna



From EKimber@i... Thu Apr 05 00:38:34 2007
Received: from aji.w3.org ([133.27.228.225])
	by frink.w3.org w


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