XSLT, XPath and XQuery

Hello

1. can differentiate you these XSLT, XPath and XQuery.

2. How can I force a Rollback in a BPEL workflow.

Thanks in advance

Shree says:
1. can differentiate you these XSLT, XPath and XQuery.

XSL stands for EXtensible Stylesheet Language is a language of style sheet for XML documents. XSLT stands for XSL Transformations.
XQuery is to XML SQL format to database tables. XQuery is designed to query XML data.
XPath is used to navigate through elements and attributes in an XML document. XPath is a major element of trailer of the W3C XSLT - and XQuery and XPointer are both built on XPath expressions.

http://www.w3schools.com/xsl/default.asp
http://www.w3schools.com/XQuery/default.asp
http://www.w3schools.com/XPath/default.asp

See you soon,.
Vlad

Tags: Fusion Middleware

Similar Questions

  • Function XPath and XSLT in OSB reusability

    Hi Experts,
    I have xslt that using xpath custome functions and works very well in the bpel layer. Can I reuse the same pot, xslt and with a certain configuration (http://eelzinga.wordpress.com/2010/05/10/oracle-service-bus-11g-using-custom-xpath-functions/) in the OSB layer? its emergency, please respond as soon as possible.

    Thanks in advance. - Michel

    http://www.xenta.nl/Blog/2012/01/09/Oracle-service-bus-using-custom-XPath-functions-in-XSLT/

    I hope it is what you ment.
    I've reused the jar of xpath custom for xquery and calls the function since the XSLT

  • How to get the value of the previous item (XSLT/XPATH Hey gurus!)

    Hi all

    I'm building a rich TEXT model for a "letter of reference" - report. Sometimes, there are several lines in the data, which must be printed as one. This is due to consecutive temporary contracts that will be printed as a period of service.

    Here is an example of simplified data to illustrate the problem.

    < ROW >
    < START_DATE > 01/01/1980 < / START_DATE >
    < end_date > 01-01-1988 < / end_date >
    < / ROW >
    < ROW >
    < START_DATE > 01-01-1988 < / START_DATE >
    < end_date > 01/01/1990 < / end_date >
    < / ROW >
    < ROW >
    < START_DATE > 01/01/2000 < / START_DATE >
    < end_date > 01/01/2005 < / end_date >
    < / ROW >

    With the above data, I have to print two lines:
    01/01/1980-01/01/1990
    01/01/2000-01/01/2005

    I need to compare START_DATE to an item (except the first) with the end_date of previous, namely whether to print the end_date for this item or not. How can I get the value of the previous item?

    Thank you and best regards, Mathilde

    This allows to obtain the following end_date

    Try this


    ==================
    Current StartDate
    Current end date
    Next Start Date
    Previous end Date
    ================

    o/p
    ==================
    StartDate current 01/01/1980
    Current Date end 01/01/1988
    Next Start Date 01/01/1990
    Previous end Date
    ================
    ==================
    StartDate current 01-01-1988
    Current Date of end of 01/01/1990
    Next Start Date 01/01/2005
    Previous Date of end 01/01/1988
    ================
    ==================
    StartDate current 01/01/2000
    Current Date of end of 01/01/2005
    Next Start Date
    Previous Date of end 01

  • Which table is used to back up the payload human task

    Hi Experts,

    I need to write a client java to access the bpm to human load task request, could you tell me which table is used for s

    Hello

    What you can do is use the Worklist API to retrieve the payload and use xpath and xquery to search in your payload.

    Antonis

  • AdvancedDataGrid with syntax XMLListCollection

    Hi all

    I'm more a guy XSLT/XPath and need help with the syntax for Flex (if it's the only thing I am doing wrong!). I have an XMLListCollection named "mapData" with recordings of a web service. Each record looks like this:

    < xmlns:java = "java: java com.example.com: results" >
    < java: AssociatedFileID > 9999 < / java: AssociatedFileID >
    example.csv < java: AssociatedFileName > < / java: AssociatedFileName >
    < java: DataBucketID > 123 < / java: DataBucketID >
    < java: DataBucketName > EDashboard < / java: DataBucketName >
    < java: fields >
    < java: DataBucketFieldName > Business < / java: DataBucketFieldName >
    Loans of < java: DataBucketFieldValue > < / java: DataBucketFieldValue >
    < java: DataBucketFieldID > 4281 < / java: DataBucketFieldID >
    < / java: fields >
    < java: fields >
    < java: DataBucketFieldName > Section < / java: DataBucketFieldName >
    < java: DataBucketFieldValue > Europe < / java: DataBucketFieldValue >
    < java: DataBucketFieldID > 4394 < / java: DataBucketFieldID >
    < / java: fields >
    < java: LoadedDateTime > 2008-03-19T 10: 57:21 - 04:00 < / java: LoadedDateTime >
    < java: deleted > No. < / java: deleted >
    < java: DataBucketContentID > 170 < / java: DataBucketContentID >
    < java: status > Active < / java: status >
    < / java: results >

    My AdvancedDataGrid is:

    < mx:AdvancedDataGrid x = "10" y = "10" id = "MapDG" designViewDataType = "flat" width = "100%" height = "100%" dataProvider = "{mapData}" click = "{editBtn.enabled = true ;} "selectionMode ="singleRow"change ="{editBtn.enabled = true ;} ">
    < mx:columns >
    < mx:AdvancedDataGridColumn headerText = "ID" dataField = "" / >
    < mx:AdvancedDataGridColumn headerText = "Business" dataField = "" / >
    < mx:AdvancedDataGridColumn headerText = "Section" dataField = "" / >
    < / mx:columns >
    < / mx:AdvancedDataGrid >

    Here's what I try to do for each column:

    1 *:::DataBucketContentID.text() Results.*
    It's the record ID
    2 - * results. *: fields. (*: DataBucketFieldName.text () = "Business"). * (DataBucketFieldValue.text)
    Gets the "DataBucketFieldValue" for each "field" who has a "DataBucketFieldName" company
    3 - * results. *: fields. (*: DataBucketFieldName.text () = 'Section'). * DataBucketFieldValue.text)
    Gets the "DataBucketFieldValue" for each "field" who has a "DataBucketFieldName" Section =

    What should I put in the data area of the columns to do this?

    Thank you

    VTRT

    Thanks to Tracy and a little research, I have my data grid filling - I wanted to post an example which worked for me:
    If this is a variable with the result of your web service...

    private var personXML:XML =

    Santa
    Claus
    1000


    Tooth
    Fairy
    250


    Travis
    Allen
    27

    You can use a function, you need to assign to a column. Here is concating text in 2 elements, but you can also use it for namespaced elements (for example item. *: NodeName1. *:NodeName2.text ()).

    private void showFullName(item:Object,_Column:DataGridColumn):String {}
    var fullName:String = item. FirstName + "" + point. Family name;
    Returns the full name;
    }

    The first column uses the function to fill in the data of the column. He must use labelFunction (vs dataField). The 2nd directly uses the name of the node.








    Hope this helps someone else!

    VTRT

  • problem of reference current node

    Hello
    I use the Java APIs for XML DB 2.4.16. I'm trying to select some nodes, and then iterate the result and inside the loop, update the nodes with Ref to the current node ('.) »). The problem is that the following code is used to work with 2.3.10 but won't work with 2.4.16. In the version of this last exception is thrown:

    com.sleepycat.dbxml.XmlException: Error: DB_NOTFOUND: no matching key/data pair not found, errcode = DATABASE_ERROR
    at com.sleepycat.dbxml.dbxml_javaJNI.XmlQueryExpression_execute__SWIG_7 (Native Method)
    at com.sleepycat.dbxml.XmlQueryExpression.execute(XmlQueryExpression.java:119)

    Can you please help me point what the problem?
    The code is approximately like this:

    I tried different XPath expressions, return one or more results
    check the syntax in the code and shell to work
    Results XmlResults = xmlManager.query ("collection ('mycoll.dbxml') / / *", queryContext);

    While (results.hasNext ()) {}

    XmlValue xmlValue = results.next ();

    Change XmlModify = xmlManager.createModify ();
    XmlQueryExpression xmlQueryExprToUpdate = xmlManager.prepare (txn, ".", queryContext); Here's the ref to the current node
    modify.addAppendStep (xmlQueryExprToUpdate, XmlModify.Attribute, "someNewAttrib", NewValue);
    next line throws the mentioned exception
    Modify.Execute (txn, xmlValue queryContext, updateContext);






    following the code gives exactly the same error
    XmlQueryExpression expr = xmlManager.prepare (txn,
    ("Insert the node attribute someNewAttrib {'} ' NewValue ' '} in.", queryContext);
    Expr.Execute (txn, xmlValue, queryContext);

    }

    As XmlModify is outdated, I also checked the update with XQuery and got exactly the same error. I checked the XPath and XQuery syntax with dbxml shell (I used a few XPath instead of '. ' reference in this case) and it seems to work fine. The problem is probably the '. ' reference but I stress that the code has been tested before and it worked.
    I run it on Sun JDK 1.6.
    Hints, pointers to the docs or better, pointers to popular examples.
    Thank you

    Here is the finished patch.

    Lauren Foutz

    diff -r 1c1645fbc47f src/dbxml/RawNodeValue.cpp
    --- a/src/dbxml/RawNodeValue.cpp     Thu Dec 11 18:51:30 2008 -0500
    +++ b/src/dbxml/RawNodeValue.cpp     Tue Dec 16 14:40:32 2008 -0500
    @@ -84,6 +84,12 @@
     // it comes from the Container.
     DbWrapper *RawNodeValue::getDocDB() const
     {
    +     //Make sure the doc db of this node and the document are the same
    +     if (!xdoc_.isNull()) {
    +          DbWrapper *docDb = (*xdoc_).getDocDb();
    +          if (docDb) return docDb;
    +     }
    +
          Results &res = GET_RESULTS();
          XmlManager &mgr = res.getManager();
          CacheDatabaseMinder &minder = res.getDbMinder();
    diff -r 1c1645fbc47f src/dbxml/Results.cpp
    --- a/src/dbxml/Results.cpp     Thu Dec 11 18:51:30 2008 -0500
    +++ b/src/dbxml/Results.cpp     Tue Dec 16 14:40:32 2008 -0500
    @@ -241,12 +241,13 @@
          if (contextItem && (contextItem->getType() == XmlValue::NODE)) {
               XmlDocument &xdoc = (XmlDocument&)contextItem->asDocument();
               CacheDatabaseMinder &minder = ((Document *)xdoc)->getDbMinder();
    -          if (minder.isNull()) {
    +          if (minder.isNull() && !((Document*)xdoc)->getContainerID()) {
                    dbMinder_.findOrAllocate((Manager&)(context->getManager()),
                                    ((Document *)xdoc)->getContainerID());
                    minder = dbMinder_;
               }else
                    dbMinder_ = minder;
    +          if ((*xdoc).isUninitialized()) (*xdoc).changeContentToNsDom(0);
          }
          oc_.set(txn);
          conf_.setMinder(&evaluationMinder_);
    
  • XQuery insert node and assign the value based on an XPATH expression

    Hello

    I am trying to write a function that receives an XML as input parameters and return updated XML output

    -nodes are removed from the input XML code

    -a node must be inserted and the node value must be 1 or 0, based on an XPATH expression

    I discovered how to remove nodes, I discovered how to insert a new node, but I can not set the value of the conditionally inserted node an XPATH expression.

    Here's my current procedure and below a sample of one XML of entry. I use Oracle 12 c.

    CREATE OR REPLACE FUNCTION STRIP_XML
    (
      IN_XML IN SYS.XMLTYPE
    ) RETURN SYS.XMLTYPE AS
    p_result XMLType;
    BEGIN
      select
          xmlquery(
             'declare default element namespace "http://mad.evs.com/search"; (: :)
              copy $d := .
              modify (
      delete node $d//MainCategory/@logId,
               delete node $d/MainCategory/@id,
    -- a lot more of those delete node
     -- insert a node, but the value 1 is conditional
               insert node <DMZ>1</DMZ> after $d/MainCategory/SDataSection/EventDate)
              return $d'
            passing in_xml
            returning content
            ) into p_result
            from dual;
    
    
      RETURN p_result;
    END STRIP_XML;
    

    The condition for the value of is


    HASPATH (//DigitalAssets/DigitalAsset [@ available = "true" and @videoFormatId = "11"] / VideoLocations/Videorental [@typeId = "8"]) then 1 else 0


    It is complex because DigitalAssets/DigitalAsset is a collection. Here is an example of an XML to entry



    <MainCategory xmlns="http://mad.evs.com/search" id="9" logId="3349" logType="3">
      <Name>Sport</Name>
      <Serie id="163" externalId="557">
      <TitleAKA>UCL 2006/07</TitleAKA>
      <DigitalAssets available="true" som="20:28:49:05" dur="00:02:46:04" videoDurationMinutes="3">
         <DigitalAsset available="true" som="20:28:49:05" dur="00:02:46:04" videoDurationMinutes="3" videoFormatId="3">
            <VideoLocations>
                <VideoLocation id="3" path="003349MA.mxf" typeId="1" locationId="1" priority="0"/>
                <VideoLocation id="3" path="003349MA.mxf" typeId="2" locationId="1" priority="0"/>
                <VideoLocation id="3" path="003349MA.mxf" typeId="5" locationId="1" priority="0"/>
             </VideoLocations>
          </DigitalAsset>
          <DigitalAsset available="true" som="20:28:49:05" dur="00:02:46:04" videoDurationMinutes="3" videoFormatId="11">
             <VideoLocations>
                <VideoLocation id="101" path="003349MA.mpg" typeId="1" locationId="1" priority="0"/>
                <VideoLocation id="101" path="003349MA.mpg" typeId="2" locationId="1" priority="0"/>
                <VideoLocation id="101" path="003349MA.mpg" typeId="8" locationId="1" priority="0"/>
             </VideoLocations>
          </DigitalAsset>
      </DigitalAssets>
      <SDataSection xmlns="http://mad.evs.com/search">
        <EventDate>2006-08-09</EventDate>
        <LogType>3</LogType>
      </SDataSection>
    </MainCategory>
    


    In this case, because HASPATH expression could be set to true, the value of the added node must be 1.


    Any help or advice how I should fight against that would be appreciated. I have no experience with XML and XQuery, I create my function through from trial and error of the doc.


    Thanks and regards, Pierre

    Hi Pierre,.

    You can use the if-then-else statement, like this:

    Insert the node

    {

    If ($d/MainCategory/DigitalAssets/DigitalAsset[@available="true' and @videoFormatId = '11'] / VideoLocations/Videorental [@typeId = '8'])

    then 1

    0 otherwise

    }

    After $d, MainCategory, SDataSection, EventDate

    XSLT can be an alternative to the XQuery Update in this case.

  • Reg: XQuery/XPath expr.

    Hi Experts,

    I was trying to learn/experience the XQuery/XPath expressions and had some doubts.

    I learn here-http://www.w3schools.com/xquery/xquery_example.asp

    Configuration script:

    CREATE TABLE a (col1 XMLTYPE);

    INSERT INTO a VALUES (XMLTYPE ("<?")) XML version = "1.0" encoding ="ISO-8859-1"? >

    < library >

    < Book category = "COOKING" >

    < title lang = "fr" > < /title > Italian newspaper

    < author > Giada De Laurentiis < / author >

    < year > 2005 < / year >

    < price > 30.00 < / price >

    < / book >

    < Book category = "CHILDREN" >

    < title lang = "fr" > Harry Potter < /title >

    < author > J K Rowling < / author >

    < year > 2005 < / year >

    < price > 29.99 < / price >

    < / book >

    < Book category = "WEB" >

    < title lang = "fr" > XQuery Kick Start < /title >

    < author > James McGovern < / author >

    < author > per Bothner < / author >

    < author > Kurt Cagle < / author >

    < author > James Linn < / author >

    < author > Vaidyanathan Nagarajan < / author >

    < year > 2003 < / year >

    < price > 49.99 < / price >

    < / book >

    < Book category = "WEB" >

    < title lang = "fr" > Learning XML < /title >

    < author > Erik T. Ray < / author >

    < year > 2003 < / year >

    < price > 39.95 < / price >

    < / book >

    ((< / book > '));

    It worked:

    RANIT@XE11GR2 > > ed

    A written file afiedt.buf

    1 Select xt.colx

    2 a, XMLTable ('/ bookstore/book[price < 40]')

    3 passage a.col1

    4 columns

    5 way XMLTYPE colx '.'

    6 *) xt

    RANIT@XE11GR2 > >.

    COLX

    ----------------------------------------------------------------------------------------------------------------------------------

    < Book category = "COOKING" >

    < title lang = "fr" > < /title > Italian newspaper

    < author > Giada De Laurentiis < / author >

    < year > 2005 < / year >

    < price > 30.00 < / price >

    < / book >

    < Book category = "CHILDREN" >

    < title lang = "fr" > Harry Potter < /title >

    < author > J K Rowling < / author >

    < year > 2005 < / year >

    < price > 29.99 < / price >

    < / book >

    < Book category = "WEB" >

    < title lang = "fr" > Learning XML < /title >

    < author > Erik T. Ray < / author >

    < year > 2003 < / year >

    < price > 39.95 < / price >

    < / book >

    Elapsed time: 00:00:00.16

    But when tried to join another filter condition, it gives me the error:

    RANIT@XE11GR2 > > ed

    A written file afiedt.buf

    1 Select xt.colx

    2 a, XMLTable ('/ bookstore/book[< 40 year AND price < 2004]')

    3 passage a.col1

    4 columns

    5 way XMLTYPE colx '.'

    6 *) xt

    RANIT@XE11GR2 > >.

    a XMLTable ('/ bookstore/book [price < 40 year AND < 2004] ")

    *

    ERROR on line 2:

    ORA-19114: XPST0003 - error during parsing of the XQuery expression:

    LPX-00801: to "AND" XQuery syntax error

    1/bookstore/book [price < 40 year AND < 2004]

    -                           ^

    Elapsed time: 00:00:00.04

    RANIT@XE11GR2 > > ed

    A written file afiedt.buf

    1 Select xt.colx

    2 a, XMLTable ('/ bookstore/book[price < year 40, < 2004]')

    3 passage a.col1

    4 columns

    5 way XMLTYPE colx '.'

    6 *) xt

    RANIT@XE11GR2 > >.

    ERROR:

    ORA-19169: FORG0006: invalid argument in «fn:boolean()» type

    no selected line

    Elapsed time: 00:00:00.20

    Could you please help me how to add multiple condition filter here?

    Thank you

    -Nordine

    (on Oracle 11.2.0.3.0)

    There "and" lowercase:

    / bookstore/book [price<40 and=""><>

    If I may ask another site to start learning: Tutorials of XQuery

    And of course, the W3C recommendation official, always useful to get information about the base language: http://www.w3.org/TR/xquery/

    For the Oracle specifics, see DB XML Dev Guide:

    http://docs.Oracle.com/CD/E11882_01/AppDev.112/e23094/xdb_xquery.htm

    Also, as you should know by now, this kind of questions belong to the forum DB XML or XQuery forum (for a general discussion of the language).

  • InDesign CS5 Support XPath 2.0 and XSL 2.0?

    Hi scripters,.

    Are there study for XSL and XPath processing documents in InDesign itself?  and also to confirm the version of XPath and XSL support in InDesign CS5?

    Windows platform.

    Kind regards

    Karpanai

    Hello

    Till in CS5, InDesign supports only versions of XPath and XSLT 1.0 and we have only the PDF for the treatment of the "XML rules", which can be downloaded from the website of Adobe InDesign.

    Thank you

    Praveen

  • Can a Xquery return a concatenated string and an XML element

    Hello

    My Xquery fucntion is illustrated below:

    It accepts parameters of Channel 4 and a XML element i.e., $Message which is a component of XML (application to come to the service) and I need to connect all this information in a log file.

    I use the below fucntion concat to get a concatenated string of all parameters, but for $Message I m not able to get the XML load. How to achieve the same in the XQuery?

    *$Message is the below XML file:*

    payload of <>
    < aa > a < /aa >
    < bb > two < /bb >
    < cc > 3 < /cc >
    < / payload >

    My Xquery function is:

    declare function xf:XformLog($Name_as_xs:string,)
    $id as XS: String.
    $Context as XS: String.
    $Annotation as XS: String.
    $Message as element (*))
    as XS: String {}
    Concat ("name = ', $Name, ','," Id = ", $id,", ","Message = ", $Context,","context", Annotation = ", $Annotation,","," event Message = ', data ($Message/@*, $Message / node ()) "" "")
    };


    I am trying to achieve the following log:

    Name = xyz, Id = 111, Message Contact is abc, Annotation = ggg, the event Message = < payload >
    < aa > a < /aa >
    < bb > two < /bb >
    < cc > 3 < /cc >
    < / payload >


    How can I achieve the same. Please suggest.

    Thanks in advance.

    Published by: user9223904 on March 18, 2013 03:16

    Hello

    You must use a serialization function to convert a string of the instance of the element.
    This type of functionality is not included in the XQuery standard, but many directors provide an extension to do this.

    For example, in OSB, you can use fn - bea: serialize().

    What is your environment and XQuery engine?

  • Impossible to compile the XQuery modify

    Hi gurus. Oracle 11.2 EA running on Linux. SQL Dev 3.2.30.09.

    I'm pretty decent with XPath and XSLT, but I'm new to XQuery. I've set up a few simple FLOWRs, but I'm getting a little more complex. I have an XQuery query where I am trying to replace some of the inline data. I've clipped the real XML and code down to a very simple example that will always return the same error.

    The error:

    ORA-19112: error raised during the evaluation: XQuery Update cannot be compiled

    19112 00000 - "triggered when evaluating error: %s.

    * Cause: The error function was called during the evaluation of the XQuery expression.

    * Action: Check the error message for possible causes.

    Error on line: column 7:14

    My Xquery:

    SELECT XMLQuery( 
      'copy $tmp := $xmldata 
           modify (replace value of node $tmp/MSG_CNTNT_XML/Message/msgHdr/Source/Format/text() with "abc") 
         return $tmp' 
         PASSING msg_cntnt_xml as "xmldata"
         RETURNING CONTENT ) xmlmct
    FROM (SELECT xmltype('<Message>
       <msgHdr>
          <Source>
             <Format>CTS</Format>
          </Source>
       </msgHdr>
    </Message>') msg_cntnt_xml
           FROM DUAL) 
    ;
    
    

    Any general advice for XQuery and change is cool, but what I am really looking for, that's why I get the "update cannot be compiled. (BTW, note the misspelling, cannot, I don't judge).

    Tips for debugging or be able to view the intermediate outcomes would be great also.

    Thank you.

    LewisC

    Hi Lewis,

    What is your version of the database accurate?

    You try to use XQuery Update Facility (a small extension to XQuery 1.0) which is available only from 11.2.0.3 .

    On previous versions, you can use the updateXML() function:

    SQL > SELECT updateXML)

    2 msg_cntnt_xml

    3, ' / message/msgHdr/Source/Format / text () '

    4, 'abc '.

    (5) xmlmct

    6 (SELECT xmltype ('))

    7

    8

    9           CTS

    10

    11

    12 ') msg_cntnt_xml

    13 DOUBLE)

    14;

    XMLMCT

    --------------------------------------------------------------------------------

    ABC

  • 12.1.3 extension XSLT editor Query-database mapping function

    Hello

    , We are trying to move from 11.1.1.7 to 12.1.3 JDeveloper. We have developed a number of xsl maps in 11.1.1.7 using the function oraext:query - database Oracle extension (where the namespace oraext is xmlns:oraext ="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc" "). This works in JDeveloper 11.1.1.7 when the test of the card where the call to the map looks like this:

    < xsl: value-of select = "oraext:query - database (concat (& quot; Select fvalue GetMapCodeList ("param1", "param2", "param3") of double, quot;), false (), false (), & quot;jdbc:oracle:thin:dbuser/dbpassword@dbhost:1521:dbservicename & quot;) "/ >"

    In the statement select above is "select GetMapCodeList" which is a function defined in the database which takes 3 parameters. This works very well for us in 11.1.1.7. We are new to 12.1.3 and we get an error test map XSLT in JDeveloper. The error is

    file:/[file path] / [file name] .xsl: XML-22044: function (error) Extension error: Error invoking 'queryDatabase':'java.lang.NoClassDefFoundError: oracle/jdbc/OracleConnection '.

    It seems that it cannot find the ojdbc6.jar file, but I don't see where that should be added.

    Edit:

    OK, I realized that the extension functions XPath of Oracle do not appear in my XSLT Map Editor component palette. I also see that when I change the XPath of the oraext:query - database is highlighted by JDev as being invalid. I think my problem is with the extension being not loaded XPath functions.

    Thanks in advance.

    Steve

    OK, after working with the support of the Oracle, the answer is that the ojdbc6.jar did indeed need to be added to the configuration of JDeveloper 12.1.3. To do this the following line was added at the end of the jdev.conf file:

    AddVMOption - Xbootclasspath/r:... /... /.. /oracle_common/modules/Oracle.jdbc_12.1.0/ojdbc6.jar

    The jdev.conf file is located in your Oracle_Home\jdeveloper\jdev\bin directory. Don't forget to adjust the relative path to match your environment. In addition, please note that the only spaces in the AddVMOption line are a space immediately after "AddVMOption".

    Another concern in this thread that the functions of data base in the XPath Group advanced components from the component Palette was missing. The groups Advanced general XPath XPath and XSLT components model will appear only in the component Palette if the application is a SOA application.

    A score more. I don't know if Oracle sees this as a bug and the ojdbc6.jar to be in the classpath without the user set it up like that in the jdev.conf. If it's a bug, and then if all goes well it will be resolved in a future release, and this configuration will be necessary.

  • Extract all nodes and filter them based on the WHERE clause

    <?xml version="1.0" encoding="UTF-8"?>
    <report_repository_summary>
       <sql sql_id="gyn915ynqjspa" sql_exec_start="08/19/2015 22:23:02" sql_exec_id="16777217">
          <status>DONE</status>
          <sql_text>BEGIN DBMS_STATS.GATHER_FIXED_OBJECTS_STATS; END;</sql_text>
          <first_refresh_time>08/19/2015 22:23:10</first_refresh_time>
          <last_refresh_time>08/19/2015 22:24:52</last_refresh_time>
          <refresh_count>54</refresh_count>
          <inst_id>1</inst_id>
          <session_id>26</session_id>
          <session_serial>20363</session_serial>
          <user_id>0</user_id>
          <user>SYS</user>
          <con_id>3</con_id>
          <con_name>PDB01_1</con_name>
          <module>sqlplus@lab (TNS V1-V3)</module>
          <service>1_1.up.com</service>
          <program>sqlplus@lab (TNS V1-V3)</program>
          <plan_hash>0</plan_hash>
          <is_cross_instance>N</is_cross_instance>
          <stats type="monitor">
             <stat name="duration">110</stat>
             <stat name="elapsed_time">109822091</stat>
             <stat name="cpu_time">78295097</stat>
             <stat name="user_io_wait_time">1388002</stat>
             <stat name="application_wait_time">1228</stat>
             <stat name="concurrency_wait_time">9175702</stat>
             <stat name="cluster_wait_time">41691</stat>
             <stat name="plsql_exec_time">39369731</stat>
             <stat name="other_wait_time">20920371</stat>
             <stat name="buffer_gets">616087</stat>
             <stat name="read_reqs">837</stat>
             <stat name="read_bytes">22998016</stat>
          </stats>
       </sql>
    </report_repository_summary>
    
    
    

    With above document XML stored as varchar2 (4000) in 12.1.0.2.0, how can I retrieve and display the relevant information(sql_id,session_id,plan_hash,duration,read_bytes) based on the place where condition to filter on any node. For example.

    select * from (
    SELECT EXTRACT (xmltype.createxml (a.report_summary), '//stats/stat[2]/text()').getstringval () AS elap_time from dba_hist_reports a WHERE component_name = 'sqlmonitor'
    )
    where elap_time > 100000000
    /
    
    
    

    Here, I try to get sql_id, sql_exec_id, duration and other information stored in the xml document by applying the where on elapsed_time condition. But to do this, I must write the part EXTRACT for all nodes in the inline view which seems like very bad way of writing of XML query. Is there an easy way to get all the information of nodes so that I can freely apply node whatever, I want in the WHERE condition to filter the records? No better way to write the code then the code below?

    select     REPORT_ID,
               EXTRACT (xmltype(a.report_summary), '//sql/@sql_id')                                    "sql_id",
               EXTRACT (xmltype(a.report_summary), '//sql/@sql_exec_id')                               "sql_exec_id",
               EXTRACT (xmltype(a.report_summary), '//sql/@sql_id')                                    "sql_exec_start",
               EXTRACT (xmltype(a.report_summary), '//status/text()')                                  "status",
               EXTRACT (xmltype(a.report_summary), '//sql_text/text()')                                "sql_text",
               EXTRACT (xmltype(a.report_summary), '//first_refresh_time/text()')              "first_refresh_time",
               EXTRACT (xmltype(a.report_summary), '//last_refresh_time/text()')               "last_refresh_time",
               EXTRACT (xmltype(a.report_summary), '//refresh_count/text()')                   "refresh_count",
               EXTRACT (xmltype(a.report_summary), '//inst_id/text()')                                         "inst_id",
               EXTRACT (xmltype(a.report_summary), '//session_id/text()')                              "session_id",
               EXTRACT (xmltype(a.report_summary), '//session_serial/text()')                  "session_serial",
               EXTRACT (xmltype(a.report_summary), '//user_id/text()')                                         "user_id",
               EXTRACT (xmltype(a.report_summary), '//user/text()')                                    "user",
               EXTRACT (xmltype(a.report_summary), '//con_id/text()')                                  "con_id",
               EXTRACT (xmltype(a.report_summary), '//con_name/text()')                                "con_name",
               EXTRACT (xmltype(a.report_summary), '//module/text()')                                  "module",
               EXTRACT (xmltype(a.report_summary), '//service/text()')                                         "service",
               EXTRACT (xmltype(a.report_summary), '//program/text()')                                         "program",
               EXTRACT (xmltype(a.report_summary), '//plan_hash/text()')                               "plan_hash",
               EXTRACT (xmltype(a.report_summary), '//is_cross_instance/text()')               "is_cross_instance",
               EXTRACT (xmltype(a.report_summary), '//stat[1]/text()')                                 "duration",
               EXTRACT (xmltype(a.report_summary), '//stat[2]/text()')                                 "elapsed_time",
               EXTRACT (xmltype(a.report_summary), '//stat[3]/text()')                                 "cpu_time",
               EXTRACT (xmltype(a.report_summary), '//stat[4]/text()')                                 "user_io_wait_time",
               EXTRACT (xmltype(a.report_summary), '//stat[5]/text()')                                 "application_wait_time",
               EXTRACT (xmltype(a.report_summary), '//stat[6]/text()')                                 "concurrency_wait_time",
               EXTRACT (xmltype(a.report_summary), '//stat[7]/text()')                                 "cluster_wait_time",
               EXTRACT (xmltype(a.report_summary), '//stat[8]/text()')                                 "plsql_exec_time",
               EXTRACT (xmltype(a.report_summary), '//stat[9]/text()')                                 "other_wait_time",
               EXTRACT (xmltype(a.report_summary), '//stat[10]/text()')                                        "buffer_gets",
               EXTRACT (xmltype(a.report_summary), '//stat[11]/text()')                                        "read_reqs",
               EXTRACT (xmltype(a.report_summary), '//stat[12]/text()')                                        "read_bytes"
    from       DBA_HIST_REPORTS a
    

    Don't know why, but it pays just 1 or 0. Even in your case his statement just 0 or 1 for all X 2 columns table.

    I guess I do something wrong in declaring XPATH for X 2 table but not able to find what it is.

    It makes account 0 or 1 because path expressions are bad.

    "For example: ' @name ="duration"

    This is a Boolean expression, not a step of XPath and so gets evaluated as such, which gives 0/1 for false/true values.

    What you need, it is something like this:

    SELECT x1.*
    FROM dba_hist_reports t
       , xmltable('/report_repository_summary/sql'
           PASSING xmlparse(document t.report_summary)
           COLUMNS
             sql_id              varchar2(15) path '@sql_id'
           , sql_exec_start      varchar2(30) path '@sql_exec_start'
           , sql_exec_id         number       path '@sql_exec_id'
           , status              varchar2(10) path 'status'
           , stats_duration      number       path 'stats/stat[@name="duration"]'
           , stats_elapsed_time  number       path 'stats/stat[@name="elapsed_time"]'
           , stats_cpu_time      number       path 'stats/stat[@name="cpu_time"]'
         ) x1
    where sql_id = 'c1tb2666n5rfx'
    and sql_exec_id = 16777668
    
  • Support of XSLT 2.0 in FrameMaker 11?

    Hello

    I have try several XSLT 2.0 in XML of FM11 code view stylesheets. Here everything works as desired. But when I test the same style sheets in a structured as process application, there are several error messages that, for example, XSLT 2.0 functions are unknown.

    XSLT 2.0 in FrameMaker support information are somewhat contradictory. Is it possible that XSLT 2.0 is only supported in XML code mode? In the "maker.ini' under 'XSLTProcessors' SAXON is defined as default processor.

    Thank you for your help.

    Concerning

    Apollo102

    In FrameMaker 11, XSLT 2.0 is supported only in code view. Workflows XSLT-pre and Post-XSLT in FM11 still use Xalan-C for the transformation, and who does not support XSLT 2.0.

    FM12 go, XSLT 2.0 support is also provided in XSLT-pre and Post-XSLT as well. However, in order to use it, you must change the default processor mentioned in maker.ini FM12 of XALAN and Saxon.

    Thank you!
    Harsh Gupta

    FrameMaker engineering.

  • xsl: include not solve any HOW to load the xslt

    I can't get * < xsl: include > * to work with XMLTRANSFORM in an environment of Oracle's PL/SQL 11.2.0.3. I work exclusively within the database.

    I have a basic XSLT which includes another XSLT using xsl: include. I want to load the base as an XMLTYPE XSLT and do transform another XML document, as if the entire XSLT was a large document.

    I loaded the base (base.xslt), the extension (include_with_base.xslt) and the combination of the two (entire_thing.xslt) in the XDB catalogue. base.xslt has this statement inside the node, xsl: stylesheet, attempting to include the other xslt:
    ' * < xsl: include href="/public/include_with_base.xslt" / >. *

    I have the files stored in XDB XSLT. It verifies that they are intact:
    1. the base xslt which has the xsl: include the statement loads very well.
    Select xdburitype('/public/base.xslt').getXML (double);

    2. the extension which is the target of the reference to include it in the basic xslt support very well.
    Select xdburitype('/public/include_with_base.xslt').getXML (double);

    3. the combination of the two, where I copy - paste all the children of include_with_base.xslt xslt:stylesheet in the xslt:stylesheet of base.xslt load node also very well.
    Select xdburitype('/public/entire_thing.xslt').getXML (double);

    However, when I try to run a transformation of some xml test using base.xslt, it fails:
    Select XMLTRANSFORM(xdburitype('/public/xml_input.xml').getXML (), xdburitype('/public/base.xslt').getXML ()) FROM dual;

    When I try to run the same transformation of the same test xml using entire_thing.xslt, it works:
    Select XMLTRANSFORM(xdburitype('/public/xml_input.xml').getXML (), xdburitype('/public/entire_thing.xslt').getXML ()) FROM dual;

    When I run both XSLT transformations and transformation using altovaxml is in the same directory of drive (and I use a relative reference with no path information and not an absolute reference, as I show in the above examples), the transformation works very well.

    What can I do to run a XSLT which is essential the XMLTRANSFORM < xsl: include... / > reference in there?

    Published by: user11359697 on April 15, 2013 13:49

    Ok thank you. Now I can reproduce the problem:

    SQL> select xmltransform(
      2           xdburitype('/public/PEOPLE.xml').getXML()
      3         , xdburitype('/public/BASE.xslt').getXML()
      4         )
      5  from dual;
    ERROR:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00602: Invalid child element '#text' of element 'binary'.
    
    no rows selected
    

    The error is related to the way in which the resources are stored in the XML DB repository and are accessible from XSLT.
    Apparently, when the resource is interpreted as a binary stream, the language of xsl: include directive fails. I would be considered a bug.

    By default, there is no mapping predefined MIME for the 'xslt' extension so the resource ' / public/TITLES "is stored using the default" application/octet-stream"MIME type
    You can check that by questioning RESOURCE_VIEW:

    SQL> set long 50000
    SQL> set longc 50000
    SQL> set lines 200
    SQL> set pages 100
    SQL> select xmlserialize(document res)
      2  from resource_view
      3  where equals_path(res, '/public/TITLES.xslt') = 1;
    
    XMLSERIALIZE(DOCUMENTRES)
    --------------------------------------------------------------------------------------------------------------------------------------------
    
    

    To work around the problem, you need to reference resources stored with a text-based MIME type, such as the "xsl" extension (predefined in xdbconfig):

    select *
    from xmltable(
           xmlnamespaces(default 'http://xmlns.oracle.com/xdb/xdbconfig.xsd')
         , '//extension-mappings/mime-mappings/mime-mapping'
           passing dbms_xdb.cfg_get()
           columns "extension", "mime-type"
         ) ;
    

    or if you want to keep the "xslt" extension, it maps to the mimetype "text/xml".
    You can do it like this:

    SQL> exec dbms_xdb.ADDMIMEMAPPING('xslt','text/xml');
    
    PL/SQL procedure successfully completed.
    
    SQL> commit;
    
    Commit complete.
    

    Drop and reload the resource ' / public/TITLES.xslt ' in the repository and it should be OK:

    SQL> select xmltransform(
      2           xdburitype('/public/PEOPLE.xml').getXML()
      3         , xdburitype('/public/BASE.xslt').getXML()
      4         )
      5  from dual;
    
    XMLTRANSFORM(XDBURITYPE('/PUBLIC/PEOPLE.XML').GETXML(),XDBUR
    ------------------------------------------------------------
    
    
      Hello, Mrs.AliceAble
      Hello, Mr.BobBungler
    
    

Maybe you are looking for