Evaluating xpath expressions

Hi all,
I have an xml document as
<?xml version="1.0" encoding="UTF-8"?>
<purchaseReport xmlns="http://www.example.com/Report" >
<regions>
<zip code="95819">
<part number="872-AA" quantity="1"/>
<part number="926-AA" quantity="1"/>
<part number="833-AA" quantity="1"/>
<part number="455-BX" quantity="1"/>
</zip>
<zip code="63143">
<part number="455-BX" quantity="4"/>
</zip>
</regions>
<parts>
<part number="872-AA">Lawnmower</part>
</parts>
</purchaseReport>
when I evaluate the for an expression xpath_object.evaluate(f,"/purchaseReport/parts/part/@number",NODE)
I am getting null as return value.
I have set the namespace context for xpath_object as
xpath_object.setNameSpaceContext(new name_space_context());
class name_space_context implements NamespaceContext{
public String getNamespaceURI(String prefix){
//System.out.println("A call was made here");
if(prefix.equals(XMLConstants.DEFAULT_NS_PREFIX)){
System.out.println("A call was made here");
return "http://www.example.com/Report";
else if(prefix.equals(XMLConstants.XML_NS_PREFIX)) {
System.out.println("A call was made here");
return XMLConstants.XML_NS_URI;
else if (prefix.equals(XMLConstants.XMLNS_ATTRIBUTE)){
System.out.println("A call was made here");
return XMLConstants.XMLNS_ATTRIBUTE_NS_URI;
else if(prefix.equals("def")){
System.out.println("A call was made here def");
return "http://www.example.com/Report";
else if(prefix.equals("si")){
System.out.println("A call was made here si");
return "http://www.example.com/Report/si";
else if(prefix.equals("")){
System.out.println("A call was made here empty");
return "http://www.example.com/Report";
else {
return "There is no matching prefix with the given input" + prefix;
please explain why me I am getting null when I evalute the expression.

Hi tsuji,
I am trying to update the element value in my xml , by getting input the xml and the xpath.
My code is as below.
InputSource is;
is = new InputSource(new StringReader(input.toString()));
Node node = (Node)xPath.evaluate(XPATH, is, XPathConstants.NODE);
node.setTextContent(newValue);
I succeeded in evaluating the namespace prefix also.
After updating the value of the node, I tried to display the updated xml. But i couldnt succeed.
i tried,
Making 'Document' out of the 'is' - but failed throws NullPointerException in Document doc=dBuilder.parser(is)
Please help me in displaying the updated XMLdocument.
I have a doubt here, in this case like mere changing the value of the node, will it change the original InputSource 'is'
But , when i used
NodeIterator nl = XPathAPI.selectNodeIterator(doc, xpath); //here doc is the Document object, xpath is String object
n=nl.nextNode();
n.setTextContent(newValue);
Then when i tried displaying the doc again, it gave me the updated document.
I couldnt proceed with NodeIterator , i couldnt apply the setNamespaceContext.
Kindly help me in this regard.
Thanks,
Sabarisri. N

Similar Messages

  • Comparing xpath expressions

    I would like to be able to compare two xpath expressions and evaluate whether their result CAN have nodes in common.
    For example:
    expression 1: /ItemData[@ItemOID='A']
    expression 2: /ItemData[@ItemOID='B']
    would need to evaluate to 'false'
    Other example:
    expression 1: /ItemData[@ItemOID='A']
    expression 2: /ItemData[@ItemOID='B or @ItemOID='A']
    would need to evaluate to 'true'
    Other example:
    expression 1: /ItemData[@ItemOID='A']
    expression 2: /ItemData[not(@ItemOID='B')]
    would need to evaluate to 'true'
    Other example:
    expression 1: /ItemData[@ItemOID='A']
    expression 2: /ItemData[not(@ItemOID='A'][not(@ItemOID='B']
    would need to evaluate to 'false'
    P.S. Sorry if the Xpath expressions do not show up 100% correctly in the above snippets - the editor is doing crazy ...
    I would like to do such an evaluation without actually having an XML document (!).
    Is this possible?
    Did someone ever write a class for doing so ?
    Many thanks
    Jozef

    XML4Pharma wrote:
    Is this possible?As phrased probably. You would need to create a xpath parser then compare the parse trees for expression equivalency.
    You might be able to find a xpath parser. The other part you would need to create yourself.

  • Namespace-aware XPath expressions?

    In xMII 11.5.2 b64, I need to extract a node from a SOAP message:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
       <soapenv:Header/>
       <soapenv:Body>
          <ns0:importRequest xmlns:ns0="http://www.acme.com/1.0/schemas">
            <FOO>
    The following xMII Assign action Link returns me the entire <FOO> nodeset:
    Transaction.SOAPRequest{/soapenv:Envelope/soapenv:Body/ns0:importRequest/*}
    However, I cannot be guaranteed that the namespace prefixes will always be "soapenv" and "ns0".  For example, the following is perfectly valid:
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP:Header/>
       <SOAP:Body>
          <ZZZ:importRequest xmlns:ZZZ="http://www.acme.com/1.0/schemas">
            <FOO>
    When they are changed the XPath fails.  I have tried the following:
    Transaction.SOAPRequest{/Envelope/Body/importRequest/*}
    Transaction.SOAPRequest{//importRequest/*}
    but they clearly don't work because the XPath evaluator in xMII is namespace aware (as it should be).
    How can I declare namespaces in my XPath expression?  Or are there any other alternate ideas?
    Thanks,
    -tim

    I installed SR3 and re-ran my tests and it still fails.  Here is my XML snippet:
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:sch="http://www.acme.com/4.3/schemas">
       <SOAP:Header/>
       <SOAP:Body>
          <sch:importIDOCRequest>
             <MATMAS03>
    Here's the output from various expressions in the Link editor:
    example 1 - getting the name of the root node:
    "root node name=" & Transaction.SOAPRequest{name(/*)}
    output 1 is predictable:
    [INFO ]: root node name=SOAP:Envelope
    example 2 - using 'senv' instead of 'SOAP' for the soap-envelope namespace prefix:
    "importRequest child node name=" & Transaction.SOAPRequest{name(/senv:Envelope/senv:Body/sch:importIDOCRequest/*)}
    output 2:
    [INFO ]: importRequest child node name=
    example 3 - no namespace prefixes specified:
    "importRequest child node name=" & Transaction.SOAPRequest{name(/Envelope/Body/importIDOCRequest/*)}
    output 3:
    [INFO ]: importRequest child node name=
    example 4 - using the same node namespaces prefixes as the input XML:
    "importRequest child node name=" & Transaction.SOAPRequest{name(/SOAP:Envelope/SOAP:Body/sch:importIDOCRequest/*)}
    output 4:
    [INFO ]: importRequest child node name=MATMAS03
    Any other ideas?
    -tim

  • XPath expression for Native Schema (Opaque)

    Hi people,
    I have a BPEL process that dequeues a message using AQ Adapter, and we are using a Native (Opaque) schema for that, since we do not have the XSD available for this message. The XML Message generated is:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <input_Dequeue_InputVariable>
    - <part>
    - <ns1:XXOD_IN_PERI_MWDProcessRequest xmlns:ns1="http://xmlns.oracle.com/XXOD_IN_PERI_MWD">
    <ns1:UE>3704</ns1:UE>
    <ns1:MATRICULA>00003953-0</ns1:MATRICULA>
    <ns1:CODIGOVERBA>PE</ns1:CODIGOVERBA>
    <ns1:TIPOVALOR>PCT</ns1:TIPOVALOR>
    <ns1:DATAINICIO>2009-09-15</ns1:DATAINICIO>
    <ns1:DATAFIM />
    <ns1:VALOR>30,0000000</ns1:VALOR>
    <ns1:ACAO>I</ns1:ACAO>
    </ns1:XXOD_IN_PERI_MWDProcessRequest>
    </part>
    </input_Dequeue_InputVariable>
    When i dequeue this, i use the following expression to get the value of tag ns1:ACAO in a copy operation:
    bpws:getVariableData('input_Dequeue_InputVariable','opaque', '//ns1:ACAO')
    However, this expression seems to be evaluating to NULL on the assign activity. I believe i am not using the correct Xpath expression to extract that... Do you know what is the correct XPath expression to extract this tag in this case?
    I am using SOA Suite 10.1.3.5.
    Best Regards
    Thiago
    Edited by: Thiago on Jan 28, 2010 5:08 PM

    Hi Eric,
    Unfortunately not. When the schema is Opaque, the variable in BPEL editor shows as "opaque", when i open it on the variable editor i see only the root element named "ns4:opaqueElement", and not the structure of the actual XML. I think it happens because this variable is not bound to any XSD...
    Thanks and Regards
    Thiago

  • XPath Expression's setup(Document  Def) doesn't seem to be working in 11g

    After setting up XPath Expression's in XPath Tab as part of Doc Definition setup , B2B 11g does not seem to be evaluating them.
    When I check the reports all the Xpath Value's are empty
    Am I missing something here or i sthis feature in Preview mode ?
    PS: XPath Expression is valid
    Thanks,
    Kalyan Sura

    Hi Kalyan,
    under the custom document definition that got created.
    select "Identification Type" as XML
    in the below panel,
    there will be 4 tabs
    use only the XML tab.
    that XML tab has 3 options
    Identification Expression (XPath) -- enter your xpath expression
    Identification Value     - matching value for above expression [ option ]
    DTD/XSD NamespaceConversioN
    please try this out.
    Thanks
    note: also to start with please create your doc definition again to try this out.

  • XPath Expression won't evaluate

    Hi,
    I am using the ora:doc() function to read an xml and XPath to get extract particular values from it. The issue is that the XPath expression doesnt evaluate correctly on Oracle BPEL process manager where as the same expression is being evaluated correctly in XMLSPY with XPath 1.0.
    The XML that I am trying to read is of the format
    <?xml version="1.0" encoding="UTF-8"?>
    <!--Sample XML file generated by XMLSpy v2006 U (http://www.altova.com)-->
    <n:CHNotification xmlns:n="http://www.example.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.example.org
    C:\OraBPELPM_1\integration\jdev\jdev\mywork\BPELWorkspace\testXML\CallHomeNotification.xsd">
         <Notification id="String">
              <n:mailto>String</n:mailto>
              <n:mailcc>String</n:mailcc>
              <n:subject>String</n:subject>
              <n:body>String</n:body>
              <n:additionalbody>String</n:additionalbody>
         </Notification>
         <Notification id="String32432">
              <n:mailto>String</n:mailto>
              <n:mailcc>String</n:mailcc>
              <n:subject>String</n:subject>
              <n:body>String</n:body>
              <n:additionalbody>String</n:additionalbody>
         </Notification>
    </n:CHNotification>
    The function being used in OracleBPEL Process manager is
    ora:doc('${server_url}/xmllib/notification.xml', //Notification[@id="String"]/n:mailto)
    Can somebody please tell me where I could be going wrong?....It'll be a great help.
    Thanks,
    Gunjan

    I have the same problem posted in the constants discussion
    Hi
    I am trying out the xml file solution. I have places an XML-file in the xmllib location. The file has the following content :
    <?xml version="1.0" encoding="UTF-8">
    <bpel-domain>
    <preferences>
    <property name="defaultRentepercentage"> 0.3 </property>
    </preferences>
    </bpel-domain>
    In the Assign step in BPEL I do the following
    orcl:lookup-xml('http://localhost:9700/orabpel/xmllib/trials-properties.xml', '/bpel-domain/preferences/property[@name="defaultRentepercentage"]')
    The error I get when running this is the following
    XPath expression failed to execute.
    Error while processing xpath expression, the expression is "orcl:lookup-xml("http://localhost:9700/orabpel/xmllib/trials-properties.xml", "/bpel-domain/preferences/property[@name="defaultRentepercentage"]")", the reason is ExtFuncFunction.
    Please verify the xpath query.
    I have tried the xpath expression in XMLSpy, and there it seems to work
    Am i missing something ?

  • XPath expression failed to execute.

    Hi Everybody ,
    I am working  AIA PIP 3.1 for JDE E1.I am facing some errors so that i can't proceed.
    See the log errors as below:
    javax.xml.ws.soap.SOAPFaultException: XPath expression failed to execute. An error occurs while processing the XPath expression; the expression is ora:processXSLT('xsl/Xform_BillOfMaterialsListABM_to_BillOfMaterialsListAXML.xsl',bpws:getVariableData('InitialLoadBillOfMaterialsListReqMsg','InitialLoadBillOfMaterialsList'),bpws:getVariableData('Parameters')). The XPath expression failed to execute; the reason was: oracle.fabric.common.xml.xpath.XPathFunctionException: javax.xml.transform.TransformerException: oramds:/deployed-composites/default/InitialLoadBillOfMaterialsListJDEE1toAgileImpl_rev1.0/xsl/Xform_BillOfMaterialsListABM_to_BillOfMaterialsListAXML.xsl<Line 18, Column 271>: XML-22044: (Error) Extension function error: Error invoking 'lookupXRef':'oracle.tip.xref.exception.RepositoryException: lookup could not find values in column name "AGILE_01" for table name "oramds:/apps/AIAMetaData/xref/ITEM_ITEMID.xref" using reference column name "JDEE1_01" and reference value "731882::M30" Please ensure lookup criteria has a match.'. Check the detailed root cause described in the exception message text and verify that the XPath query is correct.
    Please reply me ASAP,
    Waiting for your response.....
    Regards
    Jyoti Nayak

    Hi,
    Ya i checked the data for same table,but i didn't get any XREF related information in xref_data table.
    Did you mean that, data should already present under AIAFPINST_XREF.Probably xref is meant for storing dynamic value.
    Please check the above error and reply me soon.
    With Regards
    Jyoti Nayak

  • Using the variable placeholder ? in an XPath expression

    I'm trying to using the variable operator (?) in an Oracle prepared statement used in a query where clause. Here is the query:
    select xt.APPLICATION_NAME, xt.VERSION, xt.EVENT_TYPE, xt.SENDING_SITE, xt.RECEIVING_SITE, xt.EVENT_ID
          from AUDITED_EVENT_XML_MIN e,
             XMLTable(XMLNAMESPACES('http://gov/va/med/datasharing/audit/endpoint/audit' AS "xae"),
                    '/xae:auditable-event'
                    PASSING e.xml_event_content
                    COLUMNS
                    APPLICATION_NAME VARCHAR2(255) PATH 'xae:application-name',
                    VERSION          VARCHAR2(255) PATH 'xae:version',
                    EVENT_TYPE       VARCHAR2(255) PATH 'xae:event-type',
                    SENDING_SITE     VARCHAR2(255) PATH 'xae:xml-event-content/*/MSH/MSH.4/HD.2',
                    RECEIVING_SITE   VARCHAR2(255) PATH 'xae:xml-event-content/*/MSH/MSH.6/HD.2',
                    EVENT_ID         VARCHAR2(255) PATH 'xae:xml-event-content/*/MSH/MSH.10') xt
                where existsNode(E.XML_EVENT_CONTENT, '/xae:auditable-event[xae:event-type=?]','xmlns:xae="http://gov/va/med/datasharing/audit/endpoint/audit"') = 1This code works when the ? is replaced with "aValue". I need to use the ? so that my Java client can pass a variable value into the query.
    Is this a supportable feature or am I doing something wrong?
    I didn't see any examples in the Oracle XML DB Developers Guide where there was a ? in an XPath expression.
    I also tried "?" with the same issue...
    Here is the version info:
    SQL*Plus: Release 11.1.0.6.0 - Production on Mon Sep 10 18:41:55 2012
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing optionsAny assistance would be greatly appreciated.
    Thanks in advance...
    Edited by: flyeagle5683 on Sep 10, 2012 5:49 PM

    select xt.APPLICATION_NAME, xt.VERSION, xt.EVENT_TYPE, xt.SENDING_SITE, xt.RECEIVING_SITE, xt.EVENT_ID
          from AUDITED_EVENT_XML_MIN e,
             XMLTable(XMLNAMESPACES('http://gov/va/med/datasharing/audit/endpoint/audit' AS "xae"),
                    '/xae:auditable-event'
                    PASSING e.xml_event_content
                    COLUMNS
                    APPLICATION_NAME VARCHAR2(255) PATH 'xae:application-name',
                    VERSION          VARCHAR2(255) PATH 'xae:version',
                    EVENT_TYPE       VARCHAR2(255) PATH 'xae:event-type',
                    SENDING_SITE     VARCHAR2(255) PATH 'xae:xml-event-content/*/MSH/MSH.4/HD.2',
                    RECEIVING_SITE   VARCHAR2(255) PATH 'xae:xml-event-content/*/MSH/MSH.6/HD.2',
                    EVENT_ID         VARCHAR2(255) PATH 'xae:xml-event-content/*/MSH/MSH.10') xt
                where XMLEXISTS(
                           'declarre namespace xae ="http://gov/va/med/datasharing/audit/endpoint/audit"; (: :)
                            $XML/xae:auditable-event[xae:event-type=$VALUE]'
                            passing e.xml_event_content as "XML",
                                      :1 as "VALUE"
                ) or you can do
    select xt.APPLICATION_NAME, xt.VERSION, xt.EVENT_TYPE, xt.SENDING_SITE, xt.RECEIVING_SITE, xt.EVENT_ID
          from AUDITED_EVENT_XML_MIN e,
             XMLTable(XMLNAMESPACES('http://gov/va/med/datasharing/audit/endpoint/audit' AS "xae"),
                    '/xae:auditable-event'
                    PASSING e.xml_event_content
                    COLUMNS
                    APPLICATION_NAME VARCHAR2(255) PATH 'xae:application-name',
                    VERSION          VARCHAR2(255) PATH 'xae:version',
                    EVENT_TYPE       VARCHAR2(255) PATH 'xae:event-type',
                    SENDING_SITE     VARCHAR2(255) PATH 'xae:xml-event-content/*/MSH/MSH.4/HD.2',
                    RECEIVING_SITE   VARCHAR2(255) PATH 'xae:xml-event-content/*/MSH/MSH.6/HD.2',
                    EVENT_ID         VARCHAR2(255) PATH 'xae:xml-event-content/*/MSH/MSH.10') xt
          WHERE EVENT_TYPE = :1Edited by: mdrake on Sep 10, 2012 7:23 PM
    Edited by: mdrake on Sep 10, 2012 7:24 PM

  • Using the variable ? operator in an XPath Expression

    I'm trying to using the variable operator (?) in an Oracle prepared statement used in a query where clause. Here is the query:
    select xt.APPLICATION_NAME, xt.VERSION, xt.EVENT_TYPE, xt.SENDING_SITE, xt.RECEIVING_SITE, xt.EVENT_ID
          from AUDITED_EVENT_XML_MIN e,
             XMLTable(XMLNAMESPACES('http://gov/va/med/datasharing/audit/endpoint/audit' AS "xae"),
                    '/xae:auditable-event'
                    PASSING e.xml_event_content
                    COLUMNS
                    APPLICATION_NAME VARCHAR2(255) PATH 'xae:application-name',
                    VERSION          VARCHAR2(255) PATH 'xae:version',
                    EVENT_TYPE       VARCHAR2(255) PATH 'xae:event-type',
                    SENDING_SITE     VARCHAR2(255) PATH 'xae:xml-event-content/*/MSH/MSH.4/HD.2',
                    RECEIVING_SITE   VARCHAR2(255) PATH 'xae:xml-event-content/*/MSH/MSH.6/HD.2',
                    EVENT_ID         VARCHAR2(255) PATH 'xae:xml-event-content/*/MSH/MSH.10') xt
                where existsNode(E.XML_EVENT_CONTENT, '/xae:auditable-event[xae:event-type=?]','xmlns:xae="http://gov/va/med/datasharing/audit/endpoint/audit"') = 1This code works when the ? is replaced with "aValue". I need to use the ? so that my Java client can pass a variable value into the query.
    Is this a supportable feature or am I doing something wrong?
    I didn't see any examples in the Oracle XML DB Developers Guide where there was a ? in an XPath expression.
    I also tried "?" with the same issue...
    Here is the version info:
    SQL*Plus: Release 11.1.0.6.0 - Production on Mon Sep 10 18:41:55 2012
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing optionsAny assistance would be greatly appreciated.
    Thanks in advance...

    I incorporated this suggestion and it worked very well. Thanks!
    Now I have converted my solution to use a structured index. As such, I want to write the where clauses in terms of column names rather than XPath expressions.
    I hoped it was as simple as changing the code that generates the XPath expression to generate a SQL expression. After making that change, I'm now getting this error:
    Caused by: java.sql.SQLSyntaxErrorException: ORA-00920: invalid relational operator
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)
         at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:686)
         at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:617)
         at oracle.jdbc.driver.T2CPreparedStatement.executeForDescribe(T2CPreparedStatement.java:559)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1077)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3381)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3425)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1490)
         at gov.va.med.datasharing.audit.dao.jdbc.runner.MapQueryRunner.run(MapQueryRunner.java:47)
         at gov.va.med.datasharing.audit.web.dao.jdbc.AuditableEventsQueryDAOImpl.getAuditableEventsByDate(AuditableEventsQueryDAOImpl.java:150)It seemed to me that if it worked for the XPath expression that it should also work for the SQL expression.
    The static SQL is:
    SELECT PK_ID, EVENT_TYPE, OUTCOME, SENDING_SITE, RECEIVING_SITE, CREATED_TIME, EVENT_ID, PATIENT_ID FROM
      (SELECT rownum as rn, PK_ID, EVENT_TYPE, OUTCOME, SENDING_SITE, RECEIVING_SITE, CREATED_TIME, EVENT_ID, PATIENT_ID FROM
         (SELECT aet.AUDITABLE_EVENT_XML_PK_ID AS PK_ID, xt.EVENT_TYPE, xt.OUTCOME, xt.SENDING_SITE, xt.RECEIVING_SITE, aet.CREATED_TIME as CREATED_TIME, xt.EVENT_ID, xt.PATIENT_ID
            FROM AUDITABLE_EVENT_XML aet,
              XMLTable(XMLNAMESPACES('http://gov/va/med/datasharing/audit/endpoint/audit' AS "xae"),
                '/xae:auditable-event'
                PASSING aet.xml_event_content
                COLUMNS
                EVENT_TYPE       VARCHAR2(255) PATH 'xae:event-type',
                SENDING_SITE     VARCHAR2(255) PATH 'xae:sending-site',
                RECEIVING_SITE   VARCHAR2(255) PATH 'xae:receiving-site',
                EVENT_ID         VARCHAR2(255) PATH 'xae:event-id',
                PATIENT_ID           VARCHAR2(255) PATH 'xae:patient-id',
                OUTCOME                VARCHAR2(255) PATH 'xae:outcome') xt
            WHERE aet.CREATED_TIME BETWEEN ? AND ?
                 AND ?
          ) ORDER BY CREATED_TIME desc
        ) WHERE rn &gt; ? and rn &lt;= ?So I'm thinking that Oracle must perform strong checking in SQL, not allowing the '=' operator to be substituted. If I run this query in Toad, replacing the ? with the SQL, it runs fine...
    Can someone tell me whether or not this is a legal substitution?
    The SQL that runs in Toad is:
    SELECT PK_ID, EVENT_TYPE, OUTCOME, SENDING_SITE, RECEIVING_SITE, CREATED_TIME, EVENT_ID, PATIENT_ID FROM
      (SELECT rownum as rn, PK_ID, EVENT_TYPE, OUTCOME, SENDING_SITE, RECEIVING_SITE, CREATED_TIME, EVENT_ID, PATIENT_ID FROM
         (SELECT aet.AUDITABLE_EVENT_XML_PK_ID AS PK_ID, xt.EVENT_TYPE, xt.OUTCOME, xt.SENDING_SITE, xt.RECEIVING_SITE, aet.CREATED_TIME as CREATED_TIME, xt.EVENT_ID, xt.PATIENT_ID
            FROM AUDITABLE_EVENT_XML aet,
              XMLTable(XMLNAMESPACES('http://gov/va/med/datasharing/audit/endpoint/audit' AS "xae"),
                '/xae:auditable-event'
                PASSING aet.xml_event_content
                COLUMNS
                EVENT_TYPE       VARCHAR2(255) PATH 'xae:event-type',
                SENDING_SITE     VARCHAR2(255) PATH 'xae:sending-site',
                RECEIVING_SITE   VARCHAR2(255) PATH 'xae:receiving-site',
                EVENT_ID         VARCHAR2(255) PATH 'xae:event-id',
                PATIENT_ID         VARCHAR2(255) PATH 'xae:patient-id',
                OUTCOME             VARCHAR2(255) PATH 'xae:outcome') xt
            WHERE aet.CREATED_TIME BETWEEN TO_DATE ('9/19/2011 12:00:01 AM','MM/DD/YYYY HH:MI:SS PM')
                                         AND TO_DATE ('12/20/2012 12:00:00 AM','MM/DD/YYYY HH:MI:SS PM')
                AND (OUTCOME=0 or OUTCOME=1)
          ) ORDER BY CREATED_TIME desc
        ) WHERE rn > 0 and rn <= 5;Any assistance will be appreciated,
    Thanks in advance.

  • Using xpath expressions in Document-Builder

    Hi all
    we have re-designed our (existing) DDX-templates with the Document Builder in LC Workbench. The DDX templates are used to assemble PDFs with LC Assembler-Service.
    Now my question: Is it still possible to use XPath-expression in the DDX template? Please find our example below:
    The XPath expression works only if we copy&paste the DDX source code directly to the Assembler-Service property view (picture below). But referring the DDX-template doens't interpret the xpath path at run time (2nd picture below). Any help on that will be appreciated!
    Works (using DDX source code directly):
    Doesn't work (using DDX template):

    Hi,
    >
    I tried to get a portion of an XML by using XPath Expressions as follows:
    String xPathExpression =
    "declare namespace xq='http://inti.notariado.org/indices' " +
    "$this/xq:RULES/xq:RULE[@disabled]";
    I think any XPath expressions which use [] are not supported in stand alone
    version, but as this is not documented I could be wrong.
    Regards
    Arek

  • [Error ORABPEL-10039]: invalid xpath expression  - array processing

    hi,
    I am trying to process multiple xml elements
    <assign name="setinsideattributes">
    <copy>
    <from expression="ora:getElement('Receive_1_Read_InputVariable','BILL','/ns2:BILL/ns2:CMS1500['bpws:getVariableData('iterator')']/ns2:HEADER/ns2:SSN')"/>
    <to variable="ssn"/>
    </copy>
    </assign>
    where iterator is a index variable .
    I am getting into this error .
    Error(48):
    [Error ORABPEL-10039]: invalid xpath expression
    [Description]: in line 48 of "D:\OraBPELPM_1\integration\jdev\jdev\mywork\may10-workspace\multixm-catch\multixm-catch.bpel", xpath expression "ora:getElement('Receive_1_Read_InputVariable','BILL','/ns2:BILL/ns2:CMS1500['bpws:getVariableData('iterator')']/ns2:HEADER/ns2:SSN')" specified in <from> is not valid, because XPath query syntax error.
    Syntax error while parsing xpath expression "ora:getElement('Receive_1_Read_InputVariable','BILL','/ns2:BILL/ns2:CMS1500['bpws:getVariableData('iterator')']/ns2:HEADER/ns2:SSN')", at position "77" the exception is Expected: ).
    Please verify the xpath query "ora:getElement('Receive_1_Read_InputVariable','BILL','/ns2:BILL/ns2:CMS1500['bpws:getVariableData('iterator')']/ns2:HEADER/ns2:SSN')" which is defined in BPEL process.
    [Potential fix]: Please make sure the expression is valid.
    any information on how to fix this .
    thanks in advance

    check out this note here
    http://clemensblog.blogspot.com/2006/03/bpel-looping-over-arrays-collections.html
    hth clemens

  • XPath Expression

    Hey Guys...
    Currently I am working on one Xpath expression issue..as described below;
    Its a File to Idoc scenario  ...where in I need to check the two Item level nodes and based on that need to produce the target Idoc. and my souce structure look like this....
    DT_Input
           Header ---    1 to 1
                 H1
                 H2
                 H3
           Item  -
         0 - Unbounded
              Item_1
              Item_2
              Item_3
    Query :  If the Item_1 and Item_3 are not equal AND  Item_1 not equal to blank ...then I need to produce the target Idoc otherwise not!
    Can you please help me out!!!
    Cheers.,
    S

    You could create an advance user defined function.
    fed your function with the 3 values (Item_1 and Item3).
    Inside the function, check the values of Item_1 and Item_3 nodes.
    What is the result of your query? I mean, if your query is meet, Which value do you want to populate in your IDOC?
    You should use this sentence: result.addValue(a[0]). It is supposed a is the value returned by the funcion.
    If you don`t want create the node in the IDOC, use this other one: result.addValue(ResultListCC).
    Regards,
    Carlos

  • XPATH-expressions and namespaces

    I have a xml-file for testing my xpath expression, like this:
    <a>
       <b>
          <c>aaa</c>
             <d>
                <e>111</e>
             </d>
       </b>
       <b>
          <c>bbb</c>
             <d>
                <e>222</e>
             </d>
       </b>
       <b>
          <c>ccc</c>
             <d>
                <e>333</e>
             </d>
       </b>What I want is to get the value of element 'e', based on a check on what the value of element 'c' is. I alway know the value of element 'c'.
    I solve this by using this xpath-expression in my xsl-file:
    <xsl:variable name="xpathTest" select="//e[../preceding-sibling::c = 'bbb']" />This expression should return '222', and it works!!!
    But, when I use the another xml-file with a similar structure, with namespaces, like this:
    <body xsi:type="fkpsoap:FKPSOAPOperationResponse">
       <FKPSOAPOperationResponse>
          <fkpsoap_1:fkrdk178_output_data>
             <fkpsoap_1:fkrdk178_list_cust_information>
                <fkpsoap_1:fkrdk178_list_customerinfo>
                   <fkpsoap_1:fkrdk178_list_variable_code> aaa </fkpsoap_1:fkrdk178_list_variable_code>
                   <fkpsoap_1:fkrdk178_list_value_name>
                      <fkpsoap_1:fkrdk178_list_value_text> 111 </fkpsoap_1:fkrdk178_list_value_text>
                </fkpsoap_1:fkrdk178_list_customerinfo>
                <fkpsoap_1:fkrdk178_list_customerinfo>
                   <fkpsoap_1:fkrdk178_list_variable_code> bbb </fkpsoap_1:fkrdk178_list_variable_code>
                   <fkpsoap_1:fkrdk178_list_value_name>
                      <fkpsoap_1:fkrdk178_list_value_text> 222 </fkpsoap_1:fkrdk178_list_value_text>
                </fkpsoap_1:fkrdk178_list_customerinfo>
                <fkpsoap_1:fkrdk178_list_customerinfo>
                   <fkpsoap_1:fkrdk178_list_variable_code> ccc </fkpsoap_1:fkrdk178_list_variable_code>
                   <fkpsoap_1:fkrdk178_list_value_name>
                      <fkpsoap_1:fkrdk178_list_value_text> 333 </fkpsoap_1:fkrdk178_list_value_text>
                </fkpsoap_1:fkrdk178_list_customerinfo>
             </fkpsoap_1:fkrdk178_list_cust_information>
          </fkpsoap_1:fkrdk178_output_data>
       </FKPSOAPOperationResponse>
    </body>Then the xpath-expression does not work!
    I can easily extract the value of the element similar to the element 'e' in my test-file, but then I will always get the value from the first occurance of 'e', which is '111'.
    Can anyone help me with this?

    Most APIs which let you create XPath objects allow you to create a namespace context and attach it to the XPath object. Your API most likely does too, whatever it is. Then you would just use the prefixes which the namespace context describes in your XPath expression.
    (This namespace context generally maps prefixes to namespace URIs. Remember that the namespace URI is really what the XPath is looking for and the prefix is just a short cut for you to use.)

  • XPath Expressions

    Hi,
    I am trying to select a particular node in a loaded DOM tree based on XPATH expressions. Rightnow We are using Xerces parser.
    Can anyone throw some light on this? i.e. Standard way of implementing this?
    Thanks in anticipation.
    With Regards
    K.RajeshKannan.

    Xpath expression is similiar like SQL queries.I don't think you could standardize the way ( if your queries is simple ).Another thing is Xerces does not support XPath.Try Xalan instead.

  • Help Page Error: Using XPath expressions as list indexes and map keys

    The help page says for maps to use the XPath expression
    /process_data/mapvar[@id='/process_data/@stringvar']
    But in reality for things to work you have to omit the quotations.

    thanks a lot for your help..
    there are total 162 records in the v$open_cursor for that user.
    among that the open cursor is only 4 and open-recursive cursor is only 6 for that user.
    in my session i am executing only the renaming of the constraints and nothing more.
    When i have queried the v$open_cursor for cursor_type='OPEN' for all the users, then i got that it has exceeded the value of open_cursors parameter.
    So how can i resolve that....

Maybe you are looking for

  • How to limit the number of rows in a report

    I have several reports with a number of parameters - date ranges etc. Depending on the parameter values selected by the user the reports can return thousands of rows. I would like to limit the number of rows returned to, say, 500. If more than 500 ro

  • How to remove existing OCR in batch processing?

    I don't see that there is a way to remove existing OCR in batch processing. Could you please let me know if it is available somewhere, or it is indeed not available?

  • SQL Generation Error after converting eFashion.unv to eFashion.unx

    One of the first things I tried to do with SAP BusinessObjects Business Intelligence 4.0 was convert the built-in eFashion universe.  Unfortunately, the UNX generates unresolvable outer joins, even though the data foundation layer does not contain an

  • Error with fill-in fields

    Fill-in fields in pdf documents cause an error: Windows cannot access the specified device, path or file..   What can be done to get rid of this annoying message?  Adobe XI is my reader, Windows 8.1 is the OS, the pdf files come from the IRS or New Y

  • How can I reset and clear my iphone with no wifi

    How can I reset and clear m iphone without any wifi