Wrox Programmer Forums
|
Forum and Wrox.com Feedback Post your suggestions for improving the Forums or Wrox.com or questions for the staff here. "Where can I find the code for my book?"
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Forum and Wrox.com Feedback section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old December 7th, 2009, 04:23 AM
Registered User
 
Join Date: Dec 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default XSLT- Help Required plz...

Hi experts,

I am new to XSLT. As im in support i need to fix a xslt issue urgently. I hope you experts can help me on this issue.

Input XML:

<Items>
<Item>
<Discnum>1</Discnum>
<Discnum>2</Discnum>
</Item>
<Item>
<Discnum>3</Discnum>
</Item>
<Item>
<Discnum>4</Discnum>
<Discnum>5</Discnum>
</Item>
<discounts>
<discount>
<discnum>1</discnum>
<discqty>2</discqty>
</discount>
<discount>
<discnum>2</discnum>
<discqty>1</discqty>
</discount>
<discount>
<discnum>3</discnum>
<discqty>1</discqty>
</discount>
<discount>
<discnum>4</discnum>
<discqty>2</discqty>
</discount>
<discount>
<discnum>5</discnum>
<discqty>4</discqty>
</discount>
<discounts>
<Items>


Required Output XML:

<Items>
<Item>
<discseq>1</discseq>
<discseq>2</discseq>
<discseq>3</discseq>
<Item>
<Item>
<discseq>1</discseq>
<Item>
<Item>
<discseq>1</discseq>
<discseq>2</discseq>
<discseq>3</discseq>
<discseq>4</discseq>
<discseq>5</discseq>
<discseq>6</discseq>
<Item>
<Items>

The logic behind the output is, for each item in the input, there will be a <discnum> tag, XSLT has to refer the <disqty> of each <discnum> in the <discounts> node and it should generate the <discseq> from 1 for each item.


Thanks in advance..

krishhh





Similar Threads
Thread Thread Starter Forum Replies Last Post
plz.....plz solve out my problem.... kethireddy435 ASP.NET 1.x and 2.0 Application Design 1 October 4th, 2007 12:56 PM
Help with XSLT: xmi:type="{@xmi:type}" (plz help) WallaceHorta XSLT 3 August 18th, 2006 11:23 AM
dynamic xslt -> xslt creation namespace problem jkmyoung XSLT 2 July 15th, 2006 12:42 AM
XSLT for complicated xml to xml transf. required doug@sirvisetti XSLT 3 June 17th, 2005 04:26 PM
XSLT expert required..thanks. sundar_revathi XSLT 1 December 13th, 2004 08:01 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.