Sign Up
Search
Options
search
Chat
Help
News
Log in
Not Logged in
Home
»
Boards
»
Stylus Studio Developer Network
»
XSLT Help and Discussion
»
Need to combine duplicate Number's in the file
Topic
Topic Page
1
2
3
4
5
6
7
8
9
Prev Topic
Next Topic
next
Subject:
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>
next
Subject:
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?
top
Subject:
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
Prev Topic
Next Topic
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 to Conference:
Select Conference
Stylus Studio Feature Requests
Stylus Studio Technical Forum
Website Feedback
XSLT Help and Discussion
XQuery Help and Discussion
Stylus Studio FAQs
Stylus Studio Code Samples & Utilities
Stylus Studio Announcements
go
Log In Options
Username:
Password:
Site Map
|
Privacy Policy
|
Terms of Use
|
Trademarks
Stylus Scoop XML Newsletter:
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.