[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Hi Siddharth Jain,
I think you get quicker respons if you show some desired output as well and a bit of code that shows your own attempt. We don't have time to write the whole solution for you, but can help you get your attempt working as you would like...
Re: [xsl] XSLT logic problem
Subject: Re: [xsl] XSLT logic problem From: Geert Josten <Geert.Josten@xxxxxxxxxxx> Date: Mon, 08 Nov 2004 10:12:13 +0100 |
Hi Siddharth Jain,
I think you get quicker respons if you show some desired output as well and a bit of code that shows your own attempt. We don't have time to write the whole solution for you, but can help you get your attempt working as you would like...
Grtz, Geert
Hi, I am a novice in XSLT and have a problem.
I have a XML of the following kind which i recieve from the database. <ROWSET> <ROW num="1"> <CORE_ID>Core 1</CORE_ID> <CORE_EFF_START_DT>04-SEP-2004</CORE_EFF_START_DT> <CORE_EFF_END_DT>31-DEC-2050</CORE_EFF_END_DT> <MPN_CD>Device 1</MPN_CD> <MPN_DESC>Device 1 description</MPN_DESC> <MPN_EFF_START_DT>04-SEP-2004</MPN_EFF_START_DT> <MPN_EFF_END_DT>31-DEC-2050</MPN_EFF_END_DT> </ROW> <ROW num="2"> <CORE_ID>Core 1</CORE_ID> <CORE_EFF_START_DT>04-SEP-2004</CORE_EFF_START_DT> <CORE_EFF_END_DT>31-DEC-2050</CORE_EFF_END_DT> <MPN_CD>Device 2</MPN_CD> <MPN_DESC>Device 2 description</MPN_DESC> <MPN_EFF_START_DT>24-SEP-2004</MPN_EFF_START_DT> <MPN_EFF_END_DT>31-DEC-2050</MPN_EFF_END_DT> </ROW> <ROW num="3"> <CORE_ID>Core 2</CORE_ID> <CORE_EFF_START_DT>04-SEP-2004</CORE_EFF_START_DT> <CORE_EFF_END_DT>31-DEC-2050</CORE_EFF_END_DT> <MPN_CD>Device 1</MPN_CD> <MPN_DESC>Device 1 description</MPN_DESC> <MPN_EFF_START_DT>12-OCT-2004</MPN_EFF_START_DT> <MPN_EFF_END_DT>31-DEC-2050</MPN_EFF_END_DT> </ROW> </ROWSET>
The CORE_ID is associated to a core product and MPN_CD is associated to a device product. Also, 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, Siddharth.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XSLT logic problem, Siddharth Jain | Thread | AW: Re: [xsl] Creating HTML form fr, Huditsch Roman |
[xsl] XSLT logic problem, Siddharth Jain | Date | Re: [xsl] XML/XSL free editor (ecli, xptm |
Month |