Link to home
Start Free TrialLog in
Avatar of kommichowdary
kommichowdary

asked on

Eliminating duplicates in XML using XSlT..

Hi Guys

I was hoping you could help me how to eliminate duplicates in XML using XSLT1.0
Below is my XML file
<softwareOffering>
<licensedFunction>
<licenseID>S0111R1</licenseID>
<description>Directory MaintenanceFac</description> <licenseOption>
<valueMetric>77D000</valueMetric>
<valueMetricDescription>Per Engine Registration</valueMetricDescription>
<chargeOption>NOCHARGE </chargeOption>
<chargeOptionDescription>No Charge</chargeOptionDescription>Charge</chargeOptionDescription>
<licenseType>SWSUBSUPRGST</licenseType>
<licenseTypeDescription>SW Subs and Sup t</licenseTypeDescription>
</licenseOption>
<licenseOption>
<valueMetric>4D9000</valueMetric>
<valueMetricDescription>Value Units</valueMetricDescription>
<chargeOption>CHINA4YEAR  </chargeOption>
<chargeOptionDescription>4 Year Support, China only</chargeOptionDescription>
<licenseType>SWSUBSCSUPPO</licenseType>
<licenseTypeDescription>SW Subscription and Support</licenseTypeDescription>
</licenseOption>
<licenseOption>
<valueMetric>4D9000</valueMetric>
<valueMetricDescription>Value Units</valueMetricDescription>
<chargeOption>ASC         </chargeOption>
<chargeOptionDescription>Annual Support Charge</chargeOptionDescription>
<licenseType>SWSUBSCSUPPO</licenseType>
<licenseTypeDescription>SW Subscription and Support</licenseTypeDescription>
</licenseOption>
<licenseOption>
<valueMetric>4D9000</valueMetric>
<valueMetricDescription>Value Units</valueMetricDescription>
<chargeOption>MSC         </chargeOption>
<chargeOptionDescription>Monthly Support Charge</chargeOptionDescription>
<licenseType>SWSUBSCSUPPO</licenseType>
<licenseTypeDescription>SW Subscription and Support</licenseTypeDescription>
</licenseOption>
</licensedFunction>
<licensedFunction>
<licenseID>S0111PZ</licenseID>
<description>Performance Toolkit for VM</description>
<licenseOption>
<valueMetric>77D000</valueMetric>
<valueMetricDescription>Per Engine Registration</valueMetricDescription>
<chargeOption>NOCHARGE    </chargeOption>
<chargeOptionDescription>No Charge</chargeOptionDescription>
<licenseType>SWSUBSUPRGST</licenseType>
<licenseTypeDescription>SW Subs and Sup Rgst</licenseTypeDescription>
</licenseOption>
<licenseOption>
<valueMetric>4D9000</valueMetric>
<valueMetricDescription>Value Units</valueMetricDescription>
<chargeOption>CHINA4YEAR  </chargeOption>
<chargeOptionDescription>4 Year Support, China only</chargeOptionDescription>
<licenseType>SWSUBSCSUPPO</licenseType>
<licenseTypeDescription>SW Subscription and Support</licenseTypeDescription>
</licenseOption>
<licenseOption>
<valueMetric>4D9000</valueMetric>
<valueMetricDescription>Value Units</valueMetricDescription>
<chargeOption>ASC     </chargeOption>
<chargeOptionDescription>Annual Support Charge</chargeOptionDescription>
<licenseType>SWSUBSCSUPPO</licenseType>
<licenseTypeDescription>SW Subscription and Support</licenseTypeDescription>
</licenseOption>
</licensefunction>


Here i want to print LIcenseID,ValueMetric,ValueMetric Description..
ease consider as high priorty

Here is my xsl which is not eliminating duplicates in xslt
<xsl:key name="valueMetric" match="..//licenseOption" use="valueMetric" />
  <!--  Output method  -->
  <xsl:output method="html" omit-xml-declaration="yes" indent="yes" />
<xsl:for-each select="../licensedFunction/licenseID>
  <xsl:for-each select="licenseOption[count(. | key('valueMetric', valueMetric)[1]) = 1]">
    <tr>
  <xsl:if test="(position() mod 2 = 0)">
  <xsl:attribute name="class">gray</xsl:attribute>
  </xsl:if>
  <td>
  <xsl:variable name="valuemetricid" select="valueMetric" />
  <xsl:variable name="licenceid" select="../licenseID" />
  <small>
  <a href="{contextRoot}{servletPath}iSoftwareorderinfoseb2_result.jsp?type=Licence&licenceid={$licenceid}&valuemetricid={$valuemetricid}">
  <xsl:value-of select="../../productId/typeCode" />
  <xsl:value-of select="../../productId/modelCode" />
  </a>
  </small>
  </td>
 <td nowrap="1">
 <small>
  <xsl:value-of select="../licenseID" />
   <xsl:value-of select="valueMetric" />
  </small>
  </td>
   <td nowrap="1">
  <small>
  <xsl:value-of select="valueMetricDescription" />
  </small>
  </td>
  <td nowrap="1">
  <small>CHARGE</small>
  <script type="text/javascript">v++;</script>
  </td>
  </tr>
  </xsl:for-each>
</xsl:stylesheet>
Thanks

SOLUTION
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The technique I use for unique fields is known as muenchian grouping
http://www.jenitennison.com/xslt/grouping/muenchian.html
Avatar of kommichowdary
kommichowdary

ASKER

Can u make it elaborate ...
<softwareOffering><licensedFunction><licenseID>S0111R1</licenseID><description>Directory Maintenance Fac</description><licenseOption><valueMetric>77D000</valueMetric><valueMetricDescription>Per Engine Registration</valueMetricDescription><chargeOption>NOCHARGE    </chargeOption><chargeOptionDescription>No Charge</chargeOptionDescription><licenseType>SWSUBSUPRGST</licenseType><licenseTypeDescription>SW Subs and Sup Rgst</licenseTypeDescription></licenseOption><licenseOption><valueMetric>4D9000</valueMetric><valueMetricDescription>Value Units</valueMetricDescription><chargeOption>CHINA4YEAR  </chargeOption><chargeOptionDescription>4 Year Support, China only</chargeOptionDescription><licenseType>SWSUBSCSUPPO</licenseType><licenseTypeDescription>SW Subscription and Support</licenseTypeDescription></licenseOption><licenseOption><valueMetric>4D9000</valueMetric><valueMetricDescription>Value Units</valueMetricDescription><chargeOption>ASC         </chargeOption><chargeOptionDescription>Annual Support Charge</chargeOptionDescription><licenseType>SWSUBSCSUPPO</licenseType><licenseTypeDescription>SW Subscription and Support</licenseTypeDescription></licenseOption><licenseOption><valueMetric>4D9000</valueMetric><valueMetricDescription>Value Units</valueMetricDescription><chargeOption>MSC         </chargeOption><chargeOptionDescription>Monthly Support Charge</chargeOptionDescription><licenseType>SWSUBSCSUPPO</licenseType><licenseTypeDescription>SW Subscription and Support</licenseTypeDescription></licenseOption><licenseOption><valueMetric>4D9000</valueMetric><valueMetricDescription>Value Units</valueMetricDescription><chargeOption>NOCHARGE    </chargeOption><chargeOptionDescription>No Charge</chargeOptionDescription><licenseType>DECLINESANDS</licenseType><licenseTypeDescription>Decline Subscribe and Suppt.</licenseTypeDescription></licenseOption><licenseOption><valueMetric>4D9000</valueMetric><valueMetricDescription>Value Units</valueMetricDescription><chargeOption>ONEYRRESEL  </chargeOption><chargeOptionDescription>Reseller One Year</chargeOptionDescription><licenseType>SWSUBSCSUPPO</licenseType><licenseTypeDescription>SW Subscription and Support</licenseTypeDescription></licenseOption></licensedFunction><licensedFunction><licenseID>S0111PZ</licenseID><description>Performance Toolkit for VM</description><licenseOption><valueMetric>77D000</valueMetric><valueMetricDescription>Per Engine Registration</valueMetricDescription><chargeOption>NOCHARGE    </chargeOption><chargeOptionDescription>No Charge</chargeOptionDescription><licenseType>SWSUBSUPRGST</licenseType><licenseTypeDescription>SW Subs and Sup Rgst</licenseTypeDescription></licenseOption><licenseOption><valueMetric>4D9000</valueMetric><valueMetricDescription>Value Units</valueMetricDescription><chargeOption>CHINA4YEAR  </chargeOption><chargeOptionDescription>4 Year Support, China only</chargeOptionDescription><licenseType>SWSUBSCSUPPO</licenseType><licenseTypeDescription>SW Subscription and Support</licenseTypeDescription></licenseOption><licenseOption><valueMetric>4D9000</valueMetric><valueMetricDescription>Value Units</valueMetricDescription><chargeOption>ASC         </chargeOption><chargeOptionDescription>Annual Support Charge</chargeOptionDescription><licenseType>SWSUBSCSUPPO</licenseType><licenseTypeDescription>SW Subscription and Support</licenseTypeDescription></licenseOption><licenseOption><valueMetric>4D9000</valueMetric><valueMetricDescription>Value Units</valueMetricDescription><chargeOption>MSC         </chargeOption><chargeOptionDescription>Monthly Support Charge</chargeOptionDescription><licenseType>SWSUBSCSUPPO</licenseType><licenseTypeDescription>SW Subscription and Support</licenseTypeDescription></licenseOption><licenseOption><valueMetric>4D9000</valueMetric><valueMetricDescription>Value Units</valueMetricDescription><chargeOption>NOCHARGE    </chargeOption><chargeOptionDescription>No Charge</chargeOptionDescription><licenseType>DECLINESANDS</licenseType><licenseTypeDescription>Decline Subscribe and Suppt.</licenseTypeDescription></licenseOption><licenseOption><valueMetric>4D9000</valueMetric><valueMetricDescription>Value Units</valueMetricDescription><chargeOption>ONEYRRESEL  </chargeOption><chargeOptionDescription>Reseller One Year</chargeOptionDescription><licenseType>SWSUBSCSUPPO</licenseType><licenseTypeDescription>SW Subscription and Support</licenseTypeDescription></licenseOption></licensedFunction><licensedFunction><licenseID>S0111R0</licenseID><description>Resource Access Control Fac</description><licenseOption><valueMetric>77D000</valueMetric><valueMetricDescription>Per Engine Registration</valueMetricDescription><chargeOption>NOCHARGE    </chargeOption><chargeOptionDescription>No Charge</chargeOptionDescription><licenseType>SWSUBSUPRGST</licenseType><licenseTypeDescription>SW Subs and Sup Rgst</licenseTypeDescription></licenseOption><licenseOption><valueMetric>4D9000</valueMetric><valueMetricDescription>Value Units</valueMetricDescription><chargeOption>CHINA4YEAR  </chargeOption><chargeOptionDescription>4 Year Support, China only</chargeOptionDescription><licenseType>SWSUBSCSUPPO</licenseType><licenseTypeDescription>SW Subscription and Support</licenseTypeDescription></licenseOption><licenseOption><valueMetric>4D9000</valueMetric><valueMetricDescription>Value Units</valueMetricDescription><chargeOption>ASC         </chargeOption><chargeOptionDescription>Annual Support Charge</chargeOptionDescription><licenseType>SWSUBSCSUPPO</licenseType><licenseTypeDescription>SW Subscription and Support</licenseTypeDescription></licenseOption><licenseOption><valueMetric>4D9000</valueMetric><valueMetricDescription>Value Units</valueMetricDescription><chargeOption>MSC         </chargeOption><chargeOptionDescription>Monthly Support Charge</chargeOptionDescription><licenseType>SWSUBSCSUPPO</licenseType><licenseTypeDescription>SW Subscription and Support</licenseTypeDescription></licenseOption><licenseOption><valueMetric>4D9000</valueMetric><valueMetricDescription>Value Units</valueMetricDescription><chargeOption>NOCHARGE    </chargeOption><chargeOptionDescription>No Charge</chargeOptionDescription><licenseType>DECLINESANDS</licenseType><licenseTypeDescription>Decline Subscribe and Suppt.</licenseTypeDescription></licenseOption><licenseOption><valueMetric>4D9000</valueMetric><valueMetricDescription>Value Units</valueMetricDescription><chargeOption>ONEYRRESEL  </chargeOption><chargeOptionDescription>Reseller One Year</chargeOptionDescription><licenseType>SWSUBSCSUPPO</licenseType><licenseTypeDescription>SW Subscription and Support</licenseTypeDescription></licenseOption></licensedFunction><licensedFunction><licenseID>S013T6B</licenseID><description>RSCS Feature S&amp;S</description><licenseOption><valueMetric>77D000</valueMetric><valueMetricDescription>Per Engine Registration</valueMetricDescription><chargeOption>NOCHARGE    </chargeOption><chargeOptionDescription>No Charge</chargeOptionDescription><licenseType>SWSUBSUPRGST</licenseType><licenseTypeDescription>SW Subs and Sup Rgst</licenseTypeDescription></licenseOption><licenseOption><valueMetric>4D9000</valueMetric><valueMetricDescription>Value Units</valueMetricDescription><chargeOption>ASC         </chargeOption><chargeOptionDescription>Annual Support Charge</chargeOptionDescription><licenseType>SWSUBSCSUPPO</licenseType><licenseTypeDescription>SW Subscription and Support</licenseTypeDescription></licenseOption><licenseOption><valueMetric>4D9000</valueMetric><valueMetricDescription>Value Units</valueMetricDescription><chargeOption>MSC         </chargeOption><chargeOptionDescription>Monthly Support Charge</chargeOptionDescription><licenseType>SWSUBSCSUPPO</licenseType><licenseTypeDescription>SW Subscription and Support</licenseTypeDescription></licenseOption><licenseOption><valueMetric>4D9000</valueMetric><valueMetricDescription>Value Units</valueMetricDescription><chargeOption>NOCHARGE    </chargeOption><chargeOptionDescription>No Charge</chargeOptionDescription><licenseType>DECLINESANDS</licenseType><licenseTypeDescription>Decline Subscribe and Suppt.</licenseTypeDescription></licenseOption><licenseOption><valueMetric>4D9000</valueMetric><valueMetricDescription>Value Units</valueMetricDescription><chargeOption>ONEYRRESEL  </chargeOption><chargeOptionDescription>Reseller One Year</chargeOptionDescription><licenseType>SWSUBSCSUPPO</licenseType><licenseTypeDescription>SW Subscription and Support</licenseTypeDescription></licenseOption></licensedFunction><licensedFunction><licenseID>S0111PX</licenseID><description>z/VM Version 5</description><licenseOption><valueMetric>77D000</valueMetric><valueMetricDescription>Per Engine Registration</valueMetricDescription><chargeOption>NOCHARGE    </chargeOption><chargeOptionDescription>No Charge</chargeOptionDescription><licenseType>SWSUBSUPRGST</licenseType><licenseTypeDescription>SW Subs and Sup Rgst</licenseTypeDescription></licenseOption><licenseOption><valueMetric>4D9000</valueMetric><valueMetricDescription>Value Units</valueMetricDescription><chargeOption>CHINA4YEAR  </chargeOption><chargeOptionDescription>4 Year Support, China only</chargeOptionDescription><licenseType>SWSUBSCSUPPO</licenseType><licenseTypeDescription>SW Subscription and Support</licenseTypeDescription></licenseOption><licenseOption><valueMetric>4D9000</valueMetric><valueMetricDescription>Value Units</valueMetricDescription><chargeOption>ASC         </chargeOption><chargeOptionDescription>Annual Support Charge</chargeOptionDescription><licenseType>SWSUBSCSUPPO</licenseType><licenseTypeDescription>SW Subscription and Support</licenseTypeDescription></licenseOption><licenseOption><valueMetric>4D9000</valueMetric><valueMetricDescription>Value Units</valueMetricDescription><chargeOption>MSC         </chargeOption><chargeOptionDescription>Monthly Support Charge</chargeOptionDescription><licenseType>SWSUBSCSUPPO</licenseType><licenseTypeDescription>SW Subscription and Support</licenseTypeDescription></licenseOption><licenseOption><valueMetric>4D9000</valueMetric><valueMetricDescription>Value Units</valueMetricDescription><chargeOption>NOCHARGE    </chargeOption><chargeOptionDescription>No Charge</chargeOptionDescription><licenseType>DECLINESANDS</licenseType><licenseTypeDescription>Decline Subscribe and Suppt.</licenseTypeDescription></licenseOption><licenseOption><valueMetric>4D9000</valueMetric><valueMetricDescription>Value Units</valueMetricDescription><chargeOption>ONEYRRESEL  </chargeOption><chargeOptionDescription>Reseller One Year</chargeOptionDescription><licenseType>SWSUBSCSUPPO</licenseType><licenseTypeDescription>SW Subscription and Support</licenseTypeDescription></licenseOption></licensedFunction></softwareoffering>

This is the output i am getting ....
 
The SAP ESW based Search results are displayed below  
Program  DescriptionCode  Description  Additional information Doc.  Type

Program DescriptionCode Description Additional information Doc. Type
5741SNS S0111R1 / 77D000 Directory Maintenance Fac Per Engine Registration CHARGE
5741SNS S0111R1 / 4D9000 Directory Maintenance Fac Value Units CHARGE
5741SNS S0111R1 / 4D9000 Directory Maintenance Fac Value Units CHARGE
5741SNS S0111R1 / 4D9000 Directory Maintenance Fac Value Units CHARGE
5741SNS S0111R1 / 4D9000 Directory Maintenance Fac Value Units CHARGE
5741SNS S0111R1 / 4D9000 Directory Maintenance Fac Value Units CHARGE
5741SNS S0111PZ / 77D000 Performance Toolkit for VM Per Engine Registration CHARGE
5741SNS S0111PZ / 4D9000 Performance Toolkit for VM Value Units CHARGE
5741SNS S0111PZ / 4D9000 Performance Toolkit for VM Value Units CHARGE
5741SNS S0111PZ / 4D9000 Performance Toolkit for VM Value Units CHARGE
5741SNS S0111PZ / 4D9000 Performance Toolkit for VM Value Units CHARGE
5741SNS S0111PZ / 4D9000 Performance Toolkit for VM Value Units CHARGE
5741SNS S0111R0 / 77D000 Resource Access Control Fac Per Engine Registration CHARGE
5741SNS S0111R0 / 4D9000 Resource Access Control Fac Value Units CHARGE
5741SNS S0111R0 / 4D9000 Resource Access Control Fac Value Units CHARGE
5741SNS S0111R0 / 4D9000 Resource Access Control Fac Value Units CHARGE
5741SNS S0111R0 / 4D9000 Resource Access Control Fac Value Units CHARGE
5741SNS S0111R0 / 4D9000 Resource Access Control Fac Value Units CHARGE
5741SNS S013T6B / 77D000 RSCS Feature S&S Per Engine Registration CHARGE
5741SNS S013T6B / 4D9000 RSCS Feature S&S Value Units CHARGE
5741SNS S013T6B / 4D9000 RSCS Feature S&S Value Units CHARGE
5741SNS S013T6B / 4D9000 RSCS Feature S&S Value Units CHARGE
5741SNS S013T6B / 4D9000 RSCS Feature S&S Value Units CHARGE
5741SNS S0111PX / 77D000 z/VM Version 5 Per Engine Registration CHARGE
5741SNS S0111PX / 4D9000 z/VM Version 5 Value Units CHARGE
5741SNS S0111PX / 4D9000 z/VM Version 5 Value Units CHARGE
5741SNS S0111PX / 4D9000 z/VM Version 5 Value Units CHARGE
5741SNS S0111PX / 4D9000 z/VM Version 5 Value Units CHARGE
5741SNS S0111PX / 4D9000 z/VM Version 5 Value Units CHARGE

OUTPUT I AM EXPECTING:::
Program Description Code Description Additional Information Doc. Type
5741SNS  S0111R1 / 77D000 Directory Maintenance Fac Per Engine Registration CHARGE
5741SNS  S0111R1 / 4D9000 Directory Maintenance Fac Value Units CHARGE
5741SNS  S0111PZ / 77D000 Performance Toolkit for VM Per Engine Registration CHARGE
5741SNS  S0111PZ / 4D9000 Performance Toolkit for VM Value Units CHARGE
5741SNS  S0111R0 / 77D000 Resource Access Control Fac Per Engine Registration CHARGE
5741SNS  S0111R0 / 4D9000 Resource Access Control Fac Value Units CHARGE
5741SNS  S013T6B / 77D000 RSCS Feature S&S Per Engine Registration CHARGE
5741SNS  S013T6B / 4D9000 RSCS Feature S&S Value Units CHARGE
5741SNS  S0111PX / 77D000 z/VM Version 5 Per Engine Registration CHARGE
5741SNS  S0111PX / 4D9000 z/VM Version 5 Value Units CHARGE


Can you please post the file in the code snippet field, it looses some entities this way
Output I am getting is this

It is exactly what you want.

I seem to notice that you have changed the XSLT.
I think you introduced a bug, it would be nice if you posted the new XSLT... evidently
<?xml version="1.0" encoding="utf-8"?>
<table border="1">
   <tr>
      <th>LicenseID</th>
      <th>ValueMetric</th>
      <th>ValueMetric Description</th>
   </tr>
   <tr>
      <td>S0111R1</td>
      <td>77D000</td>
      <td>Per Engine Registration</td>
   </tr>
   <tr>
      <td>S0111R1</td>
      <td>4D9000</td>
      <td>Value Units</td>
   </tr>
   <tr>
      <td>S0111PZ</td>
      <td>77D000</td>
      <td>Per Engine Registration</td>
   </tr>
   <tr>
      <td>S0111PZ</td>
      <td>4D9000</td>
      <td>Value Units</td>
   </tr>
   <tr>
      <td>S0111R0</td>
      <td>77D000</td>
      <td>Per Engine Registration</td>
   </tr>
   <tr>
      <td>S0111R0</td>
      <td>4D9000</td>
      <td>Value Units</td>
   </tr>
   <tr>
      <td>S013T6B</td>
      <td>77D000</td>
      <td>Per Engine Registration</td>
   </tr>
   <tr>
      <td>S013T6B</td>
      <td>4D9000</td>
      <td>Value Units</td>
   </tr>
   <tr>
      <td>S0111PX</td>
      <td>77D000</td>
      <td>Per Engine Registration</td>
   </tr>
   <tr>
      <td>S0111PX</td>
      <td>4D9000</td>
      <td>Value Units</td>
   </tr>
</table>

Open in new window

No need to post the XML again, I fixed it manually
Now I need the XSL, in order to continue
Here is the XSL code...<!-- Output method -->
<xsl:key name="uniq" match="offeringInformation/softwareOffering/licensedFunction/" use="concat(../licenseID, valueMetric)"/>
      <xsl:output method="html" omit-xml-declaration="yes" indent="yes"
      <xsl:call-template name="starting">
                  <xsl:with-param name="s1" select="0" />
            </xsl:call-template>
      </xsl:template>


      <xsl:template match="offeringInformation" name="starting">
                        <head>
                  <script type="text/javascript">var v = 0;</script>

            </head>

            <table class="basic-table" cellspacing="1" cellpadding="0" width="80%" style="margin-top:2em;">
    <tr>
        <td colspan="7"></td>
    </tr>
    <tr>
   


                  <xsl:for-each
                        select="offeringInformation/softwareOffering/licensedFunction/licenseOption">                        

                        <tr>
                              <xsl:if test="(position() mod 2 = 0)">

                                    <xsl:attribute name="class">gray</xsl:attribute>
                              </xsl:if>
                              <td>
                                    <xsl:variable name="valuemetricid"

select="valueMetric">
                                    </xsl:variable>
                              
      <xsl:variable name="licenceid" select="../licenseID">
                                    </xsl:variable>
                                    
                                    <small>
                                          <a
                                                href="Softwareor.jsp?type=Licence&amp;licenceid={$licenceid}&amp;valuemetricid={$valuemetricid}">

                                                <xsl:value-of
                                                      select="../../productId/typeCode" />
                                                <xsl:value-of
                                                      select="../../productId/modelCode" />
                                          </a>
                                    </small>
                              </td>
                              <td nowrap="1">
                                    <small>
                                          <xsl:value-of select="../licenseID" />
                                          /
                                          <xsl:value-of select="valueMetric" />
                                    </small>
                              </td>
                              <td nowrap="1">
                                    <small>
                                          <xsl:value-of select="../description" />
                                    </small>
                              </td>
                              <td nowrap="1">
                                    <small>
                                          <xsl:value-of
                                                select="valueMetricDescription" />
                                    </small>
                              </td>
                              <td nowrap="1">
                                    <small>CHARGE</small>
                                    <script type="text/javascript">v++;</script>

                              </td>
                        </tr>
                        
                   </xsl:if>            
                  </xsl:for-each>
Some comments
- if you post XML or XSL, use the code snippet pane, then the code comes out with a lot better quality
- if you post an XSLT, make sure what you post is complete
I spend too much time fixing this rubbish before I can start working on it, whilst it is only a small effort for you to copy correctly
Too much was lost in your copying, I can't fix it in a way I can see what was wrong, please post again
also you XML is in complete
I see this XPath
<xsl:for-each  select="offeringInformation/softwareOffering...
implying there is an offeringInformation element around what you posted
If an offeringInformation can contain multiple softwareOfferings, that could allready be the cause for duplication

How can you expect us to answer your question and help you debugging,
if you poste uncomplete data and uncomplete requirements.
This way you are wasting a lot of time from experts that could use that time to help others,
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Well my friend,
what was wrong with my code?
You completely changed it, in order to have the same effect as my first example, except that it worked, and now it does not.
I started changing your example, put some effort in it and will likely end up with the same code as before.
So, can you tell me what was wrong with my example, and why you changed it, because you definitely did not improve it.
So simply tell me what functionality needs to be changed from my example, and I will help you with that, but I will not work on the code you just dumped here
Sorry Buddy ..I accept your first Solution..Thanks a lot for your solution...It really helped me a lot...

Thanks...
No problem,
please note that I am willing to help to change it to your needs if needed,
Thankyou much..but i changed according to my need....

Thanks
With which you gave piece of code in XML...that is really really nice...
I got exact solution...what i needed ..so thanks to the expertee who provided solution..Thanks alot  Buddy :)