Xslt multi conditions checking.

     Hi,
Please could you help me how I can achieve my requireemnt through xslt.
in an xml, I will pass the belwo records
<Main>
<HOME RecNo="1">
              <Articles useFilter="True"    CID="LGTS22"   BVal="MUG"/>
            <Articles useFilter="False"     CID="LGTS22"    BVal="MUG"/>
</HOME>
<HOME RecNo="2">
              <Articles useFilter="False"  CID="LGTS22"    BVal="BBB"/>
            <Articles useFilter="True"    CID="XXX"    BVal="MUG"  BID="LGTS22"  />
</HOME>
<HOME RecNo="3">
              <Articles useFilter="False"  CID="ABCS22"    BVal="MUG"/>
            <Articles useFilter="True"    CID="XXX"    BVal="MUG"  BID="ABCS22"  />
</HOME>
</Main>
My requirement is like this.
I will be passign the Home record to the xslt. in the xslt I need to check like this, based on Bval and useFilter I need to check the CID/BID values, as mentioned below.
1. in the articles element if Bval is MUG, then check the value of UseFilter, if the useFilter is False then check the value of CID which is having  'LGT' value in it. then return the value as it is LGT. (first record)
2. in the articles element if Bval is MUG, then check the value of UseFilter, if the useFilter is True then check the value of BID, not the CID attribute value which is having  'LGT' value in it. then return the value as it is LGT. (second record)
3. If both above condtions are not met then return as nonLGT.(third record)
Thanks.

It's not clear whether you pass the entire document in one go or individual HOME records, and whether you want an XML output or a single text value for each record, and what this "value" should be.
Can you clarify by giving the expected output?

Similar Messages

  • Multi Condition step

    Hi,
    I am changing the approval custom worflow.
    In my workflw intial two step are  MULTI CONDITION for  plant   and  condition types.
    previously we have used different approval procedure for different plant.
    now all plants are having the same procediure.
    so i am planning to remove the first MULTI CONDITION  step.
    when I removed that step  workitem is not creating and workflow error.
    binding problem error showing in one of the step  in container.
    pl help.
    other wise  it it possible to use the same procedure fordifferent plant with out creating new steps.
    Thans in advance
    sharma
    Edited by: sharma on Sep 10, 2009 5:43 AM

    Hi Sharma,
    I have noticed with my workflows that often when you add or delete a task in a workflow, the bindings of other steps are also affected.
    In your case, the binding of some other step could have got disturbed because of deletion of the multi condition step.
    I would suggest you to create a new version of the workflow and compare your workflow after deletion of the step with the previous version. Check the bindings at each step.
    Hope this helps!
    Regards,
    Saumya

  • Apex 4.0: Change the Search Field to a Multi Value Check Box IR

    I am new here, but hoping to be active :)
    Well, now I am focusing on Apex 4 and I find really new things here. And even new order to develope needs time to get used.
    Still, I am trying to change the Search Field to a Multi Value Check Box in IR. I have found how to make it in Apex version 3, but not at 4 any more.
    Tutorials for apex v.3 write:
    1.Click Edit Page 1 on the Developer toolbar.
    The Page Definition for page 1 appears.
    2. Under Items, click P1_REPORT_SEARCH.
    3. From Display As, select Checkbox ans so on...
    But I do not find any word "Items" in IR and especially P1_REPORT_SEARCH (I assume this should be by default). Under "Report Atributes" I find "Search bar" region, just there is no option for that. Is here any way to make search with checkboxes in v4?

    Hi,
    Tutorial you have check for APEX 3.x probably works still in APEX 4.x if you use classic report.
    As I understand you have now create interactive report that provide out of box search features.
    There is no option to change IR search text field to multi select item.
    What you can do with IR, is hide/disable search field.
    Then you create multi select item and use it in report query where clause.
    Regards,
    Jari
    My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • How i can make in the same action 2 condition (check the exemple down)

    how i can make in the same action 2 condition (check the exemple down)
    this is an example and I really thank you for helping me(any body plz)
    http://www.2shared.com/file/DPpdgC_a/Exemple_Edge.html

    1. make each rectangle a symbol  (Symbol_1 and Symbol_2) and uncheck autoplay()
    2. Delete your code on the click event and put the following code in compostion ready:
    var toggle=true;
    function btnPlay(){
              if (toggle){
                        toggle=false;
                        sym.getSymbol('Symbol_1').play();
              else{
                        toggle=true;
                        sym.getSymbol('Symbol_2').play();
    sym.$('Ellipse').click(function(){
              btnPlay();

  • I want to create new popup block screen in CO11N SCREEN for condition check

    in standard CO11N screen after completing filling the required field , when i click the save icon I NEED TO CREATE THE POBUP BLOCK SCREEN FOR CONDITION CHECKING WHICH CONSIST
    YES    NO    CANCEL
    IS THERE ANY FUNC MODULES TO DO THIS? OR IS IT POSSIBLE BY CODING?

    Don't rely on 'Preview'.
    Share/Export as .ibooks file and then drag that to iTunes and sync to your iPad.
    Still no joy, find a pre-processing recipe ( that includes export for iPad) that doesn't spoil the quality in the process.
    Just keep in mind that low quality in means low or lower quality out, in this example.

  • In a multi-conditional formula node it keeps returning same thing

    I am trying to execute a multi-conditional if else loop. From this website it says version 6.0 (which I have) can use C language so it should be something like:
    if (x=0) y= 1000;
    else if (x=1) y= 60000;
    else if (x=2) y= 90000;
    else y=0;
    etc
    what I am trying to do is take a value from a ring (0,1,2,3) and multiply it by a certain constant depending on what the value is. However, no matter what I do the loop is returning only the first value of the if statement no matter what the input value is. How can I get this loop to return 60000 if x=1 etc?

    Jem,
    I noticed that your code only uses one equal sign for the comparison, when you should be using two? Is this the issue? When I tried your code in LabVIEW 6.0.2 with "==" instead of "=" in the comparison of the if statements. It functioned properly.
    Randy Hoskin
    Applications Engineer
    National Instruments
    http://www.ni.com/ask

  • Multi-condition Dynamic actions

    Is it possible to have multi-condition dynamic actions e.g. hide field A if field B is null and field C is set to 'ABC'

    Hi Pod,
    yes but in that case you have to use a JavaScript Expression as condition type. In your example that would be
    ($v_IsEmpty("B") && $v("C") === "ABC")Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Condition Checking

    Hi,
      Is there anyway i can ensure, let's say my "net income" is larger than 2 million before the user can submit the data? is there some sort of condition checking or locking mechanism that does this?
      any input on this?
    cheers

    You can have something like that for submission
    please check into help online the follow link
    http://name of your application server/osoft/help/admin/helpstart.htm#Setting_application_set_parameters.htm
    It is not exactly what you want but you can do something using this approach.
    You can change the work status settings for each application. Changing the work status settings involves identifying three to five 'work status dimensions,' and then defining specific members for the remaining non-work status dimensions used for validation purposes. You must determine which account you will use for validation of the data at the time the work status is changed. The validation account must be &rdquor;0u201D at the intersection of the 3-5 variable members and the members designated for the non-work status dimensions.  If the account is not &rdquor;0u201D then the owner/manager cannot set the work status.  This is an option feature.
    The dimensions you select as the work status dimensions are the variables in your business process. For example, the entity, category, and time might change based on who is submitting data, but the account, data source, reporting currency, etc., remains static. (Typically, Time is a work status dimension since data is usually segregated based on time.)
    For example, lets say that you set Entity, Category, and Timeas your work status dimensions for a given application. You then set your other current view members to the following:  Account: Validation; DataSrc: TotalAdj; Intco: All_Intco; and RptCurrency: LC. In addition to assigning work status dimensions, you also specify which dimension is the 'owner dimension.' The owner dimension includes the Owner property. The owner property determines who can edit a work status setting. The following figure shows this setup, where Entity is the Owner dimension.
    A user attempts to post data to the current view shown in the following table. The system checks the 'validation' account to make sure the intersection equals zero (0). If so, the data is posted, and a success message is displayed. The user can now set the work state to 'submitted' on that intersection. Subsequent submissions to that exact intersection will be rejected. Users can only send data to the same intersection if the Entity, Category, or Time member changes.
    Account
    <All>
    Category
    Actual
    DataSrc
    <All>
    Entity
    SalesNE
    Intco
    <All>
    RptCurrency
    <All>
    Time
    Feb.2007
    To change work status settings for applications
    From the Admin Console, expand the Application node.
    Expand the application for which you want to change the work status setting.
    Select Work Status Settings.
    In the Work State column, select Yes for each dimension you want to use to control the work status settings. Select Owner for the dimension that contains the Owner property.
    In the Member Validation column, select a member for each non-work status dimensions. (Use the browse button to open the Member Lookup.)
    From the action pane, select Save Work Status Settings.

  • Multi-stage check-in with PB Classic

    I'd like to implement a multi-stage check-in, i.e. check-in for cross-testing, when that's passed check-in for QA, and when that's passed check-in for production. The only way I can think of is keeping a list of all the objects that were changed then doing a compare to make sure no-one else has changed anything while it was being tested, merge any changes if there are any, and don't make any mistakes. This sounds error prone.
    Does anyone out there do this kind of thing and how do you handle it? (We're using Microsoft Team Foundation Server for our source control, but I'm not sure it matters what the back-end is).
    I'm grateful for any ideas!
    Thanks,
      Aron.

    I don't know TFS, but in general this is accomplished using Build Numbers, labels, and branches.  I've implemented this methodology using StarTeam back in the PB9 days.
    To make things easy, let's say Production is linked to build 1000, build 1100 is Beta, build 1200 is QA.  Developers are working on the tip revision, which is currently build 1300.
    Every time a build is done on the DEV branch, generate a new build number and assign that build to the tip revision of every object.  Most of your objects won't change between builds, but that's OK.  All you need to be able to say is "Give me the version of object X as it was for build Y."  That lets you recreate any build from any branch.
    Now, let's assume that the QA testers discover a bug that needs some repair.  You can't change the tip revision (build 1300) and compile, because that would pollute your QA build (build 1200) with in-process code.  What you need to do is create a BRANCH from build 1200, and ensure that any changes that get checked in for those defects increment along that branch - NOT the DEV branch.  The KEY to this is to create a separate workspace (NOT a separate target in the original workspace) and bind it's SCC properties to the branch off of build 1200.  Use a copy of the PBLs that represent the QA build (or do a full bootstrap from the TFS exports, but it's easier just to save copies of each promoted build).  When you do builds from this workspace/target, number them from 1200 - I used 1200.001, 1200.002, etc.  The QA people get this build to test.  If the bug is fixed, then you need to manually merge the fixed code into back into the corresponding objects in the DEV branch.  If you don't do this, your changes won't be there in any new DEV build.
    The same process is in place for changes to PROD or BETA.  Create a new workspace, branch off of the label's current build number, and ensure that code revisions increment along the branch.  And then comes the manual merge process into the downstream labels.
    Promoting a build to the next stage is simply reassigning the label from one build number to the next.  When it's time for the QA build (1200.002) to become Beta, you take the "Beta" label and reassign it to build number 1200.002.  (Build 1100 is no longer the Beta release, and for this moment in time both BETA and QA labels point to the same build number.) 
    -Paul Horan-

  • XSLT Multi Mapping

    Hi. Here is my scenario: eGIS -> PI -> SAP
    Asynchronous web service call to PI, which I'd like to split into one of two calls, either an IDoc or an RFC call to SAP, depending on the value of a field being passed from eGIS. I'd like to do this using XSLT mapping, as I already have the mapping for the IDoc call.
    Is this possible? I'm running PI 7.0 SP 20.
    Thank you.
    Nicole

    This should be simple as said above..
    Step 1: Create a message mapping between your source message and target RFC
    Step 2: Create an Interface mapping between your source interface and RFC
    Step 3: In ID part in the existing Interface Determination 'Add one more Inbound interface(select your RFC)' and select the corresponding Interface mapping created in Step 2. Now save the Interface Determination and you will find a condition editor added for both the 'existing and newly created interface mapping'. specify the respective conditions.
    Step 4: Create a Receiver agreement for the RFC.
    Hope this helps..
    Regards,
    Zameer

  • Negative Condition checking in read statement

    Hi,
    i have table, which i have to read,  key on which i am going to read that will be determined dynamically. now i have to check the value for the key field is initial or not. i can't use a loop here as it doesn't allow me to mention where condition field dynamically.
    thanks & regards,
    prabhu

    Hi use this:
    DATA: BEGIN OF it OCCURS 0,     "your dynamic table
            field1 TYPE c,
            field2 TYPE c,
          END OF it.
    it-field1 = '1'.
    it-field2 = 'A'.
    APPEND it.
    it-field1 = ''.
    it-field2 = 'B'.
    APPEND it.
    it-field1 = '2'.
    it-field2 = 'C'.
    APPEND it.
    FIELD-SYMBOLS: <struct> TYPE ANY,
                   <comp>   TYPE ANY.
    LOOP AT it ASSIGNING <struct>.   "loop at your dynamic table
      ASSIGN COMPONENT 'FIELD1' OF STRUCTURE <struct> TO <comp>.   "FIELD1 is determined dynamically
      IF sy-subrc = 0 AND <comp> is not initial.  
        WRITE <comp>.   "will write out <comp> for each entry which has non initial value in <comp> (here FIELD1)
      ENDIF.
    ENDLOOP.
    Please note that your <lfs> must hold name 'FIELD1' inside, than you can replace it with below code
      ASSIGN COMPONENT <lfs> OF STRUCTURE <struct> TO <comp>. 
    Regards
    Marcin
    One thing to be added here:
    You can't read table comparing its key field with negative condition NE , only comparison EQ are allowed in READ TABLE statement, that's why I chose above approach.
    Edited by: Marcin Pciak on May 26, 2009 4:51 PM

  • Condition checking in Message Mapping

    Hi
    My scenario has a IDOC coming in XI and gets converted into a flat file
    Idoc Structure
    ControlRecord
    ParentRecord
    Field1
    Field2
    ChildRecord
           Field3
           Field4
           Field5
    Condition is Field2 = 0500 and Field5=""
    If both the conditions are satisfied,then
    For every occurence of child record,parent record needs to be repeated.
    I used "useOneasMany" function to check ,but I am not able to check both the conditions.
    Help needed on how to check these conditions
    Thanks

    Hi,
      Try Like below.
    Field2-----------
       ChildRecord----Use One as many-->@
       Field5-----------
    @----equalsS("0500")----------and----if with out else---then(--@)----Target.
       Field5--length--equalsS("0")--
    If you required else condition then use "if" condition. As per above mapping any one condition fails target field will suppress.
    Regards,
    Prakasu.M

  • XSLT - if condition

    hi
    i wanted to check a value with condition.
    something like this
    <xsl:variable name="rootname" select="name()">
    i wanted to check whether the $rootname= SportsData.
    how will i express this condition in a conditional statement
    rgds

    <xsl:choose>
              <xsl:when test="$blah='blah'">
              </xsl:when>
    </xsl:choose>

  • While loop condition check

    Dear All,
    attached is an NI that does the following.
    1. The user inputs a frequency and amplitude range to drive a speaker.
    2. A laser displacement sensor measure the speaker displacement, checks if it is in the desired range, and jumps on to the next frequency, if its not in the desired range it tries another drive voltage.
    The program works fine, the problem is, is that the while loop checks the condition in the beginning or the middle of the loop, therefore if it is in range instead of stoping at that particular amplitude and frequency, it goes to the next amplitdue before going to the next frequency. Since at the begining of the loop execution the condition was different that in the middle.
    How can I force the while loop to read the condition only after the sequence inside has completed.
    Thank you
    Ala
    Attachments:
    AmpFinder.vi ‏431 KB

    Dear All,
    I think this fixes the problem
    Cheers,
    Ala
    Attachments:
    AmpFinder.vi ‏431 KB

  • WF with Multi-condition is not work

    Hi All,
    I am using an object subtype of the FIPP - document park, which is called a YFIPP01, and I have to include a new atribbutes (vbkpf-Blart). swo1:
    YFIPP01.DocumentType        DocumentType  (released)
    Now my WF is being generated and  the workitem too. But my WF is working with a small problem, I made multiple condition using the new attribute (Blart) is not working.
    When I check the log through the Tcode SWEL/Workitem see that the attribute in the container (Blart) is marked "not set".
    SWEL/Workitem :
    Display Container Instance for Workitem 00000004081
    Expression          Values
    Documenttype     <Not Set>
    Any help is very welcome.
    Joao

    Karri Kemppi,  First thanks for responding.
    If you test/instantiate an object in SWO1, is the attribute getting populated? You should test it in SWO1 at the first place. Only after you get it working there, you can expect it to work in workflow.
    ok I had already tested the object as shown below and the attribute is populated.
       YFIPP01                        005019000002282011
            Atributos
                  DOCUMENTNO                        1900000228
                  DOCUMENTTYPE                      T1
                  FISCALYEAR                        2011
                  FLAGCOMPLETE                      X
                  FLAGRELEASED
                  LEVELCOUNTER                      00
                  OBJECTTYPE                           YFIPP01
                  SOURCECOMPANYCODE                 0050
                  USERCHANGE                        ABAP

Maybe you are looking for

  • Video in browser stopped working altogether

    I have updated the flash player, quicktime, and the quicktime patch but videos will still not play at all in safari. I deleted firefox because it was opening automatically for everything and then quitting unexpectedly which gets tiresome quickly. Wha

  • Saving crm confirmation

    Hi Prof's, When saving the confirmation order in sap crm with spare parts am getting the following error. customer is already entered in the confirmation order: No customer could be determined for technician with personnel number 0000721 (Notificatio

  • Is it possible to open 2 Firefox windows with a different set of tabs at start-up?

    I would like Firefox to open two separate windows at start-up, each containing a different set of tabs. Is there a way to do this?

  • Portal Error after system copy

    We are getting below error after we performed a dual stack system copy.  We are able to connect to VA, Configtool, SDM except portal. Any ideas?! http://host:port Application cannot be started.   Details:   com.sap.engine.services.deploy.container.Ex

  • Another color management question

    Hi folks, Apologies for yet another color management question, but Im getting very confused and could do with some help. I use a Canon 10D and Canon 30D. Ive come to LightRoom from Pixmantec Raw Shooter. As Ive gotten more serious about producing hig