XML Data ( View Total exist in a different query)

Hi,
This is a sample of my xml data :
<TEST_COMP>
- <LIST_G_Q1>
- <G_Q1>
  <Q1_ITEM_ID>61</Q1_ITEM_ID>
  <TOT>13754492</TOT> 
  </G_Q1>
- <G_Q1>
  <Q1_ITEM_ID>62</Q1_ITEM_ID>
  <TOT>1199366</TOT>
  </G_Q1>
- <G_Q1>
  <Q1_ITEM_ID>63</Q1_ITEM_ID>
  <TOT>20886715</TOT>
  </G_Q1>
</LIST_Q1>
- <LIST_G_ALL_LIST>
<G_ALL_ITEMS>
  <ITEML_ID>68</ITEM_ID>
  <ITEM_NAME>ITEM NAME 1</ITEM_NAME>
  </G_ALL_ITEMS>
- <G_ALL_ITEMS>
  <ITEM_ID>69</ITEM_ID>
  <ITEM_NAME>ITEM NAME 2</ITEM_NAME>
  </G_ALL_ITEMS>
</LIST_G_ALL_LIST>
</TEST_COMP>I do insert a table that display the data in the LIST_G_ALL_LIST, i need to insert one more column that read the total value of the same item exist in the LIST_G_Q1..
I wrote the following in the new column:
<?for-each:G_Q1?><?if: Q1_ITEM_ID=ITEM_ID?><?TOT?><?end if?><?end for-each?>What i got is a blank cloumn whatever the item id was even if there is a total in the Q1
Would you please help
Hope that my problem is clear enough!
Thanks a lot

I tried using variables...
I rest my variable (in G_ALL_ITEMS) using
<?xdoxslt:set_variable($_XDOCTX, 'x', ITEM_ID)?>Then i tried to recall it in my if condition ( inside G_Q1)
<?if: Q1_ITEM_ID=xdoxslt:get_variable($_XDOCTX, 'x')?>it still give me a blank cloumn!!

Similar Messages

  • Insert XML Data Into An Existing PDF Form

    I am working on an application, written with XHTML and JavaScript, and running on AIR, so it is a desktop application.
    Users enter data into an XHTML form and upon submission I create an XML file of the data using JavaScript.
    At any later time users will be able to open the XML file from the application. I will use JavaScript, again, to read the XML and fill in an XHTML form. But at this point I will provide a button for users to generate a PDF with the data. I would then like to insert the XML data into the appropriate fields of the existing PDF form. I would like to continue to do this from within the AIR application using JavaScript.
    Is this possible?
    What version of Acrobat would I need as the developer? Professional or Standard or Other or None?
    What version of Acrobat would the end users need? Professional or Standard or Other or None?
    Can this all be done using only JavaScript and the Acrobat SDK? Does using AIR offer any help (all Adobe products)?
    When the end user clicks the generate PDF button would Acrobat have to open? Can this be done without the user seeing Acrobat open? Either way is ok, I would just like the user to see an alert saying that the file has be generated and point them to its location on the local machine. But again, this is not a requirement.
    Thanks in advance.
    Not asking for source code here, just if its possible. :)
    I'll figure out the how.

    You have two choices
    1) You can use JavaScript in your AIR application to communicate with the JavaScript in the PDF to fill in the form directly. This can all be done inside of your AIR app. This is certainly the best route to go and there is (IIRC) a sample in the AIR SDK.
    2) You can create an XFDF file from your XML data and then have Acrobat/Reader open the XFDF file to fill in the data.
    Both methods will work with Acrobat and Reader - HOWEVER, Reader users won't be able to save the PDF unless it has been Reader Enabled.
    Leonard

  • XML Data Load into releational structures

    Hi,
    I am very unexperienced in using XML and have the problem
    to import very large XML data files into existing reletional structures.
    In our production DB we don't use the java engine, so
    that PL/SQL an the SQL Loader are the only available ways to import the data.
    At the moment we get flat files and use the SQL Loader utility. But an interface to a new system send XML data now and I have to fill the same old releational structure with the new data.
    Can anybody give me a hint about the best technic for an high performance import. Are there any existing tools for the relational mapping?
    Regards Ralph

    Thank you for your reply.
    You are right. We only want to break the XML to fill our relational structures. We don't need the XML data further on. But we have to load the data in temporary structures, because we have to transform the data in our own format. (The system which delivers the XML data is external and uses another data model)
    Is there no more elegant way with use of databse built in technics? The XML data we get can be validated against a XML schema.
    So I thought, it could be a way to load the XML in the XDB and register the schema in the database. After that store the XML data in the default generated object relational structures and then programm the data transformation and the data flow between these default structures to our target data structures with PL/SQL.
    I don't know if this way is performant enough.
    If I use an external tool i have to code the relational mapping outside the database and insert the data with use of ODBC in temporary structures which i have to create manualy.
    So I hoped to find a way to load the data in any relational structure using the advantages of XML and XML schema and code the neccasary logic inside the DB.
    Do you have any further hints for my problem?
    Regards Ralph

  • Advantages Of XML Type Views

    Hi Every one,
    I am pretty new to XML Type views, and just want to ask few questions to every one. May be they do or don't belong here.. but help me out...
    1. What are the advantages of XML Type Views?
    2. Why should I prefer to use XML Type Views? (Is it only for querying the relational or XML data and result in XML format?)
    3. I have a scenario, here I would like to develop a web service which would ultimately call a stored procedure to get relational data. Something like a DAL(Data Access Layer). In this scenario, what are the advantages that I am able to benefit if I use XML Type view with out using the regular stored procedures, which would give relational data(Not in XML format).

    1) To define views that output relational data or object relational data in a XML format
    2) You give the database more info regarding abouts its XML output / design via XML Schema and or inview defined integers so Oracle is capable to optimize the generation of its XML output
    3) Don't over do it. The functionality called Native Database Web Services (NDWS) is already providing this for you natively in Oracle 11g and onwards.
    Edited by: Marco Gralike on Jul 14, 2010 9:04 PM

  • Planning book: Data views

    Hello:
    I am defining a planning book and I want to have the same data views (total demands and total receipts) of standard pl.book 9ASNP94, data view SNP94(1), can anyone help me design this.
    My planning area is a copy of 9ASNP02.
    Thanks in advance.
    Mono

    hi Harish:
    I have create a planning area which is identical to 9ASNP02 for my pl.book except the unit of measure (EA for ST), and when I try as you said I get a message stating that <b>The planning area of planning books 9ASNP94 and Z_mono (my pl.book) is not identical</b>.
    Any other way?
    Thank you
    Mono

  • UCCX script to pull XML data

    Hello,
    My goal is to create a UCCX script that will run on a Standard license server. Basically, when a user dials a four digit "speed dial", I want them to be translated to a UCCX route point, that will take the original called number, and the calling number, and use that to create a URL that it will then query and retrieve the actual number that will need to be dialed.
    So my plan currently is to have a phone inside of a partition that has a translation pattern of XXXX. The called number gets translated to 1158, which is the trigger of the application on UCCX.
    The url I want to query will be something like this:
    http://localhost:35798/RestServiceImpl.svc/XML/1017/6314
    "Localhost" will eventually become the IP address of the server hosting IIS application that will provide the XML output. 1017 is the "speed dial" or the original called number, 6314 is the calling number.
    Going to that URL should return me this output:
    <XMLDataResponse xmlns="http://tempuri.org/">
      <XMLDataResult>
      <CallingXML>
      <Extension>6300</Extension>
      <SpeedDial>1001</SpeedDial>
      <PhoneNumber>918005551212</PhoneNumber>
      </CallingXML>
      </XMLDataResult>
    </XMLDataResponse>
    This is the script as I have written it out so far:
    It does not seem to like what I have put together thus far when I try to validate it. I'm just wondering if I'm doing something that's obviously wrong.
    The end goal will be to take the NewNumber and dial it, while hiding it from the phone.
    Thanks,
    Mark

    Here's an update: I have the script retrieving the correct numbers and formulating the URL correctly. It also appears to be delivering the query from the XML.
    Here's what the XML looks like when I hit it from my browser:
    http://tempuri.org/
    ">
      http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">63141017918003551111
    When I do an Interactive Script Debug session and dial the number, I can see that there are two problems: 1) the NewNumber string is "null" by the time it gets to the step to do a Call Consult Transfer, and 2) the script just shows up a blank Exception.
    This tells me I am not parsing the XML correctly.
    Here is what I have currently:
    NewNumber = Get XML Data (xml, "/descendant::XMLDataResponse/child::XMLDataResult/child::PhoneNumber")
    Which based upon what I've read in Cisco's Volume 2 and elsewhere, should be correct.
    Notice in the screenshot that the XML data that UCCX pulls in looks different from when I look at it from my browser. I've also attached the script.
    Thanks,
    Mark

  • How to merge XML-Data of two variables of different namespace?

    Hi all,
    I am facing a problem manipulating XML data in a BPEL process. As I didn't get any response on my question in the BPEL forum, I decided to post it again in this forum. I am not very familiar with using XML up to this moment, so please don't blame me if this turns out to be a stupid question.
    I have to combine information coming from 2 different sources (1st delivered by BPEL-client input "FileInfo", 2nd delivered by a ftp-adapter "FileData") for passing it to another service.
    So there are 3 XSDs (2 in, 1 out), each with a different namespace. As every structure is composed of several elements, I don't want to copy them one by one. But when copying a whole node including child elements, the target structure yields empty nodes, because the target child elements maintain the source namespace!
    Using 2 XSLT's works well for each input, but in combination, the last transformation deletes the information of the first one.
    So, the only way to merge the data I figured out by now, is to use a XSLT for each input, transforming it into 2 separate Variables belonging to the same namespace and then copying the complete nodes of the two variables into the target (which of course belongs to the common namespace as well).
    Although there is an inconsistent indexing of the namespaces (see example), happily all data can be accessed.
      <CommonData>
        <CommonData xmlns="http://TargetNamespace.com/CommonData">
          <FileInfo xmlns="http://TargetNamespace.com/CommonData">
            <Name>testfile2.txt</Name>
            <Size/>
            <DateReceived>2009-02-10T17:15:46+01:00</DateReceived>
          </FileInfo>
          <FileData xmlns:ns0="http://TargetNamespace.com/CommonData">
            <ns0:KOPF>
              <ns0:Id>1</ns0:Id>
              <ns0:Value>1</ns0:Value>
              <ns0:Text>Hier könnten Ihre Daten stehen -</ns0:Text>
            </ns0:KOPF>
            <ns0:POSI>
              <ns0:Id>1</ns0:Id>
              <ns0:Position>1</ns0:Position>
              <ns0:Value>1</ns0:Value>
              <ns0:Text>eins ----</ns0:Text>
            </ns0:POSI>
            <ns0:POSI>
              <ns0:Id>2</ns0:Id>
              <ns0:Position>2</ns0:Position>
              <ns0:Value>2</ns0:Value>
              <ns0:Text>zwei ----</ns0:Text>
            </ns0:POSI>
          </FileData>
        </CommonData>
      </CommonData>Now for the question:
    Is this really the only way to merge variables? As it took 4 operations to achieve this, it seems to be too complicated, and therefore too inperformant to me.
    BTW: In real life there would be up to 9999 positions with much more payload (in total up to several MBs) to be processed!
    Having full control of the namespaces in this case, I could think of using one namespace for all XSDs too. But would this be a better solution? Is there a golden rule on using namespaces relating to design issues?
    Any comments appreciated,
    cheers, Marco

    Well, if you only want to change namespace (no other changes) I would use a single generic XSL that changes the namespace for any XML document into a given target namespace, keeping the rest. That will require two transformation calls, but only one XSL. I'm afraid I don't have an example available, but if you google perhaps you can find it, I have seen it somewhere.
    Normally when you have different namespaces the contents differ as well, though, and what you really want is a merge function. There is a way to pass two documents into a single XSL and that is to use parameters. You pass one source document the normal way and assign the other converted to a string to a paramter. You must use an assign with processXSLT in BPEL, not a transform activity. The processXSLT really takes three arguments and the third contains the parameters. Now to the difficulty - in the transformation you need to change the string into a nodeset (an XML document). In the current XPath version used by the platform there is no nodeSet function, but it is possible to write one in Java. If you have it you can select from both documents while building the third. I don't have an example handy and yes it is a bit messy as well, but much of the work only has to be done once and can be reused in other processes.

  • How can I affix Data to a existing XML file?

    Hallo.
    I have to write Data to an XML file. This I have to in a stacked Sequence within a while loop. How can I write my Data to my existing XML file without overwriting my existing Data from the loop before?
    Thanks

    I made the erroneous assumption that you were using your own XML creation code.  The LabVIEW write to XML file VI overwrites the file every time.  You can get around this behavior in  a couple of ways.
    Create your own write to XML VIs using the LabVIEW one as your base.  The LabVIEW one write a header, writes your data, then writes the end tag.  Split this up so that you open the file and write the header before your loop.  During the loop, write your data.  Write the end tag and close the file when you exit the loop.  Don't overwrite the LabVIEW vi.lib function, or you will probably regret it.  Copy it to a different location before you start your modifications.
    Use the LabVIEW write to XML file for the first write of the loop.  This will give you a file with a header and your first set of data.  Still in the first loop iteration, reopen the file and position the file pointer on the start of the end tag (</LVData>).  In subsequent loop operations, flatten your data to XML and write to the file directly using the file write primitive.  When you exit your loop, write an end-of-line character and the end tag "</LVData>" and close the file.
    If you need more detailed help on either of the above methods, let me know.
    Out of curiosity, why are you saving your data as XML?  There may be a better way to do it, depending on your application.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • Not able to view XML data

    Hello All,
    I want to generate xml data file from sql query.So i created a new report and new data model whose type is SQL query and following is the query
    select p.name as name,s.size_desc as sizes,sum(f.quantity) as quantity
    from s_article_poc14073 p,s_size_poc14073 s,s_factsize_poc14073 f
    where p.id = f.prod_id and s.size_id = f.size_id and p.id > 4
    group by p.name,s.size_desc
    order by 1
    I have not given any Layout and when i view the data ,i get only the folowing
    <?xml version="1.0" encoding="UTF-8" ?>
    <ROWSET />
    Therez no error with the sql query ,any help on this please
    Thanks in advance
    Sulakshana

    Hi,
    Yes my query returns rows when i run directly from the backend.
    I have not defined any layout,because i just want the data to be generated as a xml file.
    Thanks
    Sulakshana

  • How fetch data from a view(which is located in different server) using Oracle APEX webservices

    Hi,
    I have a requirement to fetch the view data from client instance(which is different server) to another instance lets say Development instance
    Requirement:
    Need to get the Apps View data from the Desired EBS instance(which is accessible online) using webservices,and display it in the Oracle Apex Development Instance.
    Kindly provide your inputs how to achieve this.
    Thanks in advance
    keerty

    Are you getting an error? The way you have it set up, you can have an error and it will never be displayed. Put and error control on your front panel and see what it gives you. Also, shared variables in a project can be useful. Look at some examples for that.

  • How to bind data from script created variable to embed element of XML schema (xsd) in "Data View"

    Hi, i have got another problem with livecycle designer scripting.
    I have got script line which is defining of string variable:
    var aaa = "this is my string";
    and i have got embed XML schema like this (it`s only short part of whole file):
    ... xs:element name="bbb" type="xs:string"/ ...
    After saving data to XML i would like to get "this is my string" as a value of my "bbb" XML element.
    To save this data i`m using submit button which is connect with submit.php file on my server.
    How to connect script created variable and embed XML schema element which is present on my "Data View" tab.
    Please help me a bit becouse i don`t know even where to search answer of it...
    Of course i know possibilities to create fake unvisible text field object and bind it with 'bbb' and than put "this.rawValue = aaa" to connect those two variables but i think that is not a good idea to solve it in that way. It`s too primitive

    i solve it, i should write this:
    xfa.datasets.data.bbb.value = aaa;

  • Compiling Error While Viewing XML Data in Word

    I received the following message, "Compile error in hidden module: Module_starter" while trying to load sample xml data to view within MS Word while using BI Publisher. Any ideas of what causes this and how to fix it would be greatly appreciated.
    Thanks.
    G. Wright

    Getting this error as well.
    I've read the announcement from Tim, and also the Metalink article: Note:457235.1
    However, our desktops at work are locked down to such an extent that I don't have an 'all programs' entry on my start menu.
    I tried what I thought might be the 'Template Builder for Word Language' executable but that also gave me an error (changeUILang.exe).
    Error is: Runtime error '9'. Subscript out of range.
    Could someone please confirm what the shortcut:
    "All Programs --> Oracle BI Publisher Desktop --> Template Builder for Word Language "
    actually points to.
    As to the other option (uninstalling the security patch) this is just a non-starter where I work.
    Thanks for your help,
    Ben

  • IXML - Checking if a specific node exists in XML data

    Hi,
    I´m reading XML data by using iXML classes. One XML file I´m reading contains header and
    item data.
    Right now I´m starting with reading the header attributes and then read all nested nodes and their attribute data. That works all fine, but now I had the error, that the XML file wrongly didn´t contain the items.
    My XML reading method then ended up in a dump because the node was null:
    l_node = l_iterator->get_next( ).
    Can anybody give me an advice, how to check at the beginning of reading my xml data, if a specific node (in my case the node for items) exists in the XML data? If not, I want to stop with an error message. I want to check that at the beginning, before reading all element data, to keep my method structured.
    Thank you very much!

    Hi,
    You can create a filter and set that filter to the iterator. If this is done the iterator returns you only the node with a specific node name or node ID.
    You can also check the parsing in the following WIKI code gallery
    https://wiki.sdn.sap.com/wiki/x/JoDmAQ
    Subroutines create_set_filter_attribute and parse_xml_file would be helpful.

  • Planning Book Macro which can read different key figures from data views

    Hi Experts,
    I am looking for help to create a Planning book level macro which is having capabilities to read different Key Figure across the different Data Views. For example DataView 1 has Sales Orders and Data view 2 has Forecast and I want put in Data view 3 the netted numbers from SO and Forecast.
    Please provide me some quick pointers.
    Regards,
    Rahul Mohnot

    Hi,
    Not only is it the easiest way, it is the only way to do it as Laurence has put it. As you can see, macro workbooks are created for a Planning Book/Dataview combination.
    Thanks
    Mani

  • XmlDataProvider .... is gone completely in my Xaml file. Why? How many different ways to deal with xml data source through WPF

    I followed a procedure described in a book.
    1. insert "Inventory.xml" file to a project "WpfXmlDataBinding" .
    2. add the XML data source through the data panel of "blend for 2013", named it "InventoryXmlDataStore" and store it in the current document.
    3. dragged and droppped the nodes from the Data panel onto the artboard.
    Then I checked my Xaml file against the one provided by the book
    Xaml file by the book:
    <Window.Resources>
    <!-- This part is missing in my xaml file --><XmlDataProvider x:Key="InventoryDataSource"
    Source="\Inventory.xml"
    d:IsDataSource="True"/>
    <!-- This part is missing in my xaml file -->
    <DataTemplate x:Key="ProductTemplate">
    <StackPanel>
    <TextBlock Text="{Binding XPath=@ProductID}"/>
    <TextBlock Text="{Binding XPath=Cost}"/>
    <TextBlock Text="{Binding XPath=Description}"/>
    <CheckBox IsChecked="{Binding XPath=HotItem}"/>
    <TextBlock Text="{Binding XPath=Name}"/>
    </StackPanel>
    </DataTemplate>
    </Window.Resources>
    <Grid>
    <ListBox HorizontalAlignment="Left"
    ItemTemplate="{DynamicResource ProductTemplate}"
    ItemsSource="{Binding XPath=/Inventory/Product}"
    Margin="89,65,0,77" Width="200"/>
    </Grid>
    my Xaml file:
    <Window x:Class="WpfXmlDataBinding.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Height="922" Width="874">
    <Window.Resources>
    <DataTemplate x:Key="ProductTemplate">
    <StackPanel>
    <TextBlock Text="{Binding XPath=@ProductID}"/>
    <TextBlock Text="{Binding XPath=Cost}"/>
    <TextBlock Text="{Binding XPath=Description}"/>
    <CheckBox IsChecked="{Binding XPath=HotItem}"/>
    <TextBlock Text="{Binding XPath=Name}"/>
    </StackPanel>
    </DataTemplate>
    </Window.Resources>
    <Grid DataContext="{Binding Source={StaticResource InventoryXmlDataStore}}">
    <ListBox HorizontalAlignment="Left" Height="370"
    ItemTemplate="{DynamicResource ProductTemplate}"
    ItemsSource="{Binding XPath=/Inventory/Product}"
    Margin="65,55,0,0" VerticalAlignment="Top" Width="270"/>     
        </Grid>
    </Window>
    All looks quite the same except the <XmlDataProvider ....> part under <Window.Resources>, which is gone completely in my Xaml file.
    1, Why?
    2, How many different ways to deal with xml data source through WPF?
    Thanks, guys.
    (ps My "WpfXmlDataBinding" runs without problem through.)

    Never do yourself down Richard.
    Leave that to other people.
    It's quite common for smart developers to think they're not as good as they are.
    I coach a fair bit and it's a surprisingly common feeling.
    And to repeat.
    Never use anything ends .. provider.  They're for trivial demo apps.  Transform xml into objects and use them.  Write it back as xml.  Preferably, use a database.
    You want to read a little mvvm theory first.
    http://en.wikipedia.org/wiki/Model_View_ViewModel
    Whatever you do, don't read Josh Smiths explanation.  I used to recommend it but it confuses the heck out newbies. Leave that until later.
    Laurent Bugnion did a great presentation at mix10.  Unfortunately that doesn't seem to be working on the MS site, but I have a copy.  Download and watch:
    http://1drv.ms/1IYxl3z
    I'm writing an article at the moment which is aimed at beginners.
    http://social.technet.microsoft.com/wiki/contents/articles/30564.wpf-uneventful-mvvm.aspx
    The sample is just a collection of techniques really.
    I have a sample which involves no real data but is intended to illustrate some aspects of how viewmodels "do stuff" and how you use datatemplates to generate UI.
    I can't remember if I recommended it previously to you:
    https://gallery.technet.microsoft.com/WPF-Dialler-simulator-d782db17
    And I have working samples which are aimed at illustrating line of business architecture.  This is an incomplete step by step series but I  think more than enough to chew on once you've done the previous stuff.
    http://social.technet.microsoft.com/wiki/contents/articles/28209.wpf-entity-framework-mvvm-walk-through-1.aspx
    The write up for step2 is work in progress.
    https://gallery.technet.microsoft.com/WPF-Entity-Framework-MVVM-78cdc204
    Hope that helps.
    Recent Technet articles: Property List Editing;
    Dynamic XAML

Maybe you are looking for