Subject: Re: [xsl] Multiple Filtering of rows based on attributes values From: Jagdishwar B <jagdishwar.beemanati@xxxxxxxxx> Date: Fri, 15 May 2009 12:36:33 +0530 |
Hi Kamlesh, i tried to understand ur requirement, can you also post the desired output.xml and the xslt with which you already tried. On Fri, May 15, 2009 at 11:44 AM, Kamlesh Bafna <Kamlesh.Bafna@xxxxxxxx> wrote: > Hi, > > I have the following input xml. > My requirement is - > 1. Select all row with ItemCode - 'PENEMR' & then get thier PROD_DEPT_ID > 2. For each PROD_DEPT_ID found above - Check atleast one row is present > whose Item_Code is ARTPAY and same PROD_DEPT_ID. If not present then add > a new row with ITEM_CODE as ARTPAY and PROD_DEPT_ID value same as > PENEMR. > > I am using Microsoft .NET 3.0 xsl processor. I have written an xslt > which loopes through the rows to find the row with ITEM_CODE as PENEMR > and then another loop to identify the ARTPAY. However i think there is > better way to do this through keys and requires some guidance on this. > > Also I am unable to find single Xpath to find row with Item Code as > ART_PAY and Pensional as 'Y' and PROD_DEPT_ID as some variable value. > Please help. > > Thanks > Kamlesh > > INPUT XML - > > <Rows> > <Row> > <Field alias="ITEM_CODE">NIEMR</Field> > <Field alias="PENSIONALBE">N</Field> > <Field alias="PROD_DEPT_ID">Task1</Field> > </Row> > <Row> > <Field alias="ITEM_CODE">NIEME</Field> > <Field alias="PENSIONALBE">N</Field> > <Field alias="PROD_DEPT_ID">Task1</Field> > </Row> > <Row> > <Field alias="ITEM_CODE">ARTPAY</Field> > <Field alias="PENSIONALBE">Y</Field> > <Field alias="PROD_DEPT_ID">Task2</Field> > </Row> > <Row> > <Field alias="ITEM_CODE">ARTPAY</Field> > <Field alias="PENSIONALBE">N</Field> > <Field alias="PROD_DEPT_ID">Task1</Field> > </Row> > <Row> > <Field alias="ITEM_CODE">PENEME</Field> > <Field alias="PENSIONALBE">N</Field> > <Field alias="PROD_DEPT_ID">Task1</Field> > </Row> > <Row> > <Field alias="ITEM_CODE">PENEMR</Field> > <Field alias="PENSIONALBE">N</Field> > <Field alias="PROD_DEPT_ID">Task1</Field> > </Row> > <Row> > <Field alias="ITEM_CODE">PENEMR</Field> > <Field alias="PENSIONALBE">N</Field> > <Field alias="PROD_DEPT_ID">Task2</Field> > </Row> > <Row> > <Field alias="ITEM_CODE">PENEMR</Field> > <Field alias="PENSIONALBE">N</Field> > <Field alias="PROD_DEPT_ID">Task3</Field> > </Row> > <Row> > <Field alias="ITEM_CODE">ARTPAY</Field> > <Field alias="PENSIONALBE">Y</Field> > <Field alias="PROD_DEPT_ID">Task1</Field> > </Row> > <Row> > <Field alias="ITEM_CODE">ADVREC</Field> > <Field alias="PENSIONALBE">N</Field> > <Field alias="PROD_DEPT_ID">Task1</Field> > </Row> > <Row> > <Field alias="ITEM_CODE">VATAMT</Field> > <Field alias="PENSIONALBE">N</Field> > <Field alias="PROD_DEPT_ID">Task1</Field> > </Row> > </Rows> > > > > > > > > > The information contained in this communication is intended solely for > the use of the individual or entity to whom it is addressed and others > authorized to receive it. It may contain confidential or legally > privileged information. If you are not the intended recipient you are > hereby notified that any disclosure, copying, distribution or taking any > action in reliance on the contents of this information is strictly prohibited > and may be unlawful. If you have received this communication in error, > please notify us immediately by forwarding this email to > MailAdmin@xxxxxxxx and then delete it from your system. > > Ness technologies is neither liable for the proper and complete > transmission of the information contained in this communication nor for > any delay in its receipt. > > -- Jagdishwar B.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Multiple Filtering of rows ba, Kamlesh Bafna | Thread | RE: [xsl] Multiple Filtering of row, Kamlesh Bafna |
[xsl] Multiple Filtering of rows ba, Kamlesh Bafna | Date | Re: [xsl] XSL - Documentation, Michael Müller-Hille |
Month |