XSLT extension method in bpel

Can someone please tell me how to extend the existing xslt file.
I have a scenario where in customer will add new fields(as a ADF flex fields) and that will be taken(appended) in an xml file(will be added in EO and exposed as a service to BPEL).
Now the customer should add the mappings to the newly added elements(customizable xslt in bpel) and this should get appended to the existing mapper file(base composite).
Please help
Edited by: 806493 on Oct 30, 2010 11:29 PM
Edited by: 806493 on Oct 30, 2010 11:30 PM
Edited by: 806493 on Oct 30, 2010 11:32 PM

Create another XSLT and refer the new XSLT in the old one using the xsl:import option. You can define templates in the new XSLT and have them called from the old XSLT.
Cheers,
- AR

Similar Messages

  • Overloaded Java methods in XSLT extensions?

    Hello,
    when using Java classes as XSLT extensions, is it possible to use overloaded methods at all? I get "XSL-1042: Extension function error: Overloaded method 'format'" when doing that.
    I studied Steve Muench's book, pages 607-611, and came up with the following:
    Declared namespaces: "Date" for java.util.Date, "DateFormat" for java.text.DateFormat.
    Declared XSL variables: "now" as "Date:new()", "datefmt" as "DateFormat:getDateInstance()".
    Value of "Date:toString($now)" works fine. However, value of "DateFormat:format($datefmt, $now)" causes the XSL-1042 error.
    Is there any way around this?
    --Jere
    null

    The way around it is to create a wrapper function yourself that doesn't depend on overloading, and then exploit the overloading within your wrapper function call.

  • Cant resolve class on XSLT Extension

    I have XSLT and I am trying to call a java method and I get
    java.lang.NullPointerException
    at oracle.xml.parser.v2.XSLExtFunctions.getClass(XSLExtFunctions.java:351)
    Trying even a simple example using java.lang.xxxx gets the same error.
    <!-- x.xsl: show value in Hexadecimal -->
    <xsl:stylesheet version="1.0" exclude-result-prefixes="Int"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:Int="http://www.oracle.com/XSL/Transform/java/java.lang.Integer">
    <xsl:template match="/">
    <xsl:variable name="x" select="99"/>
    <!-- Invoke public static toHexString() method on current node "." -->
    <x-hex><xsl:value-of select="Int:toHexString($x)"/></x-hex>
    </xsl:template>
    </xsl:stylesheet>
    This is XDK 9.2.0.6
    Thanks in advance.

    Terris Linenbach (guest) wrote:
    : Does the v2 parser support XSLT extension functions?
    : Here is a cool example of an implementation at
    : http://www.jclark.com/xml/xt.html :
    : A call to a function ns:foo where ns is bound to a namespace
    of
    : the form http://www.jclark.com/xt/java/className is treated as
    a
    : call of the static method foo of the class with fully-
    qualified
    : name className. Hyphens in method names are removed with the
    : character following the hyphen being upper-cased. Overloading
    : based on number of parameters is supported; overloading based
    on
    : parameter types is not. A non-static method is treated like a
    : static method with the this object as an additional first
    : argument. A constructor is treated like a static method named
    : new. Extension functions can return objects of arbitrary types
    : which can then be passed as arguments to other extension
    : functions or stored in variables.
    : For example, the following
    : <xsl:stylesheet
    : xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"
    : xmlns:date="http://www.jclark.com/xt/java/java.util.Date"
    : xmlns="http://www.w3.org/TR/REC-html40"
    : result-ns="">
    : <xsl:template match="/">
    : <html>
    : <xsl:if test="function-available('date:to-string') and
    : function-available('date:new')">
    <xsl:value-of select="date:to-string(date:new
    ())"/></p>
    : </xsl:if>
    : </html>
    : </xsl:template>
    : </xsl:stylesheet>
    : will print out the current date.
    Our current release 2.0.2 does not support extension functions
    but they will be supported in the very near future.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • C# compiling error: 'System.Array' does not contain a definition for 'Select' and no extension method 'Select' accepting a first argument of type 'System.Array' could be found (are you missing a using directive or an assembly reference?)

    Hello experts,
    I'm totally new to C#. I'm trying to modify existing code to automatically rename a file if exists. I found a solution online as follows:
    string[] allFiles = Directory.GetFiles(folderPath).Select(filename => Path.GetFileNameWithoutExtension(filename)).ToArray();
            string tempFileName = fileName;
            int count = 1;
            while (allFiles.Contains(tempFileName ))
                tempFileName = String.Format("{0} ({1})", fileName, count++); 
            output = Path.Combine(folderPath, tempFileName );
            string fullPath=output + ".xml";
    However, it gives the following compilation errors
    for the Select and Contain methods respectively.:
    'System.Array' does not contain a definition for 'Select' and no extension method 'Select' accepting a first argument of type 'System.Array' could be found
    (are you missing a using directive or an assembly reference?)
    'System.Array' does not contain a definition for 'Contains' and no extension method 'Contains' accepting a first argument of type 'System.Array' could be
    found (are you missing a using directive or an assembly reference?)
    I googled on these errors, and people suggested to add using System.Linq;
    I did, but the errors persist. 
    Any help and information is greatly appreciated.
    P. S. Here are the using clauses I have:
    using System;
    using System.Data;
    using System.Windows.Forms;
    using System.IO;
    using System.Collections.Generic;
    using System.Text;
    using System.Linq;

    Besides your issue with System.Core, you also have a problem with the logic of our code, particularly your variables. It is confusing what your variables represent. You have an infinite loop, so the last section of code is never reached. Take a look 
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.IO;
    namespace consAppFileManipulation
    class Program
    static void Main(string[] args)
    string fullPath = @"c:\temp\trace.log";
    string folderPath = @"c:\temp\";
    string fileName = "trace.log";
    string output = "";
    string fileNameOnly = Path.GetFileNameWithoutExtension(fullPath);
    string extension = Path.GetExtension(fullPath);
    string path = Path.GetDirectoryName(fullPath);
    string newFullPath = fullPath;
    string[] allFiles = Directory.GetFiles(folderPath).Select(filename => Path.GetFileNameWithoutExtension(filename)).ToArray();
    string tempFileName = fileName;
    int count = 1;
    //THIS IS AN INFINITE LOOP
    while (allFiles.Contains(fileNameOnly))
    tempFileName = String.Format("{0} ({1})", fileName, count++);
    //THIS CODE IS NEVER REACHED
    output = Path.Combine(folderPath, tempFileName);
    fullPath = output + ".xml";
    //string fullPath = output + ".xml";
    UML, then code

  • ABAP XSLT Extensions or XSLT (XI imported archive)?

    Hi all,
    I would like to know which is having better performance in a scenario with a significant number of messages.
    I know that ABAP XSLT Extensions is based in XSLT 1.0 and have some features of XSLT 2.0. So, for me it means some limitations and a disadvantage compared with all of XSLT 2.0 “standard” can offer.
    But, my question is related with performance and I just want to know which is faster.
    Thanks in advance,
    Cheers,
    Ricardo.

    Hi Ricardo,
    abap xslt has one great advantage
    abap stack does not have to communicate with
    java stack to perform the - so no RFC calls for mapping
    with many messages that might influence their flows
    but it wuold be best if you could just test it
    in YOUR environment (there are many test tools -
    like Loadrunner from Mercury) or you can write your own scripts
    and just test in your particular examle which one is better
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Xslt transformation rules for BPEL

    Hi there,
    Can anyone advise where I can find the xslt transformation rules for BPEL. I am unable to find the mentioned file "114.XSLTTransformations".
    Best regards!
    Linda

    I installed the BPEL process manager and find the 114.XSLTTransformations tutorial project, but the sample xslt file is for a specific xml file but not for a general bpel file, which doesn't help with my problem.
    For instance, if I want to transform a bpel file to other formats using xslt, how to handle "partner link" structure of bpel?
    Best regards,
    Linda

  • When to use abstract classes instead of interfaces with extension methods in C#?

    "Abstract class" and "interface" are similar concepts, with interface being the more abstract of the two. One differentiating factor is that abstract classes provide method implementations for derived classes when needed. In C#, however,
    this differentiating factor has been reduced by the recent introduction of extension methods, which enable implementations to be provided for interface methods. Another differentiating factor is that a class can inherit only one abstract class (i.e., there
    is no multiple inheritance), but it can implement multiple interfaces. This makes interfaces less restrictive and more flexible. So, in C#, when should we use abstract classes
    instead of interfaces with extension methods?
    A notable example of the interface + extension method model is LINQ, where query functionality is provided for any type that implements IEnumerable via
    a multitude of extension methods.

    Hi
    Well I believe Interfaces have more uses in software design. You could decouple your component implementing against interfaces so that
    you have more flexibility on changing your code with less risk. Like Inversion of Control patterns where you can use interfaces and then when you decide you can change the concrete implementation that you want to use. Or other uses for interfaces is you could
    use Interceptors using interfaces (Unity
    Interceptor) to do different things where not all of these is feasible or at least as straightforward using abstract classes.
    Regards
    Aram

  • ESB XSLT Extension Functions

    Hi
    Could anybody tell me if we can use log4j in the java class which we write for XSLT Extension Functions which will be used in ESB XSL mappings?
    It is not recognizing log4j only.It is not giving any error also.
    Thanks
    Praveena

    Thanks Kanchan.
    This is talking about how to implement Extension functions.
    I have done this. but my question I am not able to use log4j for debugging purpose in this java class. It is not recognising this.
    We need to use logger instead of System.out.println .
    Thanks
    Praveena

  • Xslt extension

    I'm looking to write an Xslt extension to help produce Html-output. For part of the tags produced, some information in the Xml needs to be checked and the output changed accordingly. The idea I had was to dynamically add a piece of xsl to each stylesheet used. The question is rather simple: What's the "cleanest" way of writing a thing like this? So that there would be least possible "obscuration" of the code in the different stylesheets?
    Tommy Sedin

    Combining the XSLs isn't the problem. Calling the
    templates inside the "extension stylesheet" in a nice
    and clean way is. I hate having 4-5 lines of code to
    call a template, when it should be possible to have
    just 1.XML is a verbose language, isn't it?
    I appreciate your answers, but - as I said in my
    previous post - you're giving solutions to something
    that is already solved without even touching the
    problem I actually need help with. And I'm sorry if
    I'm making "smart ass comments", but I don't much
    appreciate you attacking my skills as a programmer and
    systems architect. There is a reason why I've solved
    something in a harder, more clumsy way than what
    everyone else does.Yes, people always have their reasons for doing things. And sometimes those reasons are bad reasons. Questioning a design is not an attack, it's just a question. So there's no need to take it personally. However, I really didn't read your first reply properly, and that didn't help.

  • Where to put property files used by XSLT extensions?

    Still fighting with Java XSLT extensions. I have narrowed the
    problem down: my XSLT extension cannot find its property file,
    which I use to store JDBC connect strings etc.
    What is the proper directory to put this file so the XSLT
    extension class can find it? I am using Oracle HTTP Server with
    XDK 9.0.

    Thanks for the answer, Steve!
    Depends on what call you're using in your extension function to
    read your properties.Maybe I tried a too simplistic approach. I'm just using this:
    Properties props = new Properties();
    try {
    props.load(new FileInputStream("/foo.properties"));
    etc.
    This (with the slash) works if the properties file is in the root
    directory of the filesystem, but it's a kludge.
    If you read your properties as a resource using
    getResourceAsStream(), then where the classloader expects to
    find your file depends on the resource name that you specify.So maybe I should use getResourceAsStream() then? What if I put
    the properties file inside the JAR with the extension classes?
    Or is there any way to reference the web root?
    --Jere

  • Crystal Reports Extension methods library

    I am making public some small library of extension methods for ReportDocument class in order to help simplify some operations of Report manipulation.
    You can find more info about the library and download the code [from this location|http://blog.dragonsoft.us/2009/03/03/crystal-reports-extension-methods-library/]

    Hello Serguei;
    Thank you very much for sharing this valuable information. A potential huge time saver to any developer. Couple of us have been wanting to work on something like this for a while now, but time is always in short supply.
    A bit of advice to any developer working with Serguei's product / solution. If you find a problem, see if you can duplicate the issue out of Serguei's solution. This would be the first step any technical support should take to troubleshoot an issue. Keep It Simple :).
    Have a great day,
    Ludek

  • Calling Custom XSLT java class from BPEL in SOA Suite 11g

    Hi All,
    Morning...need some help with this issue...we are currently on SOA Suite 11g (11.1.1.4) version.
    Earlier while we were on SOA Suite version 10g (10.1.3.3) we were calling the custom java classes from the xsl mapping for complex transformation and for this we were placing the .class file as .jar file at the location mentioned here $OC4J_HOME/j2ee/home/applib directory and then mentioning the namespace as http://www.oracle.com/XSL/Transform/java/{$classname$} in the XSLT mapping file.
    Now in SOA Suite 11g if we need to retain similar functionality for external custom java calls could someone please help us where do we need to put the .jar file now ..
    exactly at which directory location/path and on which instance/server (application server instance or middle tier instance ) we need to put this .jar file
    Currently we are stuck and need some help with this.
    With thanks & Regards

    Hi Eric & Anuj,
    Thanks for replying , sorry for checking on this now...
    here at this path /opt101/app/oracle/SOAD/SOA11gR1/fmw/Oracle_SOA1/soa/modules/oracle.soa.ext_11.1.1
    we got the ora.soa.ext.jar file and extracted it to get the MANIFEST.mf file ..have mentioned below.
    Now if we need to link our custom .jar file named customfunctions.jar so we need to mention it as below is this correct :
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.7.1
    Created-By: 17.0-b17 (Sun Microsystems Inc.)
    Implementation-Vendor: Oracle
    Implementation-Title: Oracle SOA EXT
    Implementation-Version: 11.1.1
    Product-Name: Oracle SOA EXT
    Product-Version: 11.1.1.4.0
    Specification-Version: 11.1.1
    Extension-Name: oracle.soa.ext
    Class-Path: classes/
    Class-Path:customfunctions.jar classes/ -- is this the way to mention (means we need to add this additional line or we need to add to the existing line at Class-Path: classes/)
    2.
    Eric the Alternative method mentioned in your update :
    Open a command prompt and change the current directory to the oracle.soa.ext_11.1.1 directory ,
    then execute the build.xml file in the oracle.soa.ext_11.1.1 folder using Ant
    Now could someone please guide us regards this ANT means how does it work and its relation to the build.xml file and how do we check whether we have ANT utility available or not..
    not much conversant with this ANT hence asking here..would lookout for your reply
    thank you

  • Xalan xslt extension flat file to xml...

    anyone used the xsltflat 2.0 to do flat to xml transformation? it does it by using xalan extension...
    the packate is com.fs.xalan.extensions.* and test.com.fs.xalan.extensions.*
    anyway, it works fine when I do it from command prompt... however when I tried to do it by calling it over Tomcat, the parsing gives me following funny error:
    file:///e:/test.xsl; Line 21; Column 92; javax.xml.transform.TransformerException: For extension function, could not find method java.io.FileInputStream.streamIterator([ExpressionContext,] #STRING).
    here is the seciton of the xsl file:
    <?xml version="1.0"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
              version="1.0"
              xmlns:lxslt="http://xml.apache.org/xslt"
              xmlns:stream="com.fs.xalan.extensions.StreamTools"
              xmlns:txt="com.fs.xalan.extensions.TextFormatting"
              extension-element-prefixes="stream txt">
         <lxslt:component prefix="stream" elements="" functions="fileReader tokenize">
              <lxslt:script lang="javaclass" src="xalan://com.fs.xalan.extensions.StreamTools"/>
         </lxslt:component>
         <lxslt:component prefix="txt" elements="" functions="trim ltrim rtrim lpad rpad trunc replace strip stripPunc stripWS upcase downcase">
              <lxslt:script lang="javaclass" src="xalan://com.fs.xalan.extensions.StreamTools"/>
         </lxslt:component>
         <xsl:param name="inputStream" />
         <xsl:template match="/">
              <Employees>
                   <xsl:variable name="infile" select="stream:streamIterator($inputStream,'&#13;&#10;')" />
                   <xsl:apply-templates select="$infile/stream/line" />
              </Employees>
         </xsl:template>
    i know for sure the xsl works... there is nothing with wrong with xsl... so i am scratching my head right now...
    thanks...

    Tomcat also uses XML (for the setting files) and thus: ships with an XML processor. My best guess: your application requires some more recent parser, but the Tomcat provided stuff is found first, and used. Maybe the TransformerException was the result of the famous "Sealing violation" or "Nu such method".
    To check if this is the problem: make sure that your new xalan.jar file and (optionally) xerces.jar are in pole position in the class path.
    If you happen to use Borland JBuilder: there are two places where you set the order of the required libraries: in the main project settings and in the Project, Run, JSP/Servlet, Server Options, button setup. Here, add your own xalan.jar and xerces.jar as well, and put them on top of the list.
    a.

  • Xslt extended method

    java code:
    import javax.xml.parsers.*;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.sax.*;
    import javax.xml.transform.*;
    import javax.xml.transform.stream.*;
    import java.io.File;
    import java.util.Date;
    import org.w3c.dom.*;
    public class XSLOBJ {
         public static String getDate() {
              Date d = new Date();
              return d.toString();
         public XSLOBJ(){}
         public static void main(String[] args){
              try{
                   DocumentBuilderFactory bdf = DocumentBuilderFactory.newInstance();
                   DocumentBuilder bd = bdf.newDocumentBuilder();
                   Document doc = bd.newDocument();
                   Element root = doc.createElement("Root");
                   Element date = doc.createElement("Date");
                   root.appendChild(date);
                   doc.appendChild(root);
                   DOMSource source = new DOMSource(doc);
                   StreamSource xslSource = new StreamSource("date.xsl");
                   TransformerFactory tf = TransformerFactory.newInstance();
                   Transformer t = tf.newTransformer(xslSource);
                   StreamResult target = new StreamResult("result.xml");
                   t.transform(source,target);
              }catch(Exception e){System.out.println(e);}
    =====================================================
    xslt code:
    <?xml version = "1.0" encoding = "UTF-8"?>
    <xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" xmlns:myObject="java:XSLOBJ" version ="1.0">
    <xsl:variable name="contextObj" select="myObject:new()" />
    <xsl:template match = "@*|*">
              <xsl:copy>
                   <xsl:apply-templates select = "@*|node()"/>
              </xsl:copy>
    </xsl:template>
    <xsl:template match="/Root/Date">
         <xsl:element name = "Date">
              <xsl:value-of select="myObject:getDate($contextObj)" />
         </xsl:element>
    </xsl:template>
    </xsl:stylesheet>
    =======================================
    runtime exception:
    file:/E:/working/XML/classes/date.xsl; Line 3; Column -1; javax.xml.transform.TransformerException: Instance method call to method new requires an Object instance as first argument
    ============================================================
    Please help me to resolve this problem.Thanks.

    Refer to
    http://www-lehre.informatik.uni-osnabrueck.de/~fbstark/diplom/docs/xalan/extensions.html

  • How to use an external XSLT engine for Oracle BPEL Process Manager

    Hi,
    is there a way to use an external XSLT engine instead of the build in provided in Oracle BPEL Process Manager?
    The reason is to perform some XSL Transformations that use an OWL Query language.
    Thanks!

    Yes. you can write your own xpath function which can connect to external xslt engine and pass-in your document:
    <copy>
    <from expression="my:myxslt-processor(bpws:getVariableData('var1','part'))"/>
    <to variable="v2" part="payload/>
    </copy>
    The following Thread discusses about how to create an extension xpath function:
    http://forums.oracle.com/forums/thread.jspa?forumID=212&threadID=305548

Maybe you are looking for

  • Mail has collapsed: No Content - Emergency

    I am reposting this question, becuse I mistakenly marked it as solved. It is far from solved. Mail keeps losing its content. I have reindexed mailboxes, and the content comes back, but the slightest action in Mail, like trashing one email, and it all

  • Remote links fail

    We have a micky mouse stored procedure to check the link to a remote Oracle database before attempting to transfer data between the two. create or replace function isFredAvailable return boolean /* Figures out whether FRED is available or not. */ is

  • CAD goes not responding as soon as transferred call is attempted to conference.

    CAD goes not responding as soon as transferred call is attempted to conference. Windows 7 version 32 & 64 bit. The agent is using the phone for transfer and conference and the CAD application goes not responding. When we are restarting the subscriber

  • Monitor worked on 10.4.5, then updated 10.4.8 now doesnt

    Basiclly the subject tells it all. I just bought my MB Pro today and my external Viewsonic monitor worked before I did the updates. Now it won't. Also, now one of my Lacie USB 2 hard drives, that worked before the update, doesnt work. the light just

  • A Regular Expressions problem

    Hi :) I have define a Pattern: [{alnum}{L}]+ to find a word, but i still want this pattern to avoid some words that i don't want, such as "hello", "how"...etc. How do I define a new Pattern to fit this request. thx:)