XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
vandna sharmaSubject: Need to combine duplicate Number's in the file
Author: vandna sharma
Date: 04 Apr 2007 03:11 PM
Originally Posted: 04 Apr 2007 03:09 PM
I am trying to combine the "number" when there is any duplicate "number" in the file. Can some one please help.

This is the code I am using but it is not working

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





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>
<Number>057676727GE</Number>
</Record>
<Record Name="6000" RecNum="8">
<Rec_Indicator>6000</Rec_Indicator>
<Number>057676727GE</Number>
</Record>
<Record Name="6000" RecNum="8">
<Rec_Indicator>6000</Rec_Indicator>
<Number>123590890HE</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>

Postnext
Tony LavinioSubject: Need to combine duplicate Number's in the file
Author: Tony Lavinio
Date: 04 Apr 2007 08:18 PM
Can we see the rest of your XSLT?
Also, which version of Stylus Studio are you using?

Posttop
James DurningSubject: Need to combine duplicate Number's in the file
Author: James Durning
Date: 10 Apr 2007 02:03 PM
Sounds like Muenchian grouping:

http://www.jenitennison.com/xslt/grouping/muenchian.html

Would need to see the rest of your xslt.

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.