[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XSLT logic problem

Subject: XSLT logic problem
From: Siddharth Jain <sidjain81@xxxxxxxxx>
Date: Mon, 8 Nov 2004 14:36:13 +0530
logic problem
I am a novice in XSLT and have a problem.

I have a XML of the following kind which i recieve from the database.
<ROW num="1">
     <CORE_ID>Core 1</CORE_ID>
     <MPN_CD>Device 1</MPN_CD>
     <MPN_DESC>Device 1 description</MPN_DESC>
  <ROW num="2">
     <CORE_ID>Core 1</CORE_ID>
     <MPN_CD>Device 2</MPN_CD>
     <MPN_DESC>Device 2 description</MPN_DESC>
 <ROW num="3">
     <CORE_ID>Core 2</CORE_ID>
     <MPN_CD>Device 1</MPN_CD>
     <MPN_DESC>Device 1 description</MPN_DESC>

The CORE_ID is associated to a core product and MPN_CD is associated
to a device product.
1. One core product can have many device products. (i needed a
hierarchy where all device products associated to a single core
product were displayed together. I took care of this using grouping)
2. One device product can be in more than one core product.

The condition is as follows:
For a device product,
if MPN_EFF_END_DT < CurrentDate  => inactive
else                                                 => active

So a device product can be active/inactive. It could be active under
one core product and inactive under another core product.

What is required:  If in a case where one device product occurs in
more than one core product and in one of the cases the device product
is found to be inactive, then that device product should not be
displayed instead only the active ones under other core products
should be displayed.
Moreover, if in a case, where one device product occurs in more than
one core product and in all of these the device product is found to be
inactive, then the device product should be displayed.

Please help me out with a logic as to how should i go about
implementing this. If anyone can give me a sample code that will be
the best.

Thanks & Regards,

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.