Use of XPath 2.0 in XSLT plugins

Hi
I need to use the upper-case XPath function in a XSLT. This function is available in XPath 2.0.
I set the stylesheet version="2.0" and is works fine when I test the xslt in Editix before I deploy it.
The Saxon parser installed with OSM 7.0.1 supports XPath 2.0.
However, the deployed plugin throws an exception like:
<01-jul-2010 10:44:08,241 CEST AM> <INFO> <plugin.AbstractAutomator> <ExecuteThread: '13' for queue: 'oms.automation'> <Creating automation plugin [class com.mslv.oms.automation.plugin.XSLTReceiver_yg33wa_Impl] built using SDK version [7.0.1.524]>
SystemId Unknown; Line #49; Column #90; Could not find function: upper-case
SystemId Unknown; Line #49; Column #90; Could not find function: upper-case
SystemId Unknown; Line #49; Column #90; function token not found.
SystemId Unknown; Line #49; Column #90; function token not found.
(Location of error unknown)java.lang.NullPointerException
<01-jul-2010 10:44:08,287 CEST AM> <WARN> <plugin.AbstractAutomator> <ExecuteThread: '13' for queue: 'oms.automation'> <Attempting to clean up references to bad EJB references>
<01-07-2010 10:44:08 CEST> <Warning> <oms> <BEA-000000> <plugin.AbstractAutomator: Attempting to clean up references to bad EJB references>
<01-jul-2010 10:44:08,397 CEST AM> <ERROR> <core.logSQLException> <ExecuteThread: '13' for queue: 'oms.automation'> <SQL Exception 0 : Transaction BEA1-0FBBA0CDB6AB0C3F5CBB not active anymore. tx status = Marked rollback. [Reason=java.lang.NullPointerException]>
java.sql.SQLException: Transaction BEA1-0FBBA0CDB6AB0C3F5CBB not active anymore. tx status = Marked rollback. [Reason=java.lang.NullPointerException]
at weblogic.jdbc.jts.Driver.getTransaction(Driver.java:542)
Any clues anyone?

As far as i know, the XSLTReceiver plugin uses XALAN as the XSLT transformation implementation. if you need to use SAXON, then you need to set the javax.xml.TransformerFactory system property to the correct implementation class from SAXON. How one could do this is beyond me. You could validate my statement by attempting to write a simple java client that does the transformation(rather than use a editor tool such as XMLSpy/ other). set your classpath to include saxon jars and exclude xalan jars, the transformation should succeed.
hope this helps.

Similar Messages

  • Does SOA BPEL 11.1.7.0 support XPath 2.0 in XSLT mapping?

    Dear Oracle support,
    I am using SOA Suite 11.1.1.7.0 (local development) and 11.1.1.6.0 (in production, but will upgrade to 7). I came to the requirements need to do very complicated mapping using XSLT in BPEL. I would like to use some features of XPath 2.0.
    Does SOA 11.1.1.6.0 or 11.1.1.7.0 have supported XPath 2.0? If not yet, is there any plan to support in the future?
    Thank you in advance for your response,
    Alena Li

    Hi Alena Li,
    Firstly, this is not Oracle support, this is Oracle forums...
    https://wikis.oracle.com/display/Forums/Forums+FAQ
    SOA supports *some* features of XPath 2.0 in XSLT, the infrastructure also supports XSLT 2.0, but JDEV mapper does not...
    Check docs here...
    http://docs.oracle.com/cd/E28280_01/dev.1111/e10224/bp_appx_functs.htm#SOASE2127
    Cheers,
    Vlad

  • Equivalent of SQL JOINs using XML + XPath

    I have been working on a Java app for a while that takes user queries and searches various translations of the Bible. The data is stored in 66 .xml files, one per book of the Bible, and those files, in turn, are stored in a .jar file.
    The user may select 2 or more translations and see them in parallel. So for example, let's say that want Matthew chapter 1 and verses 1 to 10 from KJV and ASV. I simply use the following XPath expression: /book/chapter[@num=1]/verse[@num>=1 and @num<=10] . Then I use XPathFactory, XPath, compile() and evaluate() on Matthew.xml from kjv.jar and asv.jar.
    However, the problem is not so simple for keyword queries from the user. In such a case the tool searches for keywords in one translation and then finds the same verses from all subsequent translations. Here the XPath expression might be more like: /book/chapter/verse[contains(., 'keyword1') and contains(., 'keyword2')] for the first translation. However, if I ran the same query on subsequent translations they may or may not return the exact same set of verses (depending on language (English, Greek, Hebrew) and also on the dialect (Old English vs. Modern English)). So, my question is what is the most efficient way of obtaining the same verses from subsequent translations?
    I could simply look up the verses in the first translation, then use DOM API calls to find the chapter and verse numbers, and look those up in the other translations. But this seems tedious, SLOW, and possibly more error prone.
    Also, a second question: if I wanted to include a help file in my application's .jar file. How could I access that file programmatically? That is, how do I tell the application to look for "help.html" in the jar file so I can manipulate and/or display the contents to the user?
    And last question: since, I'm still learning my way around Java and XML, how would I go about programmatically applying a .xsl file to some given .xml input to produce HTML + CSS output? What classes, interfaces, etc. should I look up for this? And can anyone point me to sample code online for this?

    However, the problem is not so simple for keyword
    queries from the user. In such a case the tool
    searches for keywords in one translation and then
    finds the same verses from all subsequent
    translations. Here the XPath expression might be
    more like: /book/chapter/verse[contains(.,
    'keyword1') and contains(., 'keyword2')] for the
    first translation. However, if I ran the same query
    on subsequent translations they may or may not return
    the exact same set of verses (depending on language
    (English, Greek, Hebrew) and also on the dialect (Old
    English vs. Modern English)). So, my question is
    what is the most efficient way of obtaining the same
    verses from subsequent translations?
    I could simply look up the verses in the first
    translation, then use DOM API calls to find the
    chapter and verse numbers, and look those up in the
    other translations. But this seems tedious, SLOW,
    and possibly more error prone.There's nothing in XPath that I know of that helps with this. SQL is relational, XML is hierarchical. They're fundamentally different.
    Also, a second question: if I wanted to include a
    help file in my application's .jar file. How could I
    access that file programmatically? That is, how do I
    tell the application to look for "help.html" in the
    jar file so I can manipulate and/or display the
    contents to the user?If it's an HTML file, it's likely that you'll package it in a WAR file, along with the rest of your app. It's accessible as a URL that way.
    And last question: since, I'm still learning my way
    around Java and XML, how would I go about
    programmatically applying a .xsl file to some given
    .xml input to produce HTML + CSS output? What
    classes, interfaces, etc. should I look up for this?.xsl transformations are applied using XSL-T engines, like Apache's Xalan. You would embed the HTML that you want to inject the XML data into in the XSL-T stylesheet.
    That's one way. Another is to use a templating alternative like Velocity.
    And can anyone point me to sample code online for this?Try the Apache Xalan docs. Or this:
    http://www.cafeconleche.org/books/xmljava/chapters/ch17.html
    %

  • NEF files from Nikon d800 not visible in bridge and photoshop cs6- using mac ver.10.8.5. downloaded plugin from site 8.3 but issue unresolved

    NEF files from Nikon d800 not visible in bridge and photoshop cs6- using mac ver.10.8.5. downloaded plugin from site 8.3 but issue unresolved

    You can install and use Camera Raw 8.8 with OSX 10.8  Go to Help > Updates in Photoshop CS6

  • XML Signature using an XPath filter

    I want to sign an XML document, just based on the content of a particular element in the document. Based on the jwsdp docs it looked pretty simple, but I'm getting strange results. I'll get the same digest value in the SignedInfo for different Xpath filter strings.
    Anybody out there have good luck trying to sign XML documents using Xpath filters?
    I'm using JDK 1.5.05 and JWSDP 1.6.
    Here is my simple XML doc
    <?xml version="1.0" encoding="UTF-8"?>
    <myns:whole_doc xmlns:myns="http://namespace.myns.com/test"
    attr1="attr_one" attr2="attr_two" attr3="attr_three">
    <myns:part_one attr="attr_one">
    <myns:tag1>this is part_one tag_one</myns:tag1>
    <myns:tag2>this is part_one tag_two</myns:tag2>
    </myns:part_one>
    <myns:part_two attr="attr_two">
    <myns:tag1>this is part_two tag_one</myns:tag1>
    <myns:tag2>this is part_two tag_two</myns:tag2>
    </myns:part_two>
    <myns:part_three attr="attr_three">
    <myns:tag1>this is part_three tag_one</myns:tag1>
    <myns:tag2>this is part_three tag_two</myns:tag2>
    </myns:part_three>
    </myns:whole_doc>
    When I use an XPath filter = "/myns:whole_doc/myns:part_one" I get the same digest as when I use "/myns:whole_doc/myns:part_two", which is the same digest when I don't use XPath filtering. See example output below
    <?xml version="1.0" encoding="UTF-8" ?>
    - <myns:whole_doc xmlns:myns="http://namespace.myns.com/test" attr1="attr_one" attr2="attr_two" attr3="attr_three">
    - <myns:part_one attr="attr_one">
    </myns:part_three>
    - <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
    - <SignedInfo>
    <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments" />
    <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1" />
    - <Reference URI="">
    - <Transforms>
    <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
    - <Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
    <XPath>/myns:whole_doc/myns:part_two</XPath>
    </Transform>
    </Transforms>
    <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
    <DigestValue>9D5CFDkWd9bHx65txuHOeXWeTns=</DigestValue>
    </Reference>
    </SignedInfo>
    <SignatureValue>D686H//H5A0zDrlQx8+0fBNpVeJGgWdTXivlI8S/+WqB/E4oBYzeIQ==</SignatureValue>
    </Signature>
    </myns:whole_doc>

    It took me all day, but I did find the answer.
    When using XPath filters in references, you can't use XPath exactly the way you would use XPath to find nodes in a document. I can't exactly explain why, but it has to do with the fact that the XPath statement is acting as a filter.
    Anyway, to just include the part_one element from the following abbreviated XML
    <myns:whole_doc> .....
    <myns:part_one> ..... </myns:part_one>
    <myns:part_two> .... </myns:part_two>
    </myns:whole_doc>
    the XPath statement should be "ancestor-or-self::myns:part_one"
    to make sure that part_one was part of whole_doc you could use something like
    (ancestor-or-self::node() = /myns:whole_doc/myns:part_one)
    This allows me to sign a document, but still allow portions outside of whole_doc/part_one to change.

  • Using XML extraction from Oracle and XSLT data transformation

    Hi
    How can transfer data ie: Using XML extraction from Oracle and XSLT data transformation with java application?
    usually i use to do querying sql, getting data from table assinging to model class then send it to UI. how can i go for XML extraction form oracle?
    thanks

    Sorry, I don't understand what exactly you want to do. And I'm under the impression that you might not know exactly what you want to do as well. Could you explain a bit more detailed what you want to achieve?

  • Selecting nodes using an XPath expression

    Assuming that I have a DOM Document object containing a valid XML file, what is the quickest way to select a subset of nodes from the document using an XPath expression. I would like the results in either a NodeList object or another Document object.
    Microsoft has a way to do this using a single method named 'selectNodes'. Why is querying an XML document so hard to do using java? Am I missing something?

    In case you're using Xalan take a look at org.apache.xpath.XPathAPI. The function selectNodeList(...) probably does what you want.
    Good luck.

  • Using the XPATH expression function in Transformation activity

    Hi,
    I have to map the variable value(other than the source variable) to one of the node in the target variable in the transformation activity. For that I am using the XPATH expression function bpws:getVariableData ('variableName') and map it to corrsponding target node. But this mapping is not at all happening. The same prolem occurs while using function ora:getInstanceID() in transformation function. Then I could find a metalink note id: 387381.1,saying it as the bug in 10.1.2.2 BPEL PM, which they are covering in the next release. But our BPEL PM version is 10.1.3.3. But still the same type of problem occurs.
    Please let me know, is there are any solution for using the ora:getInstanceID() , bpws:getVariableData in Transformation activity.

    Hi,
    I dont understand why would you need to use the "bpws:getVariableData" function.
    When you are mapping a source-node to a target-node, it usually assigns the value in the source-node to the target-node, which is as good as using the "bpws:getVariableData" function.
    So, technically speaking you need to use this function explicitly to achieve that ...
    Also, if you want the instance-id, you can use the "ora:getInstanceId()" directly in the BPEL code than using it in the transformation.
    Regards,
    Madhu.

  • How to use XML / XPath in JAVA (in 1.4) which third part component to use?

    How to use XML / XPath in JAVA (in 1.4)
    I'm absolutely novice in XML
    but I need to query XML using XPath
    As I understand XPath become avalible only in Java 1.5
    But I use 1.4 (project requirement)
    Which third part component could you recomend?

    Can anyone help me with this XPath query
    I get result [title: null]
    import java.io.*;
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import org.w3c.dom.*;
    import org.jaxen.*;
    import org.jaxen.dom.*;
    import org.jaxen.saxpath.*;
    import java.util.*;
    public class TestX {
         public void ggg() {
              try {
                   File f = new File("journal.xml");
                   DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
                   org.w3c.dom.Document doc = docBuilder.parse(f);
                   XPath xpath = new DOMXPath( "/journal/article/title" );
                   List result = (List) xpath.evaluate(doc);
                   System.out.println(result.get(0));
              } catch (Exception e) {
                       e.printStackTrace();
         public static void main(String[] args) {
              TestX tx = new TestX();
              tx.ggg();
    }journal.xml
    <journal>
        <article id="article.1">
            <title>Art1</title>
            <author>
               <first>Bob</first>
               <last>McWhirter</last>
            </author>
            <text>
            </text>
        </article>
        <article id="article.2">
            <title>Art2</title>
            <author>
               <first>James</first>
               <last>Strachan</last>
            </author>
            <text>
            </text>
        </article>
    </journal>

  • For photography I have CS4, Lightroom 5.3, I use Bridge and sometimes NIK and Topaz Plugins. If I want to update to CC, what is the plan I need? Will all of my Lightroom history data be retained?

    For photography I have CS4, Lightroom 5.3, I use Bridge and sometimes NIK and Topaz Plugins. If I want to update to CC, what is the plan I need? Will all of my Lightroom history data be retained?

    Probably the special photography plan - Creative Cloud pricing and membership plans | Adobe Creative Cloud
    For details on any program, you should ask in the forum for that program
    If you will start at the Forums Index https://forums.adobe.com/welcome
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll

  • Use of Xpather with OATS.

    We have been using Selenium.
    Now we are learning OATS. Can we use the "XPather',FireBug with OATS.
    I assume we can use the isTextPresent, asserEquals etc with OATS tool.
    Is this correct.
    Regards

    Thanks for the reply Alex.
    I would like to know whether or not we can use Firebug,XPather tool (these attach to Firefox browser only). These are not related to OpenScript directly, though, the IDE/Interface is eclipse, it seems.
    Regards

  • TS1926 "Monitors cannot be used bcz a required extension, System Monitor Plugins, is disabled or not installed. Make sure System Monitor Plugins is in the Extensions folder in the System folder then restart your computer" Anyone have experience with this

    "Monitors cannot be used bcz a required extension, System Monitor Plugins, is disabled or not installed. Make sure System Monitor Plugins is in the Extensions folder in the System folder then restart your computer" Anyone have experience with this issue?

    Try this app: http://tyorex.com/iWorkConverter
    Batch convert Pages files to doc and pdf.

  • XPath function failed in XSLT (OSB 10.3.1)

    Platform : OSB 10.3.1 in Windows XP
    Error : Test following XSLT scripts in OSB Console by getting error
    Error executing the XSLT transformation: java.lang.NoSuchMethodException: For extension function, could not find method weblogic.apache.xpath.axes.WalkingIteratorSorted.upper-case([ExpressionContext,] ).
    XSLT :
    <xsl:stylesheet version="1.0"
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:fn="http://www.w3.org/2004/07/xpath-functions"
         xmlns:imp1="http://www.example.org/FaultMessage">
    <xsl:template match="/">
              <imp1:FaultMessage>
                   <imp1:code>
                        <xsl:text disable-output-escaping="no">Hard-Coding-Error-Code</xsl:text>
                   </imp1:code>
                   <imp1:summary>
                        <xsl:value-of select="/imp1:FaultMessage/imp1:summary" />
                   </imp1:summary>
                   <imp1:detail>
                   <xsl:value-of select="fn:upper-case(/imp1:FaultMessage/imp1:detail)" />
    </imp1:detail>
         </imp1:FaultMessage>
    </xsl:template>
    </xsl:stylesheet>
    Any ideas?
    Thank you
    -Simon
    Edited by: user10981433 on Jun 11, 2009 9:05 PM

    exporting and importing your osb projects to the new environment won't migrate the webservice you were calling from within the Oracle Service Bus.
    if these were created in Eclipse too you can just regenerate an ear-file from them or use the build-scripts to deploy them to you new Weblogic Server.
    don't mix up 2 things
    the osb is only intermediar in here, so you can export/impot the resources from your osb workspace for these.
    but if your process call any external webservice, the webservice itself will also need to get redeployed to the new enviroment, and this is something which has nothing to do with your osb projects.
    it could be these webservice are also build in Eclipse, but they won't be part of the export/import of OSB.
    so check if you have some build.xml script in these webservice projects so you can regenerate the ear archive, or try importing the project in your workspace (if not already done) and rightmouseclick on it > export > ear file
    and use this ear file to deploy the webservice again in the Weblogic Console ( see : http://docs.oracle.com/cd/E13218_01/wlp/docs81/prodOps/deployment.html )

  • Why don't standard XPath functions work in XSLT?

    I'm having a lot of trouble trying to do some simple string processing in XSLT. What I would like to do is make selection using the standard xpath functions defined by the w3c. I'm using this as my cheat sheet:
    http://w3schools.com/xpath/xpath_functions.asp
    I've tried the default XSLT parser that comes with Java, the latest distro of Xalan and the latest distro of Saxon. Nothing seems to recognize the fn namespace:
    xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
    In particular, I'm trying to use the tokenize(string, regex) function. Only Xalan seems to support this at all, only recognizes {http://xml.apache.org/xalan}tokenize, and it is treating the regex as a literal.
    This is very frustrating. Is it possible to get the standard Xpath functions to work for XSLT?

    How did you get it to work with Saxon? I have saxon9he.jar on my classpath. When I try to transform this:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:src="http://xml.kitfox.com/schema/game/tileWorld/textTable"
        xmlns:xalan="http://xml.apache.org/xalan"
        xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
        version="1.0">
        <xsl:output method="text"/>
    <xsl:template match="/">
        <xsl:for-each select="fn:tokenize('a b c', '\s+')">
            "<xsl:value-of select="."/>"
        </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>I get the error
    Error on line 100
      Cannot find a matching 2-argument function named
      {http://www.w3.org/2005/02/xpath-functions}tokenize()Is there some other jar you need to include to get http://www.w3.org/2005/02/xpath-functions to resolve?

  • Need to use Xalan in place of Oracle XSLT processor

    We are working with Oracle BPEL 10.1.3.3. We have a requirement to use Xalan as the XSLT processor to preserve existing investment into transformation maps built using Contivo (which is certified to work with Xalan).
    That said, we are having some trouble getting the Xalan processor to kick in going the java:exec route. For some reason, we end up with Oracle's XSLT processor in spite of asking for the Xalan implementation.
    TransformerFactory tFactory = new org.apache.xalan.processor.TransformerFactoryImpl();
    Transformer transformer = tFactory.newTransformer(new StreamSource(xslInURI));
    System.out.println(tFactory.toString()+transformer.toString());
    Strangely enough, the above snippet prints:
    [email protected]Transformer@e39f6b
    Wondering if anybody else has used Xalan successfully in conjunction with 10.1.3.3 bits. Appreciate your help.

    please copy and paste the following in your xpath-functions.xml file
    <function id="processXSLT" arity="2">
    <classname>com.collaxa.cube.xml.xpath.functions.xml.GetElementFromXSLTFunction</classname>
    <property id="namespace-uri">
    <value>http://schemas.oracle.com/xpath/extension/xalan/xslt</value>
    </property>
    <property id="namespace-prefix">
    <value>xalan</value>
    </property>
    </function>
    This function would try to find the default transformer factory using
    TransformerFactory.newInstance()
    so you might need to place the xalan transformer factory properties file in the beginning of your classpath (server.xml ) or pass it as jvm system property like below:
    -Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl

Maybe you are looking for

  • Replacement ipod, what am i doing wrong???

    my ipod had an error where it was saying usb malfunctioned everytime i put this into a laptop, took it to apple they said the usb was bust, got a new ipod (great) however got home and plugged it, just get a pic on my ipod showing a cable\disc. does t

  • IPhone 3g Recovery Mode help

    My iPhone is stuck in Recovery Mode. It goes all the way to 100% firmware restore and then stops and gives me Error 1013, no matter what I do. I have followed all the tips from support dealing with this error. I have moved USB ports, computers, I hav

  • OBXZ - Can it be defined at Company Code level

    Dear All, The account maintained in OBXZ is at chart of accounts level i.e. for multiple company code Is it possible to maintain it seperately for say one company code with a different account numbers ? If yes how... Thanks in advance... MS

  • Forwarding credentials from j_security_check to EJB

    I'm using the FORM based authentication on my web app to log in users... I've defined roles on both web app and ejb jar files... The problem that I'm facing is that the Principal is not being forwarded to the EJB Container to validate authorization..

  • EM and OEM on linux

    Hi guys I did a clean install 10gr2 on linux over ASM the problem is.: in the first days EM was reachable by the url machine.mydomain.org:1158/em after a week (no changes overall) i just can reach via IP 192.168.xxx.xxx:1158/em now is unreachable...