Addition of two variables inside xslt

Hi all

I try to add two variables inside xslt. The result is written to a target node, but I am getting "Nan" in output.

Here's my xslt.

< name of xsl: variable = "Amount1" >
< xsl: choose >
< template test ='(po:ID = «Distributeur») and (po:TypeCode = "Text_products_base_price7")' >
< xsl: value-of select = "po:Amount" / >
< / xsl: When >
< / xsl: choose >
< / xsl: variable >
< name of xsl: variable = "Amount2" >
< xsl: choose >
< template test ='(po:ID = «Distributeur») and (po:TypeCode = 'VAT') ">"
< xsl: value-of select = "po:Amount" / >
< / xsl: When >
< / xsl: choose >
< / xsl: variable >
< name of xsl: variable = "Value TotalAmount" select = "$Amount1 + $Amount2" / >
< customer: priceDistributorUnitInclVAT >
< xsl: value - of select = "number ($TotalAmount)" / >
< / client: priceDistributorUnitInclVAT >

I want to add Amount1 and Amount2 and use it to map it to the target node.

The entries on the way to the sum in a third variable. ?

Kind regards
Vikas

Hi Vikas,

You must include xsl: otherwise in your xsl: choose the clause, it seems to me that your state of health one of the variables will be always Nan and a number + Nan will always result in Nan.

Look at this
http://w3schools.com/xsl/xsl_choose.asp

See you soon,.
Vlad

It is considered good etiquette to the answerers rewards with points (as "useful" - 5 pts - or 'correct' - 10pts)
https://forums.Oracle.com/forums/Ann.jspa?annID=893

Tags: Fusion Middleware

Similar Questions

  • Addition of two Variables

    Hi experts,

    I have only one requirement to sum up the values of the two variables. Can you explain what is the syntax for it. ?

    Thank you..

    If you two xml elements you may have directly as
    If you mean variable xdoxslt, you can summarize their as usual.

  • CMD. EXE: IS IT POSSIBLE TO USE TWO COMMANDS INSIDE OF THE COMMAND CMD 'FOR '?

    HAY EVERYONE.
    I WROTE A PROGRAM TO CMD. EXE.
    AND I WANT TO SET A VARIABLE TO THE NUMBER OF FILES PRESENT IN A DIRECTORY.
    THE PROBLEM IS THAT I DON'T KNOW HOW TO USE THE TWO COMMANDS INSIDE OF THE COMMAND.
    HERE IS THE EXAMPLE OF MY PROBLEM INSIDE THE BAT FILE:

    OFF @ECHO
    FOR /F %%D IN (' DIR/W/D / N / L ' "C:\WINDOWS\SYSTEM32\*." ") DLL | TROUVER/C/I/N 'B' ') SET FILES_NUMBER = % Y
    ECHO: % FILES_NUMBER %
    BREAK
    OUTPUT

    I EXPECT THAT THIS PROGRAM WAS TELLING ME HOW MANY DLL FILES THAT BEGIN WITH THE LETTER B, I HAVE IN MY SYSTEM32 DIRECTORY.
    HOWEVER, THIS PROGRAM HAVE A MISTAKE DURING ORDERING.

    | WAS NOT PLANNED AT THIS TIME.

    "WHEN I USE IT JUST COMMAND DIR/W/D O:N: C ' C:\WINDOWS\SYSTEM32\*. "DLL" | " FIND/C/I/N "B" WITHOUT THE FOR ORDER THIS ORDER WRITE A NUMBER ON THE SCREEN. THE NUMBER OF DLL FILES THAT BEGIN WITH THE LETTER B IN MY SYSTEM32 DIRECTORY.
    IF THESE TWO COMMANDS (DIR AND FIND) COMBINED ALL WORK OK.

    BUT I WANT TO REDIRECT THE OUTPUT OF THESE COMMANDS IN A VARIABLE. FOR THIS I USE THE COMMAND FOR.

    WHEN I USE JUST A COMMAND INSIDE THE ORDER, HE DIDN'T THERE WAS NO ERROR.
    BUT WHEN I USE PIPES, A MISTAKE SE PRODUCT.

    SO, MY QUESTION IS: HOW TO USE TWO COMMANDS INSIDE OF COMMAND? OR HOW TO USE A PIPE TO COMMAND INSIDE.

    YBY

    A slightly different method, but will set the Files_Number variable to what you want:

    Off @Echo
    C:
    cd\Windows\System32
    Dir B *. DLL | FindStr.Exe 'File (s)' > Temp.Txt
    FOR /F "Tokens = 1-4" %% IN (Temp.Txt) Set Files_Number = %% a
    Echo number of records Files_Number is %

    Note: You can add a Temp.Txt DEL if you want, but it is not necessary because the > causes the replaced every time that you run this. (If we had used > as our redirector, it adds to the Temp.Txt file, which we don't want.)

    In addition, when you use the / w with the DIR command that calls the large format so you get 1 account per line regardless of the number of files has the letter B in them. Also, your search for the letter B in each line through FIND counted the Bs if they're the first letter.

    My method deliberately DIRs for only these DLLs that begins with the letter B. FindStr allows us to give us only the row that contains the number of files. In the FOR-IN-DO we know that this line will have four elements of the text, so we settled our chips to 1-4. They will be placed in temporary variables a, b, c & d.

    Given that the actual number of files, that's what we want, we have Files_Number = %% a.  Had we wanted to know the total number of bytes of the file, WE Set Total_Bytes = % c.

    You can do both if you want to do like this:

    Off @Echo
    C:
    cd\Windows\System32
    Dir B *. DLL | FindStr.Exe 'File (s)' > Temp.Txt
    FOR /F "Tokens = 1-4" %% IN (Temp.Txt) Set Files_Number = %% a
    FOR /F "Tokens = 1-4" %% IN (Temp.Txt) define Total_Bytes = %% c
    Echo number of records Files_Number is %
    Echo Total number of bytes is Total_Bytes % %

  • Variable inside the Variable

    To reference a variable inside another variable, I know you can do something like:

    < cfset variable internal = 1 >
    < cfset outer_variable = "the internal variable is #inner_variable # ' >

    .. .and the #outer_variable < cfoutput > exit # < / cfoutput > would be:

    "The internal variable is 1.

    But I can't get it work with the query results. If the string, "Hello" #name # is stored in the "welcome message" field in a table in my database:

    .. #name # is stored in the variable scope on my CF page like 'joe' and when I

    < cfloop query = 'test' >
    < cfoutput > #greeting # < / cfoutput >
    < / cfloop >

    ... I get "Hello" #name # instead of "Hello Joe".

    Basically, there is a double standard. With regular variables, works of art, basic, but with some query variables it doesn't. Any ideas why or, more important, how to work around?

    I need this is because I am storing the emails that we send to customers in a database. The body of the email contains variables holding individual information (name, password, etc.). To get the password inserted in the body of the email or name of each person, I need to use variables in the variables.

    OK, found the solution. In addition to using the evaluate function, I had to close my email body variable (or the 'outside') quotes in the database record itself. so it would be stored in the DB as:

    "Hello #name #

    and I'd call it:

    #evaluate (email_body) #.

    At this point, I don't know why it is like that, but I'll take it...

  • How to plot two variables when neither are expressed in time?

    I know how to trace a variable against time, but how to plot two variables when neither one of them are time against each other. For example if I want to draw Let's force against remote what is the best approach to use?

    Thank you.

    Use an XY Chart. Use context-sensitive help to see the expected data type and refer to the examples. Consider what follows, don't forget to rename the scale labels and name:

  • I have two variables A and B. I mean "if (A or B &gt; 0) event.value = A + B.

    I have two variables A and B. I mean "if (A or B > 0) event.value = A + B.

    You must combine two compare different operations:

    If ((A > 0) |) (B>0)) {

    Event.Value = A + B;

    }

  • Faced with the question all by merging two variable result sets in BPEL 2.0

    I am facing problem while merging the response of the two variables (operations and list of objects) in BPEL 2.0

    My code snippet is as below:

    <assign name="AssignJobList">
      
    <extensionAssignOperation>
      
    <bpelx:copyList>
      
    <bpelx:from>$InvokeJobDetailsPSGetUpdatedJobObjectsResponse.JobProxyResponse/sfabmabo:Job</bpelx:from>
      
    <bpelx:to>$MergeJobListResponseMessage.JobProxyResponse/sfabmabo:Job</bpelx:to>
      
    </bpelx:copyList>
      
    <bpelx:insertAfter>
      
    <bpelx:from>$InvokeJobDetailsPSGetEffectiveJobObjectsResponse.JobProxyResponse/sfabmabo:Job</bpelx:from>
      
    <bpelx:to>$MergeJobListResponseMessage.JobProxyResponse/sfabmabo:Job[last()]  </bpelx:to>
      
    </bpelx:insertAfter>
     
    </extensionAssignOperation>
    </assign>


    For CopyList operation, its updates the target variable but for the insert after operation on its merger nor her raise an error.

    Could you please help me in the same.

    Thank you

    Hello

    The above problem can be solved by adding a tag for each operation of bpelx as shown below:

    $InvokeJobDetailsPSGetUpdatedJobObjectsResponse.JobProxyResponse / sfabmabo:Job

    $MergeJobListResponseMessage.JobProxyResponse / sfabmabo:Job

    $InvokeJobDetailsPSGetEffectiveJobObjectsResponse.JobProxyResponse / sfabmabo:Job

    $MergeJobListResponseMessage.JobProxyResponse / sfabmabo:Job [last ()]

    Kind regards

  • Number of months in two variables

    Hello

    In the procedure with 2 parameters to the format YYYYMM (year and month), I have musto to know how many months there is between two variables, example:

    201112 and 201111 about a month ago
    201112 and 201110 two months ago

    I tried to multiply year by 12 and months in summary and to make a difference, but no job, some body have some idea


    using 9.2.02

    MONTHS_BETWEEN

  • Assign the values of the two variables in a select statement

    I'm trying to set two variables in a select statement in my definition of the procedure. I get the error identifier not valid "ATTRIBUTE" running the following code.
    create or replace procedure tbl_auth (
    Email in varchar2,
    UserLevel out number)
    as
      v_Email varchar2(100) := lower(Email);
      v_login_chk number := 0;
    begin
     select UserLevel into p_UserLevel,
            v_login_chk into v_login_chk
     from tbl_User
     where eMail=v_Email  
    
    exception
     when no_data_found then
      UserLevel := 0;
    end tbl_auth;
    Can I not connect two different values to two different variables in the same select?

    Thank you

    Published by: jerry8989 on August 22, 2011 07:06

    Published by: jerry8989 on August 22, 2011 07:06

    change as follows:

     select UserLevel, v_login_chk into p_UserLevel,
            v_login_chk
    

    IN ONE ALONE is enough.

    BTW, don't you have "login Check" column in the "tbl_user"? If you do, your selection should be like this:

    ...
    select UserLevel, loginChk into /* check the column name in your table */
             p_UserLevel, v_login_chk
     from tbl_User
    ...
    
  • Get the value of the variable inside the function from the event (EventListener)

    How to get the value of the variable inside the function from the event. Variable has been declared as a function of external events.

    var StringVar="sample";
    
    
    
    
    myButton.addEventListener(MouseEvent.CLICK, myClickReaction);
    
    function myClickReaction (e:MouseEvent):void{
    StringVar="other sample";
    }
    
    trace(StringVar); /* it gives me "sample" value and i would get "other sample" value */ 
    

    This strange because if it would be the trace of a normal function would give me good result.

    var StringVar="sample";
    
    
    function myClickReaction():void{
    StringVar="other sample";
    }
    
    myClickReaction();
    trace(StringVar); /* it gives me result as i wanted to have - "other sample" value */ 
    

    I also know method of passing of arguments depending on the event, but it doesn't for me as I would like to

    var StringVar="sample";
    
    
    
    
    myButton.addEventListener(MouseEvent.CLICK, function(e:MouseEvent){ myClickReaction(e, StringVar) },false, 0, true);
    
    function myClickReaction (e:MouseEvent, StrVar:String):void{
    
    StrVar="other sample";
    }
    
    trace(StringVar); /* it also gives me "sample" value and i would get "other sample" value */ 
    

    How to do it correctly?

    I do not know the structure of your screen lists so I can't tell you how to access the variable, but you're on the right track. If it's a parent, then you can always use the .parent property to cross to the top the list display to try to access.

    for example 1 level:

    MovieClip (this.parent). StringVar = "another sample";

    Add more properties .parent to continue to move to the top of the list.

    for example:

    MovieClip (this.parent.parent). StringVar = "another sample";

    Just like always, use traces (MovieClip (this.parent). StringVar); until you get the value that you want to know that you're accessing them correctly.

  • Problem comparing two variables to help assess variable

    Hello
    IAM using 10.1.3.3 designer ODI where in I have a case to compare two variables.
    IAM using evaluate variable for it as Var1 = #Var2
    My case is as below
    If
    Var1 = Var2
    flow goes to xxx
    on the other
    flow goes to yyy

    I was faced with number format exception when I stated as digital variables. I changed to alpha numeric and tried again. This time the exception has disappeared, but the comparison happens as expected. I have the variables satisfying the real condition (var1 = var2 = 1234). But still the flow occurs for the condition false, which indicates that the comparison goes as planned. My DB is oracle.
    Any suggestions on this are appreciated.
    Thank you
    Naveen.

    Published by: 798664 on November 9, 2010 02:24

    Project you drag and drop your var1 and var2 in refreshing fashion
    Now do drag var1 in evaluation mode and make the comparison

    It must also include the code in your project.

    That is to say var1 = #. Var2
    then implement your business logic

    Thank you
    Fati

  • with regard to the exchange of two variables

    I have two variables of type varchar2. I need to exchange them using a procedure which takes two variables as arguments and returns them exchanged.
    can someone give me the procedure complete pl - sql for the same thing.
    I'm new to pl sql.

    Thank you.

    Published by: user12773921 on March 9, 2010 08:48

    Published by: user12773921 on March 9, 2010 08:50

    Hello

    You can use variables in the end.

    create or replace the swap procedure (IN OUT VARCHAR2 var1, var2 IN OUT varchar2) as
    Temp varchar2 (100);

    Start
    Temp: = var1;
    var1: = var2;
    var2: = temp;
    end;
    To check the output, I stated an anonymous pl/sql block

    declare
    VARCHAR2 (100) var1;
    VARCHAR2 (100) var2;

    Start
    var1: = 'A ';
    var2: = 'B ';.
    dbms_output.put_line (' before swap var1:' | var1);
    dbms_output.put_line (' before swap var2:' | var2);
    dbms_output.put_line ('swapping');
    swap (var1, var2);
    dbms_output.put_line (' after swap var1:' | var1);
    dbms_output.put_line (' after swap var2:' | var2);
    end;

    Published by: user8962436 on March 9, 2010 11:08

  • Need a group of clause for two variables in a table

    I can't find any way to merge the two variables in a group statement with vertical output and horizobtable.
    The statement that I had for a vertical output is (10 gr 2):

    Select to_char (d.begin_interval_time, 'YYYY-MM-DD') as Datenumber,
    w.wait_class as Type,
    round (sum (w.total_waits) / 1024/1024, 0) while "Tot-wait."
    dba_hist_snapshot d, dba_hist_bg_event_summary w
    where d.snap_id = w.snap_id
    To_char (d.begin_interval_time, 'YYYY-MM-DD') group, w.wait_class
    order by to_char (d.begin_interval_time, 'YYYY-MM-DD');

    2010-02-28 system IO 234567
    2010-02-28 user IO 34444
    .
    .
    2010-03-01 system I / 0 773777
    .

    But I wanted to have the following summary output in a SQL:

    User IO system IO Idle commit... and so on
    2010-02-26 3442322 344555 335455 5
    2010-02-27 533222 2233 445455 2334
    2010-02-28 3434444 244444 345555 39
    2010-03-01 34444 55445 3444 534

    Someone has an idea?

    Do you mean that?

    SQL> select to_char(d.begin_interval_time, 'YYYY-MM-DD') as Datenumber,
      2  round(sum(decode(w.wait_class,'Concurrency', w.total_waits/1024/1024, 0)),0) as "Concurrency",
      3  round(sum(decode(w.wait_class,'System I/O', w.total_waits/1024/1024, 0)),0) as "System I/O",
      4  round(sum(decode(w.wait_class,'User I/O', w.total_waits/1024/1024, 0)),0) as "User I/O",
      5  round(sum(decode(w.wait_class,'Configuration', w.total_waits/1024/1024, 0)),0) as "Configuration",
      6  round(sum(decode(w.wait_class,'Other', w.total_waits/1024/1024, 0)),0) as "Other",
      7  round(sum(decode(w.wait_class,'Commit', w.total_waits/1024/1024, 0)),0) as "Commit",
      8  round(sum(decode(w.wait_class,'Idle', w.total_waits/1024/1024, 0)),0) as "Idle"
      9  from dba_hist_snapshot d, dba_hist_bg_event_summary w
     10  where d.snap_id = w.snap_id
     11  group by to_char(d.begin_interval_time, 'YYYY-MM-DD')
     12  order by to_char(d.begin_interval_time, 'YYYY-MM-DD');
    
    DATENUMBER Concurrency System I/O   User I/O Configuration      Other     Commit       Idle
    ---------- ----------- ---------- ---------- ------------- ---------- ---------- ----------
    2010-02-22           1        298          0             0          2          0       2107
    2010-02-23           1        299          0             0          2          0       2114
    2010-02-24           1        300          0             0          2          0       2121
    2010-02-25           1        301          0             0          2          0       2129
    2010-02-26           1        303          0             0          2          0       2136
    2010-02-27           1        304          0             0          2          0       2143
    2010-02-28           1        305          0             0          2          0       2150
    2010-03-01           0        140          0             0          1          0        988
    

    Max
    http://oracleitalia.WordPress.com

  • Date between two variables

    Hello

    I need to create a report, which Date is between the current Date and the current Date of 365 days.

    I create two variables, Current_Date (select to_char (sysdate, ' dd/mm/yyyy') of the double) and
    Current_Date-365 (Select to_char ((sysdate-365), ' mm/dd/yyyy') of double)

    In the Oracle replies I select column Date and Date filter between above two variables, but I get an error message when I run the report.
    If I remove the filter from the report works very well.

    Is there another way to do this?

    Thank you

    Hello user.

    Add a filter for the date field that you want to restrict (we'll call it TIME. DATE_VALUE for the sake of this exercise).

    In the filter, click on "Advanced > convert this SQL filter '.

    Add this line in your filter SQL (replacing the TIME. DATE_VALUE with your date field):

    Time.DATE_VALUE <= current_date="" and="" time.date_value="">= (SQL_TSI_DAY,-365, CURRENT_DATE) TIMESTAMPADD

    This will give you all the records with your date between the current date and a year ago.

    I hope this helps and please assign points if you found it useful!

    Kind regards
    Jason

  • Call a variable inside a movieClip.

    Hello. I have problems calling my variable score which I attributed within a movieClip. I want to do is when my score reaches my desired value (e.g. 10), I want the congratulations screen to be visible. The congratulations screen is placed in the main timeline. Is there a way I can access the variable I created inside a movieClip?

    I tried to use:

    If (score is 10)

    {

    MovieClip (root).screen_1.visible = true;

    }

    This code snippet is placed in the movieClip where the score of the variable is declared. But it doesn't seem to work.

    I also tried:

    If (.score MovieClip (root) == 1)

    {

    Screen_1.Visible = true;

    }

    This code snippet is placed in the main timeline.  It did not work also. I don't have any errors in this code, but it does not give me the result I wanted. Thank you.

    I guess the congratulations screen is on the same timeline as the code that you have demonstrated.

    in this case, you should use .score MovieClip (root) to the score of reference defined in the main timeline.  In addition, the code must run any score is updated so put this code in a function and call this function each time score is updated.

Maybe you are looking for

  • Aspire drivers VGA Intel V7 - 482PG Error Message

    I raised suspicion that the intel VGA drivers installed cause me a BSOD (which happens when I alt - tab of a video game using the NVIDIA VGA drivers for my deskptop). I'm trying to update the drivers for Intel VGA found here http://us.acer.com/ac/en/

  • "gmail" send text: information retrieve deleted recently?

    When you compose the e-mail message to 'gmail' (running Internet Explorer 8 and Windows XP), how can I recover recently deleted text (for example, cancel, access plates to clip, other?) Reply with detailed suggestions. Thank you.

  • Replace Vista by XP

    Can you please tell me the proper way to replace Vista by XP?  I have some programs more alumni who do not work with Vista.    Please notify.     Thank you.  Michael

  • Computer laptop MSI cannot go beyond the BIOS at startup

    Hello world! I'm trying to fix computer MSI laptop of my roommate (I don't have access to this right now, but I'll post the pattern later) which initializes more. He said he picked up the phone and moved to a different location on his desk before enc

  • When you click on a link to a PDF file on a Web page I want to read = =, no backup

    Since I installed the latest version of the player on my Windows 7 PC, when I click on a link to a PDF file in a Web page I immediately get a save as dialogue box.   The behavior of earlier versions of the player was to open the PDF for on-screen rea