Deprecated Xpath 1.0 functions in 11gR2

According to this whitepaper:
http://www.oracle.com/technetwork/database/features/xmldb/xmlqueryoptimize11gr2-168036.pdf
Starting 11gR2, Oracle has deprecated many older proprietary mainly XPath 1.0 based operators in favor of standards based XQuery syntax, as listed in Table 1 below.
Table 1
OLD ORACLE PROPRIETARY SYNTAX --> NEW XQUERY SQL/XML BASED SYNTAX
extract() --> XMLQuery()
extractValue --> XMLCast(XMLQuery())
existsNode() --> XMLExists() As I was just getting comfortable with the old syntax this gets me slightly worried. I tried to look into the new syntax but that looks like an absolute jungle of text compared to the very easliy readible Xpath expressions. But that could well be just me not quite understanding the XQuery syntax.
What we mainly do with XML in our application is get some XML from webservices and extract values from it. A typical example is:
   select extractvalue(l_xml
                      ,'/kennisgevingsBericht/body/PRS[position()=1]/PRSADRINS/@xsi:nil'
                      ,'xmlns="http://www.egem.nl/StUF/sector/bg/0204" xmlns:StUF="http://www.egem.nl/StUF/StUF0204" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
     into l_waarde
     from dual;What would this look like using the Xquery syntax?

Something like this...
select XMLCAST
            XMLQUERY
               'declare default element namespace "http://www.egem.nl/StUF/sector/bg/0204"; (: :)
               declare namespace StUF "http://www.egem.nl/StUF/StUF0204"; (: :)
               declare namespace xsi "http://www.w3.org/2001/XMLSchema-instance" (: :)
               $X/kennisgevingsBericht/body/PRS[position()=1]/PRSADRINS/@xsi:nil'
               passing l_xml as "X" returning content
           as VARCHAR2(4000)
  into l_waarde
  from dualIf you have multple extractValues then XMLTable may be a better option
Note that the old operators will continue to work. However they will not be enhanced ....

Similar Messages

  • Schematron XPATH 2.0 functions fail to parse

    Hello,
    I have a very simple schematron I'm plugging into a BPMN project and validating XML documents with through a mediator:
    below is schematron document:
    <?xml version="1.0" encoding="windows-1252" ?>
    <schema xmlns="http://www.ascc.net/xml/schematron" >
        <pattern name="Validate Sample Address">
           <rule context="/ADDRESSCOLLECTION_2/ADDRESSID/PHYSICALADDRESS">
             <assert test="matches(ADDRESSSOURCEID,'[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]')">cmid invalid</assert>
           </rule>
        </pattern>
    </schema>
    Everything compiles fine, but when I run it through the mediator I get an error:
    Caused By: oracle.xml.xpath.XPathException: Parse Error in matches function.
    Any idea why this would be?
    Thanks!
    Alessandro Ferrucci

    <xsl:stylesheet version="1.0"
    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:ns0="http://www.ameripath.com/pathway/request/di"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:ehdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.ESBHeaderFunctions"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
    xmlns:ns1="NS_NEUTRAL"
    exclude-result-prefixes="xsl ns0 xs ns1 xp20 bpws ora ehdr orcl ids hwf">
    <xsl:template match="/">
    <!--xsl:param name="Flag1" select="'Test'"/>
    <xsl:param name="Flag2" select="'Test'"/-->
    <!--xsl:param name="flag" select="' '"/-->
    <ns1:Neutral>
    <headerData>
    <sendingApplication>
    <xsl:variable name="a" select="xs:translate('1,22,3,d,4,5',',')"/>
    <xsl:value-of select="xs:item-at($a,1)"/>
    </sendingApplication>
    This is what I tried in the xsl. I tried with using the prefix xs but to no avail.
    Thanks
    Dipal

  • XPath 2.0: function "matches" missing?

    According to the documentation the xdk version 10.1.0.2.0_production is XSLT 2.0 and XPATH 2.0 compliant.
    The function "matches" for example seems to be missing:
    An example to illustrate the problem:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdt="http://www.w3.org/2005/02/xpath-datatypes">
         <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:template match="/">
    <xsl:if test="matches('...','123')">
              <xsl:text>MATCH</xsl:text>
    </xsl:if>
    </xsl:template>
    </xsl:stylesheet>

    Refer
    http://www.oracle.com/technology/pub/articles/wang_xslt.html
    XSLT 2.0 features supported.

  • Up2date --undo "This feature is deprecated and no longer functional."

    We are trying to se up a Patch Mangement strategy. Our initial thoughts are to have a yum repository updated to a point in time. Then this repository will be used to update the test environment first, then (once it is tested) the dev environment, then production. All from the same 'static' yum repository.
    Our question comes in about 'rolling back' this upgrade if something breaks. The up2date --undo is not longer functional. We have read alot about the rpm rollback and repackage features. But cannot find any current documentation.
    Is anyone managing their patching this way, and have a 'rollback' function in place?
    Thanks.

    While the "--rollback" feature appears to be still present in the versions of rpm(8) shipped with RHEL5/OEL5, the feature was eventually discarded as being unreliable. The RPM/YUM folk decided this was the wrong approach anyway so the rollback code just got tossed.
    Here is a snippet from the Fedora 11 rpm(8) changelog. Now ordinarily you can see the changes in an RPM package like this:
    $ rpm -q --changelog <rpm-package-name>But the RPM changelog has gotten so long, some of it is just packaged in the stock documentation:
    $ cd /usr/share/doc/rpm-*/
    $ bzless Changelog.bz2
    commit d9c780d19edeaf81427411205a9620c9516902c1
    Author: Panu Matilainen <[email protected]>
    Date:   Mon Mar 17 14:36:43 2008 +0200
        Remove rollback and repackage from documentation
    commit db37b74a2bfebf067f421b891d3837baaca7fc6f
    Author: Panu Matilainen <[email protected]>
    Date:   Mon Mar 17 14:27:03 2008 +0200
        Nuke leftover rollback test program, update translations
    commit d89482a7c7777d379ab415ebba747b6af19babdb
    Author: Panu Matilainen <[email protected]>
    Date:   Mon Mar 17 14:10:11 2008 +0200
        Remove repackage support to finish off with rollback
        The two main classes of rollback/repackage need are
        1) Gimme back the previous version, this broke XYZ on my system.
           This is better handled by downgrading to the previous version of original
           package instead of repackaged garbage. We should maintain real package
           (version) history somewhere.
        2) Upgrade messed up my configuration.
           Instead of repackaging everything we could be far more intelligent
           wrt config files, stick them into real version control or at least have
           hooks to do so.
        RPMCALLBACK_REPACKAGE_* and RPMTRANS_FLAG_REPACKAGE definitions left around
        to avoid needlessly breaking everybodys callbacks (for now)
    commit 37543ee0405c38a9d54a12bf0d54698773a3933c
    Author: Panu Matilainen <[email protected]>
    Date:   Mon Mar 17 11:53:27 2008 +0200
        Remove rollback support
        - not possible to do reliably within rpm
        - effort is better wasted on investigating fs-level snapshots, which
          is way beyond rpm scope except for hooks to interact with the snapshot
          mechanism to communicate beginning/end of transaction and such
    commit ed78cef2c3e14df29d95b476f00d51203fbe098e
    Author: Panu Matilainen <[email protected]>
    Date:   Mon Mar 17 12:04:39 2008 +0200
        Remove support for automatic rollback on failure
        - doing this reliably from rpm is simply not possible as there's no way
          to undo script actions, might as well not pretend we can
        - for a feature that's not generally usable it complicates mainline code
          way too much
    ...With that in mind, I would seek another solution such as adequate full back-up archives :D

  • ASM 11gR2 ASM functionality

    Does all of the new ASM functionality for 11gR2 work with the Exadata database machine (ex. ASM Cluster & Single Node File System (ACFS)l)?

    All of ASM's functionality EXCEPT ACFS work.
    This will probably change in a future version.
    On Exadata, clients who need filesystem space use DBFS instead.
    rgds

  • How to Use XPATH 2.0 in BPEL Assign/Transform

    Hi,
    I see a lot of Xpath 2.0 functions defined, http://www.w3schools.com/XPath/xpath_functions.asp .
    But I am not able to use most of them in Jdeveloper 11.1.1.3 BPEL Designer.
    Like I tried to use, xp20:distinct-values , xp20:reverse , x20:string-values etc but it is giving error.
    I can use very few xpath functions which are coming in the Assign/Transform activity drop down (during copy operations)
    strangely some Xpath functions do not come in any LOV but still are working fine like : position() , last() etc .
    How can I use other XPath functions? A list of existing Xpath functions are defined here : http://www.w3.org/TR/xpath-functions/
    Am I missing something ? how can I use all the in-built Xpath 2.0 functions in BPEL ?
    Please could you help.
    Thanks and Regards,
    Sudip

    I have tried that too , putting the namespace from Xpath20 in .bpel file , but still it is giving compilation error saying this is not registered.
    It seems SOA 11g BPEL only supports the xpath extension functions written in bpel-xpath-functions.xml file .
    And it does not support any other Xpath2.0 functions like 'distinct-values' 'reverse' etc.
    And there is no other way than writing custom Xpath functions for bpel 11g in order to get distinct-values of a nodeset etc ... are these conclusions correct?
    Please could anybody suggest?
    Thanks and Regards,
    Sudip

  • XPath result while evaluating with XPathConstants.BOOLEAN

    I am trying to get the value of a boolean attribute but I am getting the wrong result when I try using XPathConstants.BOOLEAN.
    When I use XPathConstants.STRING I do get the correct value.
    The following code:
    public static void main(String[] args) throws Exception {
              String xml = "<?xml version=\"1.0\" ?>" +
                        "<root check=\"false\" />";
              InputSource inputSource = new InputSource(new StringReader(xml));
              Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(inputSource);
              XPath xPath = XPathFactory.newInstance().newXPath();
              System.out.println("check as string: " + xPath.evaluate("root/@check", document, XPathConstants.STRING));
              System.out.println("check as boolean: " + xPath.evaluate("root/@check", document, XPathConstants.BOOLEAN));
         }Has the following output:
    check as string: false
    check as boolean: true
    Please explain.

    I'm guessing (because I can't find any specific documentation on what that constant means) that it evaluates the XPath expression and then coerces it to a boolean value. I'm also guessing that it uses the XPath boolean() function to do that. And you can read about what the boolean() function does here: [http://www.w3.org/TR/xpath#section-Boolean-Functions]

  • XPath 2.0 in mediator?

    Hi,
    Is it possible to use XPath 2.0 in a mediator component in Soa suite 11g?
    I want to use an XPath function in the http://www.w3.org/2005/xpath-functions namespace.
    Groeten,
    HJH

    I tried to find documentation about which XML standards are supported...can't really find anything conclusive.
    But it is possible to use XPath 2.0 functions both in an assign and in a transform.
                      <copy target="$out.reply/inp1:singleString"
                            expression="fn:normalize-space($in.request/inp1:singleString)"
                            xmlns:inp1="http://xmlns.oracle.com/singleString"
                            xmlns:fn="http://www.w3.org/2005/xpath-functions"/>There is no support for these functions in JDeveloper Expression Builder...
    Groeten,
    HJH

  • Oracle.tip.pc.services.functions.Xpath20 missing

    Hello
    I have made a XSL for a ESB service in Jdeveloper 10.1.3.3 and when trying to debug the xsl, I get this error
    Deadlock detection is not supported by the debuggee virtual machine.
    oracle.xml.xpath.XPathException: Extension function error: Class not found 'oracle.tip.pc.services.functions.Xpath20'
    I use the xp20:format-dateTime and xp20:current-date functions.
    If I right-click and choose Test, the xsl works fine also invoking the ESB, the xsl transformation is fine.
    How can I fix this?

    Thanks Guy,
    Sorry for late reply ....
    I try all what I can imagine , but it seems no use , anyway I found a post :
    http://blogs.oracle.com/reynolds/2007/07/whats_the_time_mr_bpel.html
    see Ramkumar Menon 's comment on it .it seems that BPEL complier has limitation ... (even in 11g , it hasn't changed )
    I give up
    Cheers

  • Substring function giving out empty fields

    I am using OAS 10.1.3v . I have a problem with the substring function in the BPEL functions. In 10.1.2v , all the xpaths with substring functions gave out data.
    But in 10.1.3v, all those nodes are seen empty. Is there any particular reason for this ?
    Is this a problem of any particular jar file ? I am using xalan 2.7.0 along with this, for custom functions.
    Also, in which class, inside the jar file, is the substring function defined ?

    Try wrapping the substring function in a @member function. You need the ruturn of a member name not a string. Look at the example of @member in the technical reference for more details

  • Extract function for xmltype replaces ~ (tilde) with ']]]'

    Hi,
    In 10.2.0.4 when extracting fragment using xpath and extract function is replacing ~ with ]]]. strange thing is, it happens with only one ~ though there are many ~ in the xml.
    Has anyone faced similar issue with extract() function ?
    Thanks,
    vivek

    This turned out to be a bug. It was resolved through a patch developed.

  • Xpath package is very slow slow slow

    I am parsing a 168 KB xml document, this document has 300 nodes
    and each node has 22 attributes.
    If I use the xpath package ( valueof ( ) ) function, it takes 5
    minutes to parse the document.
    If I use xmldom calls it only takes 9 secs.
    Is it something wrong with the xpath package ?
    Does anyone alse has seen this problem before ?
    Thanks

    The XPATH packages is a thin layer of helper routines that I
    built while writing my
    Building OracleXML
    Applications book. They turn around and call routines in the XSLPROCESSOR package.
    Signficant performance improvements in our XPath/XSLT processing
    have been made in the XDK 9.0.2. Are you using the latest XDK
    for your testing, XDK 9.0.2D from OTN ?
    You'd want to download/install the XDK 9.0.2D for PL/SQL to
    notice the improvement. Thanks for your answer.. I will download the XDK...

  • Bug in SDO_UTIL.TO_GML311_GEOMETRY with gml:Point?

    Hi folks,
    Looking at creating GML 3.1.1 from an SDO point and noticed that the results are not validating against the schema. From the official 3.1.1 schema at
    http://schemas.opengis.net/gml/3.1.1/base/geometryBasic0d1d.xsd
    you cannot have anything under gml:Point but gml:pos or gml:coordinates (or gml:coord but deprecated)
    However when I run the Oracle function on 11gR2 I get gml:posList instead.
    SELECT TO_CHAR(SDO_UTIL.TO_GML311GEOMETRY(
    SDO_GEOMETRY(2001, 8265, SDO_POINT_TYPE(-81.7121, 29.1844,NULL),NULL,NULL)
    )) FROM dualreturns
    <gml:Point srsName="SDO:8265" xmlns:gml="http://www.opengis.net/gml">
       <gml:posList srsDimension="2">-81.7121 29.1844 </gml:posList>
    </gml:Point> Is this just a simple bug or am I missing something? Seems odd that something so fundamental as generating a point could have a bug. I checked and the newer GML 3.2.1 specification is the same as this would not validate against it either.
    Cheers,
    Paul

    Hi folks,
    I completely forgot about this issue but recently noticed it was not fixed in the 11.2.0.2 update nor the October 2010 PSU.
    So I submitted it officially to Oracle Support as Bug 10411414.
    Cheers,
    Paul

  • Error while executing a custom java code from report in BI Publisher

    Hi,
    I have created a custom code added the jar in /opt/oracle/BI_Middleware/user_projects/domains/bifoundation_domain/lib and created a rtf template and added a code in that
      <?namespace:bipext=http://www.oracle.com/XSL/Transform/java/com.test.bi.CustomFunctions?>
      <?for-each:listOfNames?>
      <?bipext:helloFunction(name)?>
      <?end for-each?>
    according to the blog
    Vishal's blog: Using custom transformations in BI Publisher 10G
    I am using BI Publisher 11g and weblogic . But I am getting the below error when running the report . Please help . Its urgent.
    getting the below error from the BI Publisher desktop software
    FOProcessor setLocale: en-us
    oracle.xdo.XDOException: java.lang.reflect.InvocationTargetException
        at oracle.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1205)
        at oracle.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:276)
        at oracle.xdo.template.FOProcessor.createFO(FOProcessor.java:1973)
        at oracle.xdo.template.FOProcessor.generate(FOProcessor.java:1117)
        at RTF2PDF.runRTFto(RTF2PDF.java:659)
        at RTF2PDF.runXDO(RTF2PDF.java:452)
        at RTF2PDF.main(RTF2PDF.java:302)
    Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at oracle.xdo.common.xml.XSLT10gR1.invokeProcessXSL(XSLT10gR1.java:917)
        at oracle.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:609)
        at oracle.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:327)
        at oracle.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:187)
        at oracle.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1181)
        ... 6 more
    Caused by: oracle.xdo11g.xpath.XPathException: Extension function error: Class not found 'com.test.bi.CustomFunctions'
        at oracle.xdo11g.xslt.XSLStylesheet.flushErrors(XSLStylesheet.java:1850)
        at oracle.xdo11g.xslt.XSLStylesheet.execute(XSLStylesheet.java:616)
        at oracle.xdo11g.xslt.XSLStylesheet.execute(XSLStylesheet.java:551)
        at oracle.xdo11g.xslt.XSLProcessor.processXSL(XSLProcessor.java:341)
        at oracle.xdo11g.xslt.XSLProcessor.processXSL(XSLProcessor.java:189)
        at oracle.xdo11g.xslt.XSLProcessor.processXSL(XSLProcessor.java:226)
        at oracle.xdo11g.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:122)
        ... 15 more
    and below error from GUI
    Error 
    The report cannot be rendered because of an error, please contact the administrator.
    Error Detail
    oracle.xdo.XDOException: oracle.xdo.XDOException: XSLT10gR1: Failed Secure Java Extensions check.
    Please help
    Thanks,
    Sahana

    BI Publisher

  • Incoming Email on Windows Server 2012

    Windows Server 2012:
    SMTP and the associated management tools are deprecated. Though the functionality is still available in Windows Server 2012, you should begin using System.Net.Smtp. With this API, you will not be able to insert a message into a file for pickup; instead configure
    Web applications to connect on port 25 to another server using SMTP.
    Question:
    If this is the case, is there a TechNet article that has instructions for installing/using incoming email on a SharePoint 2013 web front end?
    What I know:
    Why do we install deprecated features http://technet.microsoft.com/en-us/library/cc263260 (Plan incoming email for a SharePoint farm in SharePoint 2013) to make this work?
    What to do:
    I want to use the basic scenario for incoming email, but with the information above about Windows Server it looks rather like idiotic to follow those directions in the TechNet article.
    How to do this:
    "... instead configure Web applications to connect on port 25 to another server using SMTP." Huh? Oh stupid me!
    Thoughts???
    NOTE: We do use Exchange for incoming email.
    Chris

    You will need to continue to use the IIS6 SMTP Virtual Server for SharePoint incoming email. I'm sure by the time the feature is dropped, the SharePoint group will have an alternate solution.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

Maybe you are looking for

  • Package and Directory Structure

    Hello -- I work in a group that supports 3 web sites. (b2b, b2c, b2e) We're just beginning to develop Java in-house and currently using Solaris and JDK 1.2.x. I need to propose a package and directory structure strategy. The "reverse the domain name"

  • Issue restarting MacBook Pro, hard drive corruption, explain please

    Hi I am having huge troubles with my MacBook Pro. I was wondering if anyone could possibly explain the reason behind that. Paste of the report: Anonymous UUID:       4932FEB6-68AC-2C4D-886E-1D395BFF8484 Tue Jan  7 20:12:07 2014 panic(cpu 0 caller 0xf

  • Why can't we add programs to the list of right-click "open with" in Bridge?

    I've followed various discussions and can find no official solution, nor any easy-to-follow solution for this issue. What is the point of having bridge if we are unable to right click from bridge and open any image in any of the CC programs. Am I mis

  • DS license with Solaris: 5.1 vs. 5.2?

    My understanding was that Solaris 9 comes with a license to use Sun ONE DS 5.1 with up to 200,000 entities (having userPassword) primarily for Naming Services, but that this license didn't extend to DS 5.2. I'm seeing a lot of traffic about using 5.2

  • Java Programming Help

    I'm new to Java programming, and I have a pretty basic question. I'm writing a simple loan calculator, and I need to know how to format the output of my variables to two decimal places. I've been doing this for about a week, so be nice, please. Thank