XSLT to Retieve Data

Are there XSLT rules that I can use to retrieve data and store it in a ResultSet? How about connecting to an Oracle database?

XSLT can output XML data, HTML data, or text data. It isn't a Java-based technology. But you could write your own interfaces to do what you tried to describe -- Oracle says their new database has "XML support", but I don't know what they mean by that.

Similar Messages

  • Standard XSLT 2.0 date functions not working in PI 7.11

    What do I need to include to use the standard XSLT 2.0 functions - such as format-date,  Current-date() ?
    The code below works correctly in XMLSpy... but when I import the XSL as an Imported Archive in PI - it fails with...
    Method fatalError called, terminate transformation, because of
    javax.xml.transform.TransformerException: com.sap.engine.lib.xsl.xpath.XPathException: Function with name 'current-date' not found in context library. at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:250)
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
         <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:attribute name="today">
       <xsl:value-of select="format-date(current-date(),'[Y0001][M01][D01]')"/>
    </xsl:attribute>

    Hi,
    Try to use SAP XML ttol kit option in Operation mapping and let us know the result.
    Regards,
    Raj

  • XSLT: Validate if date is before date of current date

    Hi everyone,
    we need to check condition in XSLT transformation that if a date is before the current date or not.
    its easy to do this in java but not finding anything to do this in xslt.
    If anyone knows this please provide any pointer.
    TIA,

    to put above question clearly:
    For example if i have a date say
         targetDate = 2015-03-02T00:00:00.000
    now i need to verify if this targetDate is before current date or not.
    If(targetDate>beforeCurrentDate)
         targetDate = targetDate - 1 Month

  • Why is data object completely emptied by XSLT on Output Data Association?

    I have an activity in a BPM 11g workflow that invokes a DbAdapter that does a Select, which may not return any rows in the normal course of processing.  My Data Associations for the Output uses an XSLT to map the returned values into one of my process data objects, accounting for the fact they could be empty because no row was found.
    The problem: While I only mapped one column from the results of the Select into my data object using an XSLT, when no row is returned, all other values are removed from my data object.  I need those to remain intact in the data object.
    Why is that?  How can I prevent that from happening?
    More details...
    Here is a snippet of my XSLT used to grab the result of the Select into my data object.  Notice it only maps docId, does not include totalEarnings or bW2IsAttached.
    <xsl:template match="/">
      <ns1:InterfaceTable>
        <xsl:if test='/ns0:AccountingDataCollection/ns0:AccountingData/ns0:docId != ""'>
          <ns1:docId>
            <xsl:value-of select="/ns0:AccountingDataCollection/ns0:AccountingData/ns0:docId"/>
          </ns1:docId>
        </xsl:if>
      </ns1:InterfaceTable>
    </xsl:template>
    Here's my process data object contents before the DbAdapter activity runs the Select.  Notice it includes docId, totalEarnings and bW2IsAttached.
    <?xml version="1.0" encoding="UTF-8" ?><MyTestData xmlns="http://xmlns.oracle.com/bpm/bpmobject/Data/MyTestData">
       <docId>123456</docId>
       <totalEarnings>100.0</totalEarnings>
       <bW2IsAttached>false</bW2IsAttached>
    </MyTestData>
    Now after the Select runs, and no row is found (which can happen), I end up with this empty data object:
    <?xml version="1.0" encoding="UTF-8" ?><MyTestData xmlns:ns1="http://xmlns.oracle.com/bpm/bpmobject/Data/MyTestData" xmlns="http://xmlns.oracle.com/bpm/bpmobject/Data/MyTestData"/>
    I need the totalEarnings and bW2IsAttached fields to remain in the data object.  How can I do that?

    I tried using the data object as a second data source to map the values back to themselves, but that did not work for some unknown reason.  Perhaps I'll try that again.
    The only reason I'm using an XSLT is to handle the case of no row returned from the DB Select.  So if there is another way to check that, this would be fine.  How can I check using an exclusive gateway for a row returned?  I just tried to create this setup, but the data object containing the row read from the service activity is not available in the gateway for checking.  This would be the ideal solution if you could tell me how to access the data object holding the result of the Select in the gateway.  Thanks!

  • XSLT dynamic XML data serverSide. NO External XML file

    I am developing a web application currently using Tomcat 3.2.4, latest Xereces and Xalan.
    I have a JSP page that 1st includes a HTML menu, I then wish to include a JSP page that will produce XML data. I would like to apply an XSLT to this XML data serverSide.. All of the solutions I have seen to date refer to a static XML file.. whereas the data in my XML structure is dynamic..
    If anyone could please lend a hand it would be greatly appretiated.
    Evan.

    Sample code for transforming xmlstring
    public String transformXML(String xmlString, String screenName) {
    Document document;
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    StringWriter stw = new StringWriter();
    try {
    //File stylesheet = new File(uc.getXSLName(screenName));
    File stylesheet = null;
    DocumentBuilder builder = factory.newDocumentBuilder();
    document = builder.parse(new InputSource(new StringReader(xmlString)));
    StreamSource stylesource = new StreamSource(stylesheet);
    StreamResult result = new StreamResult(stw);
    result.setWriter(stw);
    DOMSource source = new DOMSource(document);
    // Use a Transformer for output
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Transformer transformer = tFactory.newTransformer(stylesource);
    transformer.transform(source, result);
    return stw.toString();
    catch (Exception e) {
    System.out.println(e);
    return null;
    }

  • XSLT in New Data Connection

    Dear all,
    As we know, the form allows user to import the XSLT file to transform XML form data.
    However, I am confused about when the transformation will be implemented if the form is submitted in LiveCycle workspace.
    1.      Before submit to server
    OR
    2. After submission to server, then do the transformation?
    Plx help~

    This is only for PDF Preview (Design time) for testing to see what your data woudl ook like. These style sheets to not get applied at all at run time. It is up to the recieving program to apply an XSLT if it is required.
    Paul

  • Debugging XSLT of Business Data List web part in SPD 2013

    I am working on a Business Data List web part in SPD 2013. I want to customize that complex XSLT that got generated by the web part. It will be really helpful, if I can debug that XSLT. But I am not sure, how to debug XSLT from SPD? If at all, I need to
    debug through Visual Studio also, I need the XML also, which I don't have. Can anyone please help?

    Hi Ven,
    XSLT debugging , I have never heard abt it. Its like UI design and you modify it and test it in Browser. Thats the only way.
    one such sample is http://msdn.microsoft.com/en-us/library/cc300164(v=office.12).aspx
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Xslt and getting data from a uri in xml file

    In my xml file, i have a node that conains a uri to another xml file
    Is it possible to use XSLT to open the hyperlink and get the content of that xml file?

    Possibly using the document() function.

  • Retieve Data from ost file of OutLook 2013

    Dear sir,
    How can i retrieve data from ost file of outlook 2013?
    the problem is: my mailbox in exchange was changed, so the outlook refused to open. 

    I would like to suggest you to
    retrieve/back
    data from exchange .ost files and export to outlook 2013 process.
    Click File, then click Open
    & Export
    Click Import/Export to open Import
    and Export Wizard
    Select Export to a file, and click Next.
    Select Outlook Data file (.pst) and click Next
    Select the folder (.OST file) that you want to export from, then click Next
    Select the path where you want to put the new PST file. Click Finish.
    Once you have the create new PST file, you can open it in Outlook 2013, then you can find all your data there
    refer:  http://www.softwareimperial.com/ost-recovery.html

  • Retieve data from Palm Zire m150

    My computer crashed and just got a new MAC. Since computer was bought recently, I had not hot-synced my data. I haven't used my Palm for awhile, but was keeping it charged to preserve memory.  This last time that I charged it, I discovered that one of the grandkids had unplugged the plug from the wall, thus...no charge. I plugged it in and recharged it, but discovered that all my data was gone. Is there any way to retrieve my address book?
    Post relates to: Zire

    Sorry but if the handheld's data is gone and you don't have a Hotsync backup, it is *really* gone.
    smkranz
    I am a volunteer, and not an HP employee.
    Palm OS ∙ webOS ∙ Android

  • Invoke webservice to retieve data

    Hi All,
    We have a requirement to download data from SAP system to our Oracle DB. Issue is we will not be able to connect to SAP DB. They weill provide a webservice and we should use that by passing parameters.
    My query is, how can we do that in Oracle DB or Forms . I want to write a Program unit and call web service whenever required.
    Any Idea in this regard will be of great help.
    Thanks

    Is this somehow related to oracle forms?
    Anyway; there is a lot of informations about your requirement already available: Let me google that for you
    cheers

  • How to extract data from database to XSLT?

    I want to generate a report by XSLT, but the data is extracted from the database. I will use Access/SQL server for my database. Can i write SQL in XSLT to extract data from database? Have any sample code or reference website to show how it work?
    THX

    for example: "SELECT code, name FROM TABLE FOR XML RAW"
    String xml = null;
    if(rs.next()){
      xml = rs.getString(1);
    }You will get xml string something like this:
    <row empID="1234"/><row empID="1235"/>
    You can construct a DOM using this xml data and operate on it.
    However you may explore more on resulting xml format.
    A different SQL Query (rather than using XML RAW) may give output in a more desired format.

  • New Data Connection with incoming XSLT.  Should DataView show the structure?

    When I Create New Data Connection with an XML file and an incoming XSLT transformation, the Data View doesn't show the resulting structure..just the original XML file structure. This makes it hard to bind xml elements in the transformation to a PDF form. It the XSLT only applied at "runtime"? If so, how to map elements? Thanks.

    I would suggest to create a receive data connection(secondary) to get data from your checklist
    Use this data connection to connect to your checklist and get all the fields that are required.
    Create a button in your form and add rules to assign and submit data to the list, after user clicks the button
    Add a rule to set values to source list with fields from Receive Data connection
    Submit the data to the list
    Close the form
    Hope this helps!
    MCITP: SharePoint 2010 Administrator
    MCTS - MOSS 2007 Configuring, .NET 2.0
    | SharePoint Architect | Evangelist |
    http://www.sharepointdeveloper.in/
    http://ramakrishnaraja.blogspot.com/
    Yes!  This is fantastic, I'll try this.  Quick question, would it be possible to send the data to a different list rather than the source?  
    My reasoning is this:  The secondary data connection list is intended to be sort of a blank slate, where the actual project requirements are listed and can be modified or edited as needed.  I'd like to keep that as the constant starting point.
     So could I possibly have the form submit the actual data to a separate list to maintain that?

  • Error in applescript to fix dates with GMT shift

    Hello,
    I am attempting to fix a problem with importing OFX files from the bank's website. Therein, dates are stored this way:
    <DTPOSTED>20110106000000[+9.0:JST]
    The time zone indicator causes Numbers to incorrectly compensate dates, resulting in one day earlier than the correct date to be displayed. Removing [+9.0:JST] fixes the problem, but that is tedious to fix many entries. Thus I thought to write an applescript to fix this issue.
    This is the script I wrote:
    tell application "Numbers"
    tell document 1
    set currentSheet to 0
    repeat with i from 1 to the count of sheets
    tell sheet i
    set x to the count of (tables whose selection range is not missing value)
    end tell
    if x is not 0 then
    set the currentSheet to i
    exit repeat
    end if
    end repeat
    tell sheet currentSheet
    set the currentTable to the first table whose selection range is not missing value
    tell the currentTable
    repeat with theCell in every cell in selection range
    set theValue to value of theCell
    set theNewValue to ((theValue) + (time to GMT)) as date
    set value of cell theCell to ((date string of theNewValue) as date)
    end repeat
    end tell
    end tell
    end tell
    end tell
    However this error occurs:
    error "Can’t make "2011.1.09" into type date." number -1700 from "2011.1.09" to date
    It appears there are problems with how Numbers 2009 deals with date formats, but I have not been able to understand how to make this work.
    The English discussions forum seems more active than the Japanese, so I am asking here hoping someone can help. Thank you in advance.

    Hello Hiroto
    (1) Best wishes fro the new year my friend
    (2)
    To get your script running I had to edit it this way :
    For Numbers '09, which has specific defect in getting date value from cell by AppleScript.
    tell application "Numbers"
    tell document 1
    -- omitted (same as the original)
    tell sheet 1 --currentSheet
    -- omitted (same as the original)
    tell table 1 --currentTable
    repeat with theCell in (get every cell of selection range)
    set theCell to theCell's contents
    set value of theCell to (((value of theCell) + (my get_diff2UTC())) as string) -- [2]
    end repeat
    end tell
    end tell
    end tell
    end tell
    [1] Due to Numbers' AppleScript's defect, when getting date value of cell by AppleScript,
    the retrieved date is in local time calculated as follows :
    <retieved date value> = <stored date value> + <time to UTC>
    [2] When setting date value of cell by AppleScript, the stored value is the same as the source value.
    on get_diff2UTC()
    return -(time to GMT)
    end get_diff2UTC
    The handler is due to a Snow Leopard new feature
    When we trigger a command belonging to an other sdef than the one of the application owning the block we get an error.
    Some times this one doesn't hurt, sometimes it does.
    Here, calling time to GMT in the tell Numbers block generate an error which doesn't hurt but I dislike this kind of thing and decided to trigger it from the outside of the block.
    Here is the log report when triggering time to GMT from the tell Numbers block :
    tell application "Numbers"
    get every cell of selection range of table 1 of sheet 1 of document 1
    --> {cell "B2" of table "Tableau 1" of sheet "Feuille 1" of document "Sans titre"}
    time to GMT
    --> error number -10004
    end tell
    tell application "AppleScript Editor"
    time to GMT
    --> 3600
    end tell
    tell application "Numbers"
    get value of cell "B2" of table "Tableau 1" of sheet "Feuille 1" of document "Sans titre"
    --> date "vendredi 14 janvier 2011 14:52:10"
    set value of cell "B2" of table "Tableau 1" of sheet "Feuille 1" of document "Sans titre" to "vendredi 14 janvier 2011 13:52:10"
    end tell
    Now, here is the log report when I use the handler :
    tell application "Numbers"
    get every cell of selection range of table 1 of sheet 1 of document 1
    --> {cell "B2" of table "Tableau 1" of sheet "Feuille 1" of document "Sans titre"}
    end tell
    tell application "AppleScript Editor"
    time to GMT
    --> 3600
    end tell
    tell application "Numbers"
    get value of cell "B2" of table "Tableau 1" of sheet "Feuille 1" of document "Sans titre"
    --> date "vendredi 14 janvier 2011 14:52:10"
    set value of cell "B2" of table "Tableau 1" of sheet "Feuille 1" of document "Sans titre" to "vendredi 14 janvier 2011 13:52:10"
    end tell
    Yvan KOENIG (VALLAURIS, France) vendredi 14 janvier 2011 15:56:45

  • Error while retrieving data from an ARRAY resultset

    We hava an Oracle stroed procedure which has a table type as its OUT parameter and where the data is being entered into. This data requries to be returned to the Java client through a JDBC connection. We have used the OracleTypes' ARRAY object for this. We are facing errors when retieving data from the ARRAY resultset
    The Oracle Package
    ----I created a table type called "PlSqlTable":
    CREATE OR REPLACE TYPE PlSqlTable IS TABLE OF VARCHAR2(20);
    ----I defined this as the out parameter for my procedure :
    PROCEDURE testSQL
    arrayOutID OUT PlSqlTable
    Then populated the object :
    arrayOutID := PlSqlTable();
    arrayOutID.extend(4);
    arrayOutID(1):= 'Hello';
    arrayOutID(2) := 'Test';
    arrayOutID(3) := 'Ora';
    ----The procedure executes fine - all debug statements are printed ----right till the end of execution.
    The Java class
    ----Here is how I have defined the parameters :
    OracleCallableStatement stmnt = (OracleCallableStatement)connection.prepareCall("begin testSQL(?);end;");
    stmnt.registerOutParameter(2,OracleTypes.ARRAY,"PLSQLTABLE");
    System.out.println("Executing..");
    stmnt.execute();
    System.out.println("Executed..");
    ARRAY outArray = stmnt.getARRAY(1);
    System.out.println("Got array");
    ResultSet rset = outArray.getResultSet();
    System.out.println("Got Resultset..");
    int i = 1;
    while(rset.next()){
    System.out.println("VALUE : " + rset.getString(i));
    i = i+1;
    ----On execution, the debug messages display :
    Executing..
    Executed..
    Got array
    Got Resultset..
    VALUE : 1
    VALUE : Test
    ERROR : java.sql.SQLException: Invalid column index
    ----But I have populated upto 3 values in th e procedure. Then why this error ?
    PLLLEEEASE help me out on this.
    Thanks, Sathya

    haven't worked with db arrays but I think your problem is here:int i = 1;
    while(rset.next()){
         System.out.println("VALUE : " + rset.getString(i));
         i = i+1;
    }In the first loop you are retrieving the value from column 1(rs.getString(1)), which is OK, but in the second loop, you are trying to retrieve a value from the second column(rs.getString(2)) which doesn't exist. Try this code which only reads from column1:
    while(rset.next()){
         System.out.println("VALUE : " + rset.getString(1));
    }Jamie

Maybe you are looking for

  • Image in template background do not appear in browser

    Hello all I run a site ( http://ntp.neuroscience.wisc.edu/ ) that uses templates for backgrounds/spry menus for its pages. We currently use three templates to display backgrounds across the site and up until a few days ago everything displayed fine,

  • Show organizer files in the project bin.

    In the project bin the default option is to "show open files".  But there is an additional oprion in the drop down menu "Show files from Orgainzer".  I am just learning to use elements 8 and am reading a book that describes this and see the drop down

  • Users selecting "All Choices" on columns in fact table

    We have a dimensionalised data structure in our Oracle DW and the fact table contains 750million rows. I'm finding the users are selecting a column in the fact table to filter on, and selecting the "All Choices" option. This then runs an SQL like: se

  • Radio feature won't work in windows. Help Please!

    I can't get the radio in itunes to work. I use Firefox and with their new update (foxy tunes) you can put your media player on the toolbar and not have to leave your browser to listen to the radio. I wanted to change from windows media player to itun

  • Image Capture not working with 10.6.6

    I use a Canon MP780 printer/scanner with my Macs. I have no printing problems. However, when I upgraded to Snow Leopard the Canon MP Navigator scanning software stopped working and Canon's downloaded driver update didn't resolve the problem. Despite