Sum on child nodes based on attribute value in xslt

Hi all,
Any one can post helpful code to calculate the sum of child nodes based on the attribute value of other child node.
Let's say for example.
I have one child element has attribute value let's say Tax so I have to put condition on child element having value of "Tax" I need to calcualte sum of Invoice amount that element is also child node
After calculating sum I have to apply that sum at the header level of the Invoice. For each Invoice I have calculate sum and apply at the header level.

It isn't working :(.Got the following error:
An error was reported compiling the XPath expression: error: XPath expression invalid, not a selection: declare namespace ws = 'http://www.bea.com/wli/sb/transports/ws';
declare namespace tuxedo = 'http://www.bea.com/wli/sb/transports/tuxedo';
declare namespace wsa = 'http://schemas.xmlsoap.org/ws/2004/08/addressing';
declare namespace http = 'http://www.bea.com/wli/sb/transports/http';
declare namespace xsi = 'http://www.w3.org/2001/XMLSchema-instance';
declare namespace wsp = 'http://schemas.xmlsoap.org/ws/2004/09/policy';
declare namespace file = 'http://www.bea.com/wli/sb/transports/file';
declare namespace xsd = 'http://www.w3.org/2001/XMLSchema';
declare namespace soap12-env = 'http://www.w3.org/2003/05/soap-envelope';
declare namespace flow = 'http://www.bea.com/alsb/flow/transport';
declare namespace sftp = 'http://www.bea.com/wli/sb/transports/sftp';
declare namespace sb = 'http://www.bea.com/wli/sb/transports/sb';
declare namespace soap-enc = 'http://schemas.xmlsoap.org/soap/encoding/';
declare namespace ejb = 'http://www.bea.com/wli/sb/transports/ejb';
declare namespace soap-env = 'http://schemas.xmlsoap.org/soap/envelope/';
declare namespace jpd = 'http://www.bea.com/wli/sb/transports/jpd';
declare namespace email = 'http://www.bea.com/wli/sb/transports/email';
declare namespace tp = 'http://www.bea.com/wli/sb/transports';
declare namespace dsp = 'http://www.bea.com/dsp/transport/sb';
declare namespace ctx = 'http://www.bea.com/wli/sb/context';
declare namespace soap12-enc = 'http://www.w3.org/2003/05/soap-encoding';
declare namespace wsu = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd';
declare namespace jms = 'http://www.bea.com/wli/sb/transports/jms';
declare namespace ftp = 'http://www.bea.com/wli/sb/transports/ftp';
fn:string(./xml-fragment/@IntObjectName).

Similar Messages

  • Is it possible to regroup data based on attribute value of a tag?

    is it possible to regroup data based on attribute value of a tag?

    Hi Rajeev,
    You can filter records during import if one of the Matching field is of type Lookup.
    In your case if you create City as flat lookup table in MDM & maintain lookup values in DM(Just as an example), then you can import only records where city is HYD.
    Map Name & City, Then in Match Records tab select both the fields (Combination)
    then right click on it & select Filter.. option.
    Now new pop up will open where you be able to see ur Lookup table values, from there select HYD and Add
    Now in default Import Action, set Create Action for None/None (All other will be skip)
    This way you will import only HYD records.
    But this is possible only on Lookup fields & not foe Text fields
    Hope this will help you
    Thanks & Regards,
    Mahi

  • Invoke different Summary Screen based on attribute value

    Hi Experts,
    I have a requirement to show different OPA landing summary page based on attribute value received from Siebel application. Is that possible?
    For e.g.: Create 2 summary screen
    Siebel field value opa_attr1 = A or B, if A I want to display summary screen 1 otherwise display summary screen 2.
    Thanks,
    Vinay

    Thanks you for your reply. The link is not what I want. My case is that I already have a map stored in Oracle database under obiee_navteq schema. I want to use OBIEE to display map by adding different image/icon at different cities based on the value of an attribute column. All the examples I can find is to use measure column as an condition, not by attribute column.
    Thanks

  • Change a attribute value with XSLT before importing an XML

    I need change the attribute value with XSLT before importing an XML
    <table class="x" style="width="50pt">...
    I have to divide by 200 the value of "width", and the result multiplied by 100:
    (50/200) * 100
    It's possible with a XLST?

    Hi,
    Yes you can do this via XSLT.
    You can try similar to the one below:
    <table>
       <xsl:attribute name="width">
         <xsl:value-of select="((./width) div 200)*(100)" />
       </xsl:attribute>
    </table>
    I have not tested yet... Try it....
    Green4ever
    (I am back after long time)....

  • Multiple keyfigure from different planning area based on attribute value

    Multiple keyfigure from different planning area based on the attribute value of Cost element charac.
    I need to obtain the value of the attribute in a fox function. Let me explain it further.
    Background :
    Planning area -
    Charac----
    KF
    area1 -
    Payscale group--- Amount
    Cost element------AmountVR
    area2--Payscalegroup----KF1
    KF2
    KF3
    Cost Element has an attribute "Type"
    Value for attribute "Type" = 1,2,3
    Based on the value of the attribute, the corresponding KF needs to be multiplied.
    Logic :
    If type = 1.
    AmountVR = Amount * KF1.
    elseif type = 2.
    AmountVR = Amount * KF2.
    elseif type = 3.
    AmountVR = Amount * KF3.
    endif.
    The problem I'm facing is that I'm not able to read the data of attribute "Type". None of the below statement retrieve the value of the "Type".
    TYPE = ATRV(Attribute,COSTELEMENT,CO_AREA)
    or
    TYPE = ATRV(Attribute,COSTELEMENT)
    Could you please help me in reading from a time dependent compounding InfoObject?
    Regards,
    Raghu

    Hi..
    Thanx Bindu..
    I have actual data for Month days..if i am craeting in same layout it is too large.
    that's why i am creating two layouts.
    below example for better undersatnding.
    Actual:
    D1 :D2: D3  :D4 : D5  :D6 : D7   :  FULLACT (sume of C(1)  sum of d1 to d7))
    10  :8  :12 :  10 : 14   : 6  : 10    :  70     
    Plan:
    D1EST : D2EST: D3EST :D4EST :D5EST: D6EST: D7EST:  FULLEST (sum of d1 to d7)
    10         :10        :  10      :  10      :10       :    10    :     10  :         70
    How can i read FULLACT value and that value i have to distribute  equally in planing layout and always FULLEST is equal to FULLACT.if not equal i have to throug error message hoe can i setup if you have sample code can you send it to me.
    what is your idea....
    Edited by: Eyda rose on Jun 4, 2008 4:59 PM

  • Get element based on attribute value

    Hi,
    I need to locate an element based on its unique
    attribute value. There are lots of elements in the
    hierarchy, I only show relavant ones here.
    code:
    <myElement myAttribute="attValue">
    <childElement>child value</childElement>
    </myElement>
    If "attValue" is unique for all elements, and I want to
    locate myElement and then get childElement value.
    I did the following, but it does not work:
    <xsl:value-of select="//*[myAttribute='attValue']/childElement"/>
    Could any one see what I did wrong?
    regards,

    Thanks for spotting the error. I was too careless.
    What if I want to use a xsl:variable to do the testing, can I do the following:
    <xsl:variable name="uniqueAttValue" <xsl:value-of select="..."/></xsl:variable>
    <xsl:value-of select="//*[@myAttribute={$uniqueAttValue}]/childElement"/>
    I used either {$uniqueAttValue} or '{$uniqueAttValue}', but neither works.

  • How to create xml nodes based on a value

    Dear friends,
    I've a question about graphical mapping in SAP PI...
    How can I create XML nodes on the target side based on a value in a XML field on the source side.
    For example:
    This XML field on the source:
    <NO_OF_LINES>4</NO_OF_LINES>
    Must result on 4 Lines on the Target:
    <LINE></LINES>
    <LINE></LINES>
    <LINE></LINES>
    <LINE></LINES>
    So it's actually the opposite of the Count function...
    I appreciate your help,
    Thank you in Advance,
    Kind regards,
    John

    Hi ,
    Try this
    NO_OF_LINES---> count---> UDF---> LINE
    example :
    UDF Code :
    for (int i=0;i<var1[0];i++)
    result.addValue("");

  • Disabling a button based on attribute value

    Hi,
    I have written a function in ViewObjectImpl. I need to call it on a specific condition,that is, if a particular value for an attribute doesn't exist in the table. How can I achieve this?
    Thanks & Regards

    Hi,
    There are couple ways to achieve this.
    1. Enable the button only when there is a specific value exist in table.
    You can write a method in your impl, that check if there are any matching rows in table and return true or false. Bind the disabled property to an attribute in your backing bean, execute the impl method in backing bean and let the property (which you bound to the disabled property of the button) hold the return value (true or false). Call this method appropriately based on your need.
    2. Execute the method always and check the matching row in button.
    In the impl method itself, you can check the table if the matching rows exist or not. If exists, then continue the execution of the method, else do nothing.
    -Arun

  • Join  a Parent Table with 2 Child table based on a value

    Dear Guru's
    We have a Parent Table and 2 Child table . The Parent Table has a column like seqtype with only 2 possible values C and S . If the Value is C , then the details are available in Child 1 table and if the Value is S then the Details are in Child 2 table
    How can we query the Data from this type of arrangement ? I am little bit confused and hit a road block
    Will the following query will work ?
    Select
    from Parent P , Child C1, Child C2
    where P.seqtype = C1.Seqtype
    and P.seqtype = C2.Seqtype
    With Warm Regards
    ssr

    You didn't mention the column names in two child tables. Whether the columns are same in 2 tables of these are different.
    If the columns are same better to go and change your design to have only one child table. However if stiil business stops you having one table you can use UNION ALL (Assuming you want to fetch same column information from two child tables) like below:
    SELECT p.col1
          ,c1.col2
          ,c1.col3
          ,c1.col4
      FROM parent     p
          ,child      c1
    WHERE p.seqtype = c1.seqtype
    UNION ALL
    SELECT p.col1
          ,c2.col2
          ,c2.col3
          ,c2.col4
      FROM parent     p
          ,child      c2
    WHERE p.seqtype = c2.seqtype Regards
    Arun

  • Using jQuery to hide a button (wrapped in td tag) based on attribute value (name in this case)

    I have simulated what I'm trying to do here:
    http://jsfiddle.net/dayjuuk5/
    Let me know if you can't see it for any reason.
    My question- I'm not sure I understand why this method of hiding this td tag doesn't work. I'm looking for a way to hide this button on page load (not click driven).
    Thank you for your time.
    Samir

    Hi Samir,
    Thanks for your sharing.
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • Need to chart attribute value of just one child node of XML document

    I have a XML document with (for example) 7 parent nodes, each
    parent node has 5 child nodes. The parent nodes have an attribute
    @EarlierDTS (DateTime type) that is the x-axis category of a chart.
    Each child node has an attribute @eventid which specifies the id of
    the event, and another atttribute @NumOccurs which specifies how
    many times that event occured in that period.
    How do I tell Flex I want a simple line chart of the eventID
    = 215? What if I want two lines, for both eventID=215 and
    eventid=307?
    I have studied the posts and blogs for over a week now, and
    have seen this question or similar come up quite a few places, with
    no answer.
    1) Should I focus on learning how to create a filterfunction
    for the XMLList that underlies my XMLListCollection so that the
    filtered data view is just one child node per parent node ( or two
    child nodes for the second case)? And set the filtered data view as
    the dataprovider of my chart's vertical series?
    2) Should I focus on learning how to create a XML Filter
    query that selects just one or two child nodes for each parent
    node, and set the charts' series' dataprovider to this filter
    expression? (I don't think this is allowed - but I'm checking with
    the forum members...)
    3) Should I focus on learning how to convert the
    XMLListCollection into a HierarchicalData object, and then learning
    how to filter this object so there is only one (or two) childs per
    parent? This seems like a lot of coding - I almost have to create a
    pair of classes - one for the parent and one for the child - so I
    can create nested ArrayObjects.
    4) Should I create a brand new XMLList by walking the
    original XML list, and inserting Parent nodes and just the child
    nodes that match the eventID(s) I want to chart, into the new
    XMLList?
    I believe that the easiest way would be to create a
    Filterfunction for the XMLList, and bind the chart series to the
    (filtered) XML List. But the problem with this approach is that I
    have seen more than 2 posts asking how to accomplish filtering that
    removes specific children from the view, with no solutions posted.
    Help! What is the best way to get just one child for each
    parent, from an XMLList?

    "whertzing" <[email protected]> wrote in
    message
    news:[email protected]...
    >I have a XML document with (for example) 7 parent nodes,
    each parent node
    >has 5
    > child nodes. The parent nodes have an attribute
    @EarlierDTS (DateTime
    > type)
    > that is the x-axis category of a chart. Each child node
    has an attribute
    > @eventid which specifies the id of the event, and
    another atttribute
    > @NumOccurs
    > which specifies how many times that event occured in
    that period.
    >
    > How do I tell Flex I want a simple line chart of the
    eventID = 215? What
    > if I
    > want two lines, for both eventID=215 and eventid=307?
    >
    > I have studied the posts and blogs for over a week now,
    and have seen this
    > question or similar come up quite a few places, with no
    answer.
    >
    > 1) Should I focus on learning how to create a
    filterfunction for the
    > XMLList
    > that underlies my XMLListCollection so that the filtered
    data view is just
    > one
    > child node per parent node ( or two child nodes for the
    second case)? And
    > set
    > the filtered data view as the dataprovider of my chart's
    vertical series?
    >
    > 2) Should I focus on learning how to create a XML Filter
    query that
    > selects
    > just one or two child nodes for each parent node, and
    set the charts'
    > series'
    > dataprovider to this filter expression? (I don't think
    this is allowed -
    > but
    > I'm checking with the forum members...)
    >
    > 3) Should I focus on learning how to convert the
    XMLListCollection into a
    > HierarchicalData object, and then learning how to filter
    this object so
    > there
    > is only one (or two) childs per parent? This seems like
    a lot of coding -
    > I
    > almost have to create a pair of classes - one for the
    parent and one for
    > the
    > child - so I can create nested ArrayObjects.
    >
    > 4) Should I create a brand new XMLList by walking the
    original XML list,
    > and
    > inserting Parent nodes and just the child nodes that
    match the eventID(s)
    > I
    > want to chart, into the new XMLList?
    >
    > I believe that the easiest way would be to create a
    Filterfunction for the
    > XMLList, and bind the chart series to the (filtered) XML
    List. But the
    > problem
    > with this approach is that I have seen more than 2 posts
    asking how to
    > accomplish filtering that removes specific children from
    the view, with no
    > solutions posted.
    >
    > Help! What is the best way to get just one child for
    each parent, from an
    > XMLList?
    I'd just look at a dataFunction. There's an example here that
    may point you
    in the right direction:
    http://flexdiary.blogspot.com/2008/08/charting-example.html
    HTH;
    Amy

  • XSD Validation based on attribute type value

    Hi,
    Can any one tell me how to validate xml element value based on attribute value.
    Ex:-
    my xml has the elements like this.
    <channel>
    <meta type="VideoTitle">Harding Park Golf Club</meta>
    <meta type="ReleaseDate">Wed, 03 Jan 2018 15:00:00 GMT</meta> </channel> I want to validate the xml based on meta type value using xsd. For "VideoTitle" i would like check for String type and for ReleaseDate" i want to check for date format. Thanks, Raj

    Try the below statement in “Competitor Lost To” picklist (IndexedPick2)
    IIf (([<ReasonWonLost>] = 'Lost to Competition' AND [<IndexedPick2>] IS NULL), N, [<IndexedPick2>])
    after you enter this do sign out and then sign in, then check
    PS: You need not change it to lookupvalue, the above statement will work as it is

  • How do I format based on the value of the @status attribute?

    Example: I use the @status attribute to indicate that a step in a procedure is new or that a paragraph in a concept is new.
    For review purposes, I want to format new text as green - preferably a green highlight, but green text will do.
    Example: I use the @status attribute to indicate that a step in a procedure has been deleted or that a paragraph in a concept has been deleted.
    For review purposes, I want to format new text as crossed out.
    Can this be done? If so, where do I set up the formatting for attribute values?
    Thanks in advance.
    Marsha

    Hi Marsha,
    If you want the formatting to be "locked in," that is, driven by the EDD, then Lynne's advice is the way to go. If instead it would be sufficient to temporarily color the desired elements as a format override, you could use the AXCM plugin:
    http://www.weststreetconsulting.com/WSC_AXCM.htm
    This plugin can do any nature of coloring, strikethrough, etc. based on attribute values and other markup. The coloring is applied as a format override and easily removed by a refresh of the EDD. The coloring features were mainly designed for conditional text purposes, but it would work in this case too.
    AXCM is completely free. Disclaimer... I own West Street Consulting and this plugin.
    Russ

  • Filter master rows based on attributes in detail view.

    Hi,
    How do I set up VO's so that I can:
    1. filter master records based on attribute values in either the detail or master attribute values.
    and
    2. display each distinct master record with all its associated detail records.
    Stated another way, I want to list all the master records (with their associated detail records) filtered by the existence of qualifying detail records -- give me all departments which have assigned one or more employees who meet some criteria; list the departments and ALL the dept.'s employees (regardless of whether they individually meet the criteria).
    We've been struggling with this for a couple of weeks. I've been trying to accomplish this on 10.1.2, 9.0.5.2 and 9.0.3.3 with pretty much the same results on all three versions.
    To make queries based on values in either the master or detail records we created a database view that denormalizes the tables. This let's us include criteria based on either the master or detail tables, but of course rows from the master table may appear multiple times. We tried a DBMS global temporary table, but the inserted rows were not visible to the client; I'm assuming they're discarded with the session between queries or the queries establish separate sessions. I tried marking only the master record columns as selected and queriable and the detail columns as just queriable, but this causes the detail columns to be defined as transient VO attributes.
    TIA, for ideas or guidance.

    Hi,
    How do I set up VO's so that I can:
    1. filter master records based on attribute values in either the detail or master attribute values.
    and
    2. display each distinct master record with all its associated detail records.
    Stated another way, I want to list all the master records (with their associated detail records) filtered by the existence of qualifying detail records -- give me all departments which have assigned one or more employees who meet some criteria; list the departments and ALL the dept.'s employees (regardless of whether they individually meet the criteria).
    We've been struggling with this for a couple of weeks. I've been trying to accomplish this on 10.1.2, 9.0.5.2 and 9.0.3.3 with pretty much the same results on all three versions.
    To make queries based on values in either the master or detail records we created a database view that denormalizes the tables. This let's us include criteria based on either the master or detail tables, but of course rows from the master table may appear multiple times. We tried a DBMS global temporary table, but the inserted rows were not visible to the client; I'm assuming they're discarded with the session between queries or the queries establish separate sessions. I tried marking only the master record columns as selected and queriable and the detail columns as just queriable, but this causes the detail columns to be defined as transient VO attributes.
    TIA, for ideas or guidance.

  • How to open child node in Tree control?

    Hi All,
    I am using arrayCollection in my tree control.
    I want to open one child node based on name of that node.
    How to open that chid node?
    I tried tree.OpenItems and ExpandItem methods. IT is not working. Any idea how to do it?

    write this statement
    TreeObject.expandItem("the branch",true)
    But make sure you dont call this statement right after you set the dataProvider for the tree object. Instead wait for a second or two and then call this statement. This delay is allow the tree object ot call it validate functions.
    Let me know if it helps

Maybe you are looking for

  • New Flash card for UC 520

    Hi - I have a UC 520 that is being RMA-ed. I'd like to move the existing flash card from the old unit to the new unit. When I do this, and run a show ver, I see: License Info: License UDI: Device#   PID                   SN *0        UC520W-8U-4FXO-K

  • Use of Application Integrator in Portal 7.01

    Hi Experts, I want to use Application Integrator in Portal System of version 7.01. My scenario is to integrate SAP Service Market Place URL specific to download SAP Notes to functional Users in their SAP Portal account. I know that by using SAP URL i

  • TS2755 Can't get Netflix to load & videos on facebook,what am I doing wrong?

    I have been trying for 2 days to get my iPad 2 to stream video from Netflix & facebook & all it does is sit there & load or spin someone please tell me how to fix?

  • Weird Gnome issue

    After upgrading and rebooting, the taskbar has changed so that there are all these huge icons in the top right corner. Clicking them doesn't do anything. Does anybody know how to fix this?

  • Table containing performance tab

    Hi All, I want see the table that contain information of index of cube are active or not ? Table containing information about performance tab .