Xsl:message

hi friends,
I am trying to raise error from xslt mapping. I used <xsl:message terminate="yes">my error message</xsl:message>
I have set TRACE_LEVEL to 3 & LOGGING to 1 in integration engine configuration still I do not see my error message under 'trace' section of 'Request Message Mapping' step in XI. The processing of subsequent steps continues with empty message which I do not want.
I followed sap help on following link,
http://help.sap.com/saphelp_nw04/helpdata/en/8a/7672f7d7e444439fd7024f806221a4/content.htm
Any suggestions?
Thanks for your time in advance.
sachin kotalwar

Sachin,
<i>The processing of subsequent steps continues with empty message which I do not want.
</i>
Since you have given <xsl:message terminate="yes"> This attribute determines processing of the XSLT program should be terminated. But you dont want your program to be terminated. So change it to "no" and then it should work.
I hope that you have saved the data after you made changes to trace_level and logging.
Regards,
---Satish

Similar Messages

  • Xsl:message issue in xsl transformation while throwing an error.

    Hi,
    Below is error handling logic which im using to handle the DVM value not found error if the user input value is not found in dvm. This termiates the xslt processing and throws subLanguageExecutionFault. The issue is im unable to get the customized message which i have coded in <xsl:message> GGGGGGGG.dvm no value found!!! </xsl:message>.
    The audit trail shows XML-22060: (Fatal Error) TERMINATE PROCESSING. with no other customized message given in the xsl:message tag.
    <xsl:when test='dvm:lookupValue("oramds:/apps/AIAMetaData/dvm/GGGGGG.dvm",$DVMSourceCol,/seblabo:SiebelMessage/seblabo:XXXXtoYYYY/seblabo:YYYYY/seblabo:TypeCalc,$DVMTargetCol,"DVMValueNotFound") = "DVMValueNotFound" ' >
    <xsl:message terminate="yes">
    GGGGGGGG.dvm no value found!!!
    </xsl:message>
    </xsl:when>
    Let me know how to populate the customized in xsl:message tag to audit trail or in the fault message.
    Thanks in advance,
    -Rahul

    Hi Rahul,
    I faced the similiar issue. Still I am struggling with that. BTW did u check the soa logs to see if those reflect there? Did you find any workaround/solution?
    Regards,
    Susmit
    Edited by: Susmit_Dey on 8 Aug, 2011 9:29 PM

  • Use alert box in javascript using xsl:message in Xalan

    There appears to be a xsl:message tag in XSLT. According to W3C, the implementation is dependent on the XSLT transformer.
    However, this tag output the message to my console.
    I would on the other hand like to output the message
    in a javascript alert box. I am using jaxp 1.1, the XSLT
    transformer is Xalan.
    Thanks in advance,
    taybw

    As you surely know, Xalan is running on the server. That's why the <xsl:message> appears there. As far as I know, the only options available to XSLT implementors are whether the message will appear or not, or possibly whether it will end the translation abnormally.
    Presumably you have Xalan producing HTML that will be rendered on the browser. If that's the case, then just replace the <xsl:message> element by some Javascript code that will pop up the alert box as soon as the browser loads the page you are writing.

  • Transform XML and display xsl:message

    Hi,
    I have a simple method to transform XML. My XSLT has <xsl:message> to help debugging while transforming. How do I access the messages to System.out.printLn?
    public static Document transformXML(Document xmlDoc, Document xslDoc) throws XMLHelperException {
              try {
                   TransformerFactory factory = TransformerFactory.newInstance();
                   Transformer transformer = factory.newTransformer(new DOMSource(xslDoc));
                   DOMResult result = new DOMResult();
                   transformer.transform(new DOMSource(xmlDoc), result);
                   org.w3c.dom.Node resultNode = result.getNode();
                   if (resultNode instanceof Document) return (Document)resultNode;
                   else return result.getNode().getOwnerDocument();
              } catch (TransformerConfigurationException ex) {
                   throw new XMLHelperException("Unable to perform transform " + ex.getLocationAsString(), ex);
              } catch (TransformerException ex) {
                   throw new XMLHelperException("Unable to perform transform " + ex.getLocationAsString(), ex);
         }thanks for the help.
    Edited by: bonekrusher on Mar 8, 2008 2:27 PM
    Edited by: bonekrusher on Mar 8, 2008 2:27 PM

    public class XForm {
         public static void main(String[] args) throws Exception {
              InputStream xslStream = null;
              InputStream xmlStream = null;
              try {
                   TransformerFactory tf = TransformerFactory.newInstance();
                   xslStream = new BufferedInputStream(new FileInputStream(args[1]));
                   Transformer t = tf.newTransformer(new StreamSource(xslStream));
                   tf.setErrorListener(new ErrorListener() {
                        public void error(TransformerException ex) throws TransformerException {
                             ex.printStackTrace();
                        public void fatalError(TransformerException ex) throws TransformerException {
                             ex.printStackTrace();
                        public void warning(TransformerException ex) throws TransformerException {
                             ex.printStackTrace();
                   xmlStream = new BufferedInputStream(new FileInputStream(args[0]));
                   t.transform(new StreamSource(xmlStream), new StreamResult(System.out));
              } catch (Exception e) {
                   e.printStackTrace();
              } finally {
                   if (xslStream != null)
                        xslStream.close();
                   if (xmlStream != null)
                        xmlStream.close();
    <test>
         <sample try="yes">
              a
         </sample>
    </test>
    <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xalan">
         <xsl:template match="/">
              <xsl:message terminate="no">got here</xsl:message>
              <xsl:apply-templates/>
         </xsl:template>
         <xsl:template match="*|@*">
              <xsl:copy>
                   <xsl:apply-templates/>
              </xsl:copy>
         </xsl:template>
    </xsl:transform>          

  • Xsl:message producing extra tags in output from stylesheets

    If a tag is produced but not ended and xsl:call-template or xsl:apply-templates calls a template that has a xsl:message tag the (not ended) tag is produced again (but not ended) and the output will have 2 start tags but only one end tag.
    It works correctly if an end tag, xsl:comment or text is produced before the xsl:message. It makes no difference if there is any other element, not producing output, between the start tag and the xsl:message. It also works if a start tag is produced before the xsl:message in the same template.
    I have tested this with xmlparserv2 version 9.2.0.4.0, 9.2.0.5.0 and .xdk_version_10.1.0.0.0A_beta and they are all producing the same error.
    Here is a simple stylesheet producing the error:
    <?xml version='1.0' encoding='UTF-8'?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="messageTest">
    <xsl:text>test</xsl:text>
    <in>
    <xsl:call-template name="message"/>
    </in>
    </xsl:template>
    <xsl:template name="message">
    <xsl:message>in here</xsl:message>
    <html>
    </html>
    </xsl:template>
    </xsl:stylesheet>
    And here is simple xml transformed by the stylesheet:
    <?xml version="1.0" encoding="UTF-8"?>
    <messageTest><test>TEST</test>
    </messageTest>
    And here is the transformed output using oraxsl:
    bash# /usr/java/jdk1.3.1_07/bin/java -classpath xmlparserv2.jar oracle.xml.parser.v2.oraxsl test.xml pages.xsl
    <?xml version = '1.0'?>
    file:/home/pontus/vodafone/pages.xsl:
    Message: in here
    file:/home/pontus/vodafone/pages.xsl:
    Message: in here
    test<in><in><in><html/></in>
    If think this is a bug, but if it isn't please help me find the error in the stylesheet.
    /Pontus

    html-output
    <html>
    <body>
    <img src="1.jpg"/>
    <img src="2.jpg"/>
    </body>
    </html>
    Please help me!

  • xsl:message terminate="yes"/

    Guys,
    Testing out some functionality I think Im going to need.
    <xsl:message terminate="yes"/>
    Shouldnt this terminate the parser, as per the spec - it doesnt
    seem to...
    Also,
    <xsl:message> Testing </xsl:message>
    Produces:
    Message: Testing
    On the error stream, could we get them back in a more structured
    way, perhaps as a callback, with some context information, so we
    could use them?
    Many thanks,
    Andrew.
    null

    Can you describe better what
    context you are thinking of
    that would be useful?
    I can think of several interpretations
    of what context could mean here.
    Thanks.
    Steve Muench
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • Abap XSLT Exception block messages in SMQ2

    Hello Community,
    I have a XSLT ABAP transformation calling some ABAP objects and it's working well. I just need to handle some applications exceptions.
    I wrote an ABAP Class that raise an exception in this way:
    RAISE EXCEPTION TYPE cx_mapping_fault
            EXPORTING
              error_text = l_error.
    The problem is that the message appears canceled in SMQ2 and I need to show the error status in the Integration Engine
    I have tried with the <xsl:message>:
    <xsl:message terminate="yes">Error</xsl:message>
    But it didn't work. Exception isn't thrown in the Integration Engine. The message status is processed successfully.
    Your help would be appreciated.
    Regards,
    Yuván>

    Hello VJ,
    Thanks for your answer. I'm not using BPM in this scenario. I don't understand why messages that throw some exception in XSLT ABAP lock SMQ2. Because this doesn't happen when I use an ABAP-CLASS or message mapping as mapping programs. The lock is just using XSLT ABAP.
    Is this normal...?....is there anyway to avoid the lock and change the status to error in the integration engine..?
    Regards.
    Yuvan,

  • XI Configuration Design questions with multi-mapping message mapping object

    Hello,
    I'm having trouble designing a particular scenario for multi-mapping.  Currently i'm working with a Vendor create and change.  BPM is not being used.
    This is what i need:
    I need a CREMDM04 to turn into one or multiple ADRMAS/CREMAS IDocs and potentially a CLFMAS IDoc based on the values in the inbound CREMDM04 IDoc.
    This is what i currently have:
    A CREMDM04 inbound idoc is multi-mapped to a CREMDM03 (1...9999), another CREMDM03 (0...9999), and a CLFMAS01 (0...9999).  At a minimum only the first CREMDM03 IDoc will be created and at a maximum all three will be created.  The parameters on creating the second CREMDM03 IDoc and the CLFMAS01 IDoc are based on the values in the inbound CREMDM04 IDoc, whereas the first CREMDM03 IDoc will always be created and the values will just be converted/mapped from the inbound CREMDM04 IDoc.  This multi-mapping is currently set-up via a graphical message map and works successfully in the test-tab of the mapping object.  It has a main message and has sub-messages which are the IDocs.  I’m mapping the CREMDM04 to a CREMDM03 to then map it through an ABAP-Class and then to an XSL where the CREMDM03 inbound structure is expected to split into ADRMAS and CREMAS Outbound IDocs for Vendor Create/Change in the remote R/3 systems.
    After the graphical map we have a necessary ABAP Class call that calls a BAPI to the remote system.  This ABAP Class must come after the graphical map since the parameter for the BAPI is based on a converted value from the graphical multi-map.
    After the ABAP Class call there is finally an XSL message split the CREMDM IDoc into an ADRMAS and CREMAS IDoc.  There need to be two interface mappings (one per ADRMAS and CREMAS) since the ABAP classes and XSLs are specific to the ADRMAS and CREMAS.
    The CLFMAS IDoc can go directly to the remote system, but since it’s within this one multi-map, I’m not sure if is possible?  I’m not sure if it will fail once it tries entering the XSL mapping (this is the standard CREMDM message split offered from SAP).
    There are three interface mapping scenarios I can think of, but cannot get to work:
    CREMDM04 to ADRMAS02
    CREMDM04 to CREMAS03
    CREMDM04 to CLFMAS01
    Currently I have the Interface Mapping structured as follows:  (I cannot get this to activate as it appears it does not work)
    Multi-Mapping ==> ABAP Class Call ==> Standard XSL Message Split
    How should i design the interface mapping objects and the configuration objects for this scenario?
    Any help is appreciated and I definitely will reward points (no need to include it in your response).

    Hi,
    I suggest you may use multiple steps interface mapping. It's composited with 3 message mappings as step by step.
    Mapping 1: One to one mapping. For the output schema, use a composition schema which includes those 3 IDOCs you want.
    Mappign 2: ABAP Mapping. I am not sure the ABAP class you mentioned is an ABAP mapping or not. If it does, That's ok. If not,
    call that ABAP class in your ABAP mapping and do corresponding change for your message. Return back the same structure as output.
    Mapping 3: One to multiple mapping to split the message.
    So basically as interface mapping, it's one to multiple mapping. And internally, you have 3 steps to realize the mapping.
    And as my experience, for both one to multiple message mapping & multiple steps interface mapping, it works well in my project. And
    in ID, you have to configure it via "advance" function in receiver determination or interface determination.
    Let me know if any confusion.
    Thanks
    Nick

  • How do I halt an xsl transform on detection of a logical error?

    I am using a transform in BPEL to process incoming data.
    I would like to halt a transform on an error? I tried the following and it seems to work; however, jdev produces an error trying to parse after switching to the design mode.
    <xsl:if test='not($expectedValue = $actualValue)'>
    <xsl:message terminate="yes"></xsl:message>
    </xsl:if>
    Line Number:(xxx) : Error: "xsl:message" XSL Element Currently not Supported
    I tried to use error() as well but that produces an error "Failed to transform source xml." "XSL_MAP_EXEC_ERROR" null.
    If you have a reference to a best practice that would be appreciated.
    Thanks,
    John

    Okay, I've....
    1) Reinstalled XE, to start from scratch
    2) Went in to SQL*Plus, did a "create pfile from spfile;"
    3) Shutdown the database
    4) Started it up in MOUNT mode
    5) Ran NID, to change the database name from 'XE' to 'CTXMGMT'
    6) Shutdown the database again
    7) Edited the pfile to change the database name (i.e. "db_name='CTXMGMT'")
    8) Started up the database
    And that worked! So that's good... but now my question is:
    How do I change the SID for the database? Currently, the instance name for the database is still 'XE'....
    SQL> select instance_name
    2 from v$instance;
    INSTANCE_NAME
    xe
    I'd like it so a connection could be made to the database with the tnsnames.ora file looking like this:
    CTXMGMT =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(Host = rodin)(Port = 1521))
    (CONNECT_DATA = (SID = CTXMGMT))
    Could someone explain how to get the database to this state? Thanks.
    - Gary

  • Xsl:template in insert-request

    Hi all
    I try to use <xsl:call-template >
    in the transform page that is being call from <xsql:insert-request> but I get an error
    <xsql-error action="xsql:insert-request"><message>XSL-1049: Template '' invoked but not defined.</message></xsql-error>
    i need to call template because I need to run on a string and tokenize it, so I have use to template with recursion
    does anyone has a clue
    null

    hi Jinyu
    the xsl is
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <ROWSET xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:version="1.0">
    <xsl:choose>
    <xsl:when test="string-length(STORIES/STORY/TICKER) >0">
    <xsl:message> before call</xsl:message>
    <xsl:call-template select="tokinze"/>
    <xsl:message> AFTER call</xsl:message>
    </xsl:when>
    </xsl:choose>
    <xsl:template name="tokinze">
    <xsl:message> In Tokinze</xsl:message>
    <ROW>
    <REPOSITORY_ID><xsl:value-of select="concat('reuters','$thedate',../@repository_id)"/></REPOSITORY_ID>
    <SEQ><xsl:value-of select="position()"/></SEQ>
    <RSM_ATTRIBUTE>ticker</RSM_ATTRIBUTE>
    <RSM_VALUE1><xsl:value-of select="../TICKER"/></RSM_VALUE1>
    <RSM_PUBLISH>0</RSM_PUBLISH>
    </ROW>
    </xsl:template>
    </ROWSET>
    and what i need to do is to token the string
    that i get in the TICKER field thats' why i need to use
    recursion
    thanks

  • Log4j not logging messages out to weblogic console for custom automatplugin

    Hi,
    We have a custom automation plugin for the OSM application build 381 in our environment(HP-UX Itanium platform). The plugins are bundled in a single ear application "A.ear" which is a mixed bag of pre-defined automation plugins of type XsltSender, XsltAutomator(both InternalReciever as well ExternalReceiver) as well other custom automators(java). For logging of messages in order to aid debugging of custom automators, we are using a logger "com.xyz.osm.plugin" which is also declared in log4j.xml file that is within omslogging.jar. You must already be aware that the build scripts of assembling, deploying ansd registering plugins also includes omslogging.jar are part of the application ear.
    <category name="com.mtsa.osm.plugin">
    <priority value="debug"/>
    </category>
    Below java code snippet is taken from our custom automation plugin classes indicating how the above logger is being used for printing messages.
    //Declaration
    private static Log log = LogFactory.getLog("com.mtsa.osm.plugin");
    mthod1(){
    log.info("xyz");
    In addition to the above logger, the pre-defined automators XsltSender, XsltReceiver also enable logging from xsl files by making the "log" parameter available. Thus we have lines such as the one below in our xsl files that should print messages to the weblogic console.
    <xsl:variable name="addLog1" select="java:info($log, 'transformSiebelActivationRequest: ***** Starting *****')"/>
    The logger that allows printing of these lines is "com.mslv.oms.automation".
    <category name="com.mslv.oms.automation">
    <priority value="info"/>
    </category>
    These configurations should have ideally allowed one to see messages such as one below getting printed out to weblogic console:
    <16-Mar-2012 8:59:36,931 CDT PM> <INFO> <plugin.XSLTReceiver> <ExecuteThread: '19' for queue: 'oms.automation'> <transformSiebelActivationRequest: ***** Starting *****>
    Unfotunately after having done all the above configuration, we are still unable to see any such log messages in the console apart from those emitting from SOP and from <xsl:message> inserted in java & xsl files respectively.
    I also checked if the log4j sub-system is able to correctly initialize after parsing the log4j.xml. It does and one can confirm it by setting system property log4j.debug=true in setDomainEnv.sh file.
    $$$$$$$$ log4j initialization by application classloader for oms.ear application $$$$$$$$$$$$$$$$$$
    log4j: Trying to find [log4j.xml] using context classloader weblogic.utils.classloaders.GenericClassLoader@1592141 finder: weblogic.utils.classloaders.CodeGenClassFinder@1112e85 annotation: oms@.
    log4j: Using URL [zip:/home/osmwl/bea/user_projects/domains/dev04/servers/osmdev04/tmp/_WL_user/oms/amuube/omslogging.jar!/log4j.xml] for automatic log4j configuration.
    log4j: Preferred configurator class: org.apache.log4j.xml.DOMConfigurator
    log4j: System property is :null
    log4j: Standard DocumentBuilderFactory search succeded.
    log4j: DocumentBuilderFactory is: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
    $$$$$$$$ log4j initialization by application classloader for custom automation plugin xyz.ear application $$$$$$$$$$$$$$$$$$
    log4j: Trying to find [log4j.xml] using context classloader weblogic.utils.classloaders.GenericClassLoader@1b7a8c5 finder: weblogic.utils.classloaders.CodeGenClassFinder@10bc849 annotation: xyz.ear@.
    log4j: Using URL [zip:/home/osmwl/bea/user_projects/domains/dev04/servers/osmdev04/tmp/_WL_user/xyz.ear/ah0eeq/omslogging.jar!/log4j.xml] for automatic log4j configuration.
    log4j: Preferred configurator class: org.apache.log4j.xml.DOMConfigurator
    log4j: System property is :null
    log4j: Standard DocumentBuilderFactory search succeded.
    log4j: DocumentBuilderFactory is: weblogic.xml.jaxp.RegistryDocumentBuilderFactory
    log4j: debug attribute= "false".
    Ironically, logging levels for loggers defined in log4j.xml of oms.ear could be dynamically changed from log4jAdmin.jsp page and the results are immediately visible. However for some reason, loggers defined in log4j.xml of custom plugin application were completely getting ignored. I don't see any warnings or erro messages in the logs indicating that log4j configuration failed for custom application failed. We want to refrain using SOP and <xsl:message> but I am afraid we have no option other than filling up our sources files with them.
    Bottomline, how do we get application B(which in our case is the custom plugin) to log messaged the console just like that done by application A(oms.ear).
    I am sure OSM developers would like to leverage log4j bundled with OSM SDK to log messages that would aid in trouble-shooting during development cycles. Both application ear files have commons-logging-1.1.jar,log4j-1.2.13.jar, omslogging.jar available in their classpaths. In other words, META-INF/MANIFEST.MF file of oms.war(web module within oms.ear) and xyz.jar(ejb module within xyz.ear) has references to these jars.
    Appreciate if one can reply and let me know if they could get log messages to print from custom plugin.
    Thanks
    Edited by: user3693508 on Mar 18, 2012 11:38 AM

    Hi,
    We have a custom automation plugin for the OSM application build 381 in our environment(HP-UX Itanium platform). The plugins are bundled in a single ear application "A.ear" which is a mixed bag of pre-defined automation plugins of type XsltSender, XsltAutomator(both InternalReciever as well ExternalReceiver) as well other custom automators(java). For logging of messages in order to aid debugging of custom automators, we are using a logger "com.xyz.osm.plugin" which is also declared in log4j.xml file that is within omslogging.jar. You must already be aware that the build scripts of assembling, deploying ansd registering plugins also includes omslogging.jar are part of the application ear.
    <category name="com.mtsa.osm.plugin">
    <priority value="debug"/>
    </category>
    Below java code snippet is taken from our custom automation plugin classes indicating how the above logger is being used for printing messages.
    //Declaration
    private static Log log = LogFactory.getLog("com.mtsa.osm.plugin");
    mthod1(){
    log.info("xyz");
    In addition to the above logger, the pre-defined automators XsltSender, XsltReceiver also enable logging from xsl files by making the "log" parameter available. Thus we have lines such as the one below in our xsl files that should print messages to the weblogic console.
    <xsl:variable name="addLog1" select="java:info($log, 'transformSiebelActivationRequest: ***** Starting *****')"/>
    The logger that allows printing of these lines is "com.mslv.oms.automation".
    <category name="com.mslv.oms.automation">
    <priority value="info"/>
    </category>
    These configurations should have ideally allowed one to see messages such as one below getting printed out to weblogic console:
    <16-Mar-2012 8:59:36,931 CDT PM> <INFO> <plugin.XSLTReceiver> <ExecuteThread: '19' for queue: 'oms.automation'> <transformSiebelActivationRequest: ***** Starting *****>
    Unfotunately after having done all the above configuration, we are still unable to see any such log messages in the console apart from those emitting from SOP and from <xsl:message> inserted in java & xsl files respectively.
    I also checked if the log4j sub-system is able to correctly initialize after parsing the log4j.xml. It does and one can confirm it by setting system property log4j.debug=true in setDomainEnv.sh file.
    $$$$$$$$ log4j initialization by application classloader for oms.ear application $$$$$$$$$$$$$$$$$$
    log4j: Trying to find [log4j.xml] using context classloader weblogic.utils.classloaders.GenericClassLoader@1592141 finder: weblogic.utils.classloaders.CodeGenClassFinder@1112e85 annotation: oms@.
    log4j: Using URL [zip:/home/osmwl/bea/user_projects/domains/dev04/servers/osmdev04/tmp/_WL_user/oms/amuube/omslogging.jar!/log4j.xml] for automatic log4j configuration.
    log4j: Preferred configurator class: org.apache.log4j.xml.DOMConfigurator
    log4j: System property is :null
    log4j: Standard DocumentBuilderFactory search succeded.
    log4j: DocumentBuilderFactory is: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
    $$$$$$$$ log4j initialization by application classloader for custom automation plugin xyz.ear application $$$$$$$$$$$$$$$$$$
    log4j: Trying to find [log4j.xml] using context classloader weblogic.utils.classloaders.GenericClassLoader@1b7a8c5 finder: weblogic.utils.classloaders.CodeGenClassFinder@10bc849 annotation: xyz.ear@.
    log4j: Using URL [zip:/home/osmwl/bea/user_projects/domains/dev04/servers/osmdev04/tmp/_WL_user/xyz.ear/ah0eeq/omslogging.jar!/log4j.xml] for automatic log4j configuration.
    log4j: Preferred configurator class: org.apache.log4j.xml.DOMConfigurator
    log4j: System property is :null
    log4j: Standard DocumentBuilderFactory search succeded.
    log4j: DocumentBuilderFactory is: weblogic.xml.jaxp.RegistryDocumentBuilderFactory
    log4j: debug attribute= "false".
    Ironically, logging levels for loggers defined in log4j.xml of oms.ear could be dynamically changed from log4jAdmin.jsp page and the results are immediately visible. However for some reason, loggers defined in log4j.xml of custom plugin application were completely getting ignored. I don't see any warnings or erro messages in the logs indicating that log4j configuration failed for custom application failed. We want to refrain using SOP and <xsl:message> but I am afraid we have no option other than filling up our sources files with them.
    Bottomline, how do we get application B(which in our case is the custom plugin) to log messaged the console just like that done by application A(oms.ear).
    I am sure OSM developers would like to leverage log4j bundled with OSM SDK to log messages that would aid in trouble-shooting during development cycles. Both application ear files have commons-logging-1.1.jar,log4j-1.2.13.jar, omslogging.jar available in their classpaths. In other words, META-INF/MANIFEST.MF file of oms.war(web module within oms.ear) and xyz.jar(ejb module within xyz.ear) has references to these jars.
    Appreciate if one can reply and let me know if they could get log messages to print from custom plugin.
    Thanks
    Edited by: user3693508 on Mar 18, 2012 11:38 AM

  • XSL to validate xml structure using XSD

    Hi,
    Can you please provide me a sample xsl that validates input XML against the given schema?
    I have been trying with the following, but I am getting an error in jdeveloper 11g.
    XML-23003: (Error) XPath 2.0 feature schema-element/schema-attribute not supported
    Process exited with exit code 1.
    <?xml version="1.0" encoding="windows-1252" ?>
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:import-schema schema-location="po1.xsd"/>
    <xsl:output method="xml" version="1.0" indent="yes"/>
    <!-- Root template -->
    <xsl:template match="/">
    <xsl:if test="not(* instance of schema-element(authorising))">
    <xsl:message terminate="yes">
    Source document is not a validated Provisioning list
    </xsl:message>
    </xsl:if>
    <xsl:apply-templates/>
    </xsl:template>
    </xsl:stylesheet>
    Thanks
    923344

    Hi,
    Can you please provide me a sample xsl that validates input XML against the given schema?
    I have been trying with the following, but I am getting an error in jdeveloper 11g.
    XML-23003: (Error) XPath 2.0 feature schema-element/schema-attribute not supported
    Process exited with exit code 1.
    <?xml version="1.0" encoding="windows-1252" ?>
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:import-schema schema-location="po1.xsd"/>
    <xsl:output method="xml" version="1.0" indent="yes"/>
    <!-- Root template -->
    <xsl:template match="/">
    <xsl:if test="not(* instance of schema-element(authorising))">
    <xsl:message terminate="yes">
    Source document is not a validated Provisioning list
    </xsl:message>
    </xsl:if>
    <xsl:apply-templates/>
    </xsl:template>
    </xsl:stylesheet>
    Thanks
    923344

  • XML-23002: (Error) internal xpath error while calling template

    Hi,
    I have used call-template named Chemloop in my xslt in the following way as attached in the xsl file. But when I am testing this xsl file through the bpel transformation, getting the error XML-23002: (Error) internal xpath error. Using this xslt I am converting a flat file into a xml file. My xslt except the call template part is working fine. Please suggest me if I m doing anything wrong.
    XSLT:
    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
    <mapSources>
    <source type="WSDL">
    <schema location="../ReadASNNAEbizAlcanFileAdapter.wsdl"/>
    <rootElement name="SynchAdvancedShipmentNotice" namespace="http://oracle.com/EbizGateway/NA/SynchASN/V2"/>
    </source>
    </mapSources>
    <mapTargets>
    <target type="WSDL">
    <schema location="../ReadASNNAEbizAlcanFileAdapter.wsdl"/>
    <rootElement name="ShipNotice" namespace=""/>
    </target>
    </mapTargets>
    <!-- GENERATED BY ORACLE XSL MAPPER 11.1.1.6.0(build 111214.0600.1553) AT [TUE FEB 12 21:05:56 GMT+05:30 2013]. -->
    ?>
    <xsl:stylesheet version="2.0"
    xmlns:svcdoc="http://xmlns.oracle.com/Services/Documentation/V1"
    xmlns:aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia.core.xpath.AIAFunctions"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:pc="http://xmlns.oracle.com/pcbpel/"
    xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions"
    xmlns:alcebo="http://oracle.com/EbizGateway/NA/SynchASN/V2"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:socket="http://www.oracle.com/XSL/Transform/java/oracle.tip.adapter.socket.ProtocolTranslator"
    xmlns:mhdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.mediator.service.common.functions.MediatorExtnFunction"
    xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue"
    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
    xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
    xmlns:med="http://schemas.oracle.com/mediator/xpath"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
    xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
    xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:alcabcs="http://xmlns.oracle.com/pcbpel/adapter/file/T2FJAN/CreateASNNAEBIZAlcanProvABCSImpl/ReadASNNAEbizAlcanFileAdapter"
    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
    exclude-result-prefixes="xsi xsl pc alcebo plnk wsdl jca xsd alcabcs aia bpws xp20 bpel bpm ora socket mhdr oraext dvm hwf med ids xdk xref ldap">
    <xsl:template match="/">
    <ShipNotice>
    <Header>
    <BOLNo>
    <xsl:value-of select="/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D1DP1_1000/alcebo:BILL_OF_LADING_1000"/>
    </BOLNo>
    <TripNo>
    <xsl:value-of select="/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D1DP1_1000/alcebo:TRIP_NAME_1000"/>
    </TripNo>
    <Action>
    <xsl:text disable-output-escaping="no"></xsl:text>
    </Action>
    <Attr1>
    <xsl:text disable-output-escaping="no"></xsl:text>
    </Attr1>
    <Attr2>
    <xsl:text disable-output-escaping="no"></xsl:text>
    </Attr2>
    <Attr3>
    <xsl:text disable-output-escaping="no"></xsl:text>
    </Attr3>
    <Attr4>
    <xsl:text disable-output-escaping="no"></xsl:text>
    </Attr4>
    <Attr5>
    <xsl:text disable-output-escaping="no"></xsl:text>
    </Attr5>
    </Header>
    <Shipment>
    <ShipDate>
    <xsl:value-of select="/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D1DP1_1000/alcebo:DEPARTURE_DATE_1000"/>
    </ShipDate>
    <RouteCode>
    <xsl:value-of select="/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D2DP2_1010[1]/alcebo:SHIP_METHOD_CODE_EXT4_1010"/>
    </RouteCode>
    <xsl:choose>
    <xsl:when test='/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D2DP2_1010[1]/alcebo:SHIP_METHOD_CODE_EXT1_1010 = "R"'>
    <RateRouteCode>
    <xsl:value-of select="/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D2DP2_1010[1]/alcebo:SHIP_METHOD_CODE_EXT3_1010"/>
    </RateRouteCode>
    </xsl:when>
    <xsl:otherwise>
    <RateRouteCode>
    <xsl:value-of select="/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D2DP2_1010[1]/alcebo:SHIP_METHOD_CODE_EXT1_1010"/>
    </RateRouteCode>
    </xsl:otherwise>
    </xsl:choose>
    <xsl:choose>
    <xsl:when test='/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D2DP2_1010[1]/alcebo:SHIP_METHOD_CODE_EXT1_1010 = "R"'>
    <CarrierCode>
    <xsl:value-of select="/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D2DP2_1010[1]/alcebo:SHIP_METHOD_CODE_EXT3_1010"/>
    </CarrierCode>
    </xsl:when>
    <xsl:otherwise>
    <CarrierCode>
    <xsl:value-of select="/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D2DP2_1010[1]/alcebo:SHIP_METHOD_CODE_EXT1_1010"/>
    </CarrierCode>
    </xsl:otherwise>
    </xsl:choose>
    <TransportModeCode>
    <xsl:value-of select="substring(/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D2DP2_1010[1]/alcebo:SHIP_METHOD_CODE_EXT2_1010,1.0,1.0)"/>
    </TransportModeCode>
    <TransportModeType>
    <xsl:value-of select="normalize-space(/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:RTIN1_1030/alcebo:ROUTING_INSTRUCTIONS1_1030)"/>
    </TransportModeType>
    <xsl:choose>
    <xsl:when test='normalize-space(/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D2DP2_1010[1]/alcebo:SHIP_METHOD_CODE_EXT1_1010) = "R"'>
    <TrailerNo>
    <xsl:value-of select="concat(/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:A1DL1_3600[1]/alcebo:DELIVERY_ATTRIBUTE1_3600,/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:A2DL2_3610[1]/alcebo:DELIVERY_ATTRIBUTE5_3610)"/>
    </TrailerNo>
    </xsl:when>
    <xsl:otherwise>
    <TrailerNo>
    <xsl:value-of select="normalize-space(/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D2DP2_1010[1]/alcebo:EQUIPMENT_NUMBER_1010)"/>
    </TrailerNo>
    </xsl:otherwise>
    </xsl:choose>
    <SealNo>
    <xsl:value-of select="normalize-space(/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D2DP2_1010[1]/alcebo:EQUIPMENT_SEAL_1010)"/>
    </SealNo>
    <Quantity>
    <xsl:value-of select='sum(/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:UnpackedOrder/alcebo:UnpackedItemDetail/alcebo:I3IT3_4520/alcebo:SHIPPED_QUANTITY_4520) + sum(format-number(/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:UnpackedOrder/alcebo:P1PO1_4000/alcebo:FREIGHT_TERMS_CODE_EXT3_4000,"##############0.00"))'/>
    </Quantity>
    <QuantityUOM>
    <xsl:value-of select="normalize-space(/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D3DP3_1015[1]/alcebo:DELIVERY_TARE_WEIGHT_UOM_EXT1_1015)"/>
    </QuantityUOM>
    <Attr1>
    <xsl:text disable-output-escaping="no"></xsl:text>
    </Attr1>
    <Attr2>
    <xsl:text disable-output-escaping="no"></xsl:text>
    </Attr2>
    <Attr3>
    <xsl:text disable-output-escaping="no"></xsl:text>
    </Attr3>
    <Attr4>
    <xsl:text disable-output-escaping="no"></xsl:text>
    </Attr4>
    <Attr5>
    <xsl:text disable-output-escaping="no"></xsl:text>
    </Attr5>
    <ShipmentItems>
    <xsl:for-each select="/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:UnpackedOrder">
    <ShipmentItem>
    <ShipListNo>
    <xsl:value-of select='concat(substring("0000",1.0,4.0 - string-length(string(position()))),string(position()))'/>
    </ShipListNo>
    <OrderNo>
    <xsl:value-of select="normalize-space(alcebo:P1PO1_4000/alcebo:PURCHASE_ORDER_NUMBER_4000)"/>
    </OrderNo>
    <LineNo>
    <xsl:value-of select="normalize-space(alcebo:UnpackedItemDetail/alcebo:I2IT2_4510[1]/alcebo:CUST_PO_LINE_NUM_4510)"/>
    </LineNo>
    <ItemNoXref>
    <xsl:value-of select="normalize-space(alcebo:UnpackedItemDetail/alcebo:I1IT1_4500[1]/alcebo:BUYER_PART_NO_4500)"/>
    </ItemNoXref>
    <AlcoaPartNo>
    <xsl:value-of select="normalize-space(alcebo:UnpackedItemDetail/alcebo:I1IT1_4500[1]/alcebo:SUPPLIER_PART_NUMBER_4500)"/>
    </AlcoaPartNo>
    <Quantity>
    <xsl:value-of select="sum(alcebo:UnpackedItemDetail/alcebo:I3IT3_4520/alcebo:SHIPPED_QUANTITY_4520)"/>
    </Quantity>
    <QuantityUOM>
    <xsl:value-of select="normalize-space(alcebo:UnpackedItemDetail/alcebo:I3IT3_4520[1]/alcebo:ORDER_QUANTITY_UOM_INT_4520)"/>
    </QuantityUOM>
    <TareWeight>
    <xsl:value-of select='format-number(alcebo:P1PO1_4000/alcebo:FREIGHT_TERMS_CODE_EXT3_4000,"##############0.##")'/>
    </TareWeight>
    <TareWeightUOM>
    <xsl:value-of select="normalize-space(alcebo:UnpackedItemDetail/alcebo:I3IT3_4520[1]/alcebo:ORDER_QUANTITY_UOM_INT_4520)"/>
    </TareWeightUOM>
    <Attr1>
    <xsl:text disable-output-escaping="no"></xsl:text>
    </Attr1>
    <Attr2>
    <xsl:text disable-output-escaping="no"></xsl:text>
    </Attr2>
    <Attr3>
    <xsl:text disable-output-escaping="no"></xsl:text>
    </Attr3>
    <Attr4>
    <xsl:text disable-output-escaping="no"></xsl:text>
    </Attr4>
    <Attr5>
    <xsl:text disable-output-escaping="no"></xsl:text>
    </Attr5>
    <xsl:for-each select="alcebo:UnpackedItemDetail">
    <Bundle>
    <LotNo>
    <xsl:value-of select="alcebo:DeliveryDetail/alcebo:LSDET_5500[1]/alcebo:LOT_NUMBER_5500"/>
    </LotNo>
    <SubLotNo>
    <xsl:value-of select="alcebo:DeliveryDetail/alcebo:EX02_5591[1]/alcebo:DSNO_LEV06_EXT09_5591"/>
    </SubLotNo>
    <Quantity>
    <xsl:value-of select="alcebo:I3IT3_4520[1]/alcebo:SHIPPED_QUANTITY_4520"/>
    </Quantity>
    <QuantityUOM>
    <xsl:value-of select="alcebo:I3IT3_4520[1]/alcebo:ORDER_QUANTITY_UOM_INT_4520"/>
    </QuantityUOM>
    <Pieces>
    <xsl:value-of select="alcebo:DeliveryDetail/alcebo:EX02_5591[1]/alcebo:DSNO_LEV06_EXT10_5591"/>
    </Pieces>
    <Attr1>
    <xsl:text disable-output-escaping="no"></xsl:text>
    </Attr1>
    <Attr2>
    <xsl:text disable-output-escaping="no"></xsl:text>
    </Attr2>
    <Attr3>
    <xsl:text disable-output-escaping="no"></xsl:text>
    </Attr3>
    <Attr4>
    <xsl:text disable-output-escaping="no"></xsl:text>
    </Attr4>
    <Attr5>
    <xsl:text disable-output-escaping="no"></xsl:text>
    </Attr5>
    <!-- User Defined Templates -->
    <xsl:call-template name="Chemloop">
    <xsl:with-param name="i">1</xsl:with-param>
    </xsl:call-template>
    </Bundle>
    </xsl:for-each>
    </ShipmentItem>
    </xsl:for-each>
    </ShipmentItems>
    </Shipment>
    </ShipNotice>
    </xsl:template>
    <xsl:template name="Chemloop">
    <xsl:param name="i"/>
    <xsl:variable name="ChemRow"
    select="concat(/alcebo:DeliveryDetail[position()]/alcebo:EX01_5590[1]/alcebo:DSNO_LEV06_EXT01_5590,/alcebo:DeliveryDetail[position()]/alcebo:EX01_5590[1]/alcebo:DSNO_LEV06_EXT02_5590,/alcebo:DeliveryDetail[position()]/alcebo:EX01_5590[1]/alcebo:DSNO_LEV06_EXT03_5590,/alcebo:DeliveryDetail[position()]/alcebo:EX01_5590[1]/alcebo:DSNO_LEV06_EXT04_5590)"/>
    <xsl:variable name="ChemBlock"
    select="substring($ChemRow,1+($i-1)*33,33)"/>
    <xsl:if test="$ChemBlock!=' '">
    <ChemicalAnalysis>
    <ElementName>
    <xsl:value-of select="substring($ChemBlock,1,5)"/>
    </ElementName>
    <RNDValue>
    <xsl:value-of select="substring($ChemBlock,6,15)"/>
    </RNDValue>
    <ValueQualifier>
    <xsl:value-of select="substring($ChemBlock,21,2)"/>
    </ValueQualifier>
    <NumDecimals>
    <xsl:value-of select="substring($ChemBlock,23,3)"/>
    </NumDecimals>
    <DropNo>
    <xsl:value-of select="substring($ChemBlock,26,8)"/>
    </DropNo>
    </ChemicalAnalysis>
    </xsl:if>
    <xsl:if test="($ChemBlock=' ') and $i=1">
    <xsl:message terminate="yes">No Chemical data found</xsl:message>
    </xsl:if>
    <xsl:if test="$i &lt;= 26">
    <xsl:call-template name="Chemloop">
    <xsl:with-param name="i">
    <!-- Increment index-->
    <xsl:value-of select="$i + 1"/>
    </xsl:with-param>
    </xsl:call-template>
    </xsl:if>
    </xsl:template>
    </xsl:stylesheet>

    I can't get what are you trying to achieve by a construction like bellow...
    /alcebo:DeliveryDetail[position()]
    Remember XSLT is not a procedural language... a selector like /alcebo:DeliveryDetail[position() = $var] or just /alcebo:DeliveryDetail[$var] would make more sense...
    Cheers,
    Vlad

  • Swapping XML Parser and XSLT to Xalan 2.7.0 - Not Working (OC4J 10.1.3)

    Hi-
    I'm trying to use the latest Xercies/Xalan classes in OC4J 10.1.3 as described in the How-To swap XML Parsers document:
    http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-swapxmlparser/doc/readme.html
    What I can see happening is that the oracle.xml shared library is successfully 'turned off', but the xalan libraries are not added. Instead, the default xml classes that are distributed with the JDK become visible. For instance, using a slightly modified version of the index.jsp page from the how-to, I get this result:
    ------ Output from JSP page ----------------
    TransformerFactory Instance: org.apache.xalan.processor.TransformerFactoryImpl
    Transformer Instance: org.apache.xalan.transformer.TransformerIdentityImpl
    Transformer Version: Xalan Java 2.4.1 (!!)
    What I expect is for that last line to say version 2.7.0, which is the version of the xalan.jar included in my shared library (code to add that line to the how-to shown below).
    I suspect what is happening is that the class loader is simply not letting a shared library override a system library - to do that you probably need to place the jar files in system endorsed directory.
    Has anyone gotten this how-to to work - actually replacing the XML parser/transform classes with the latest Xalan classes? Are you sure it is seeing the current version you placed in the shared library?
    Thanks,
    Eric Everman
    ---- My modified getXSLTDetails() method in the index.jsp page of the how-to -------
    <!-- Additional Import -->
    <%@ page import="org.apache.xalan.Version" %>
    public static String getXSLTDetails()
    Transformer transformer=null;
    TransformerFactory transformerfactory = TransformerFactory.newInstance();
         Version ver = null;
         String br = "<" + "br" + ">"; //otherwise the otn forum chocks on the break.
    try
    transformer = transformerfactory.newTransformer();
              ver = (Version) transformer.getClass().forName("org.apache.xalan.Version").newInstance();
              String ret_val =
                   "TransformerFactory Instance: "+transformerfactory.getClass().getName() + br +
                   "Transformer Instance: "+transformer.getClass().getName() + br;
              if (ver != null) {
                   ret_val = ret_val + "Transformer Version: " + ver.getVersion() + br;
              } else {
                   ret_val = ret_val + "Transformer Version not Available" + br;
              return ret_val;
    catch (Exception e)
    e.printStackTrace();
    return e.getMessage();
    }--------------------------------------------------------------------

    Steve - Thanks for responding on this.
    The Xalan SQL extension is built into Xalan. The most painless way to try it out is to run it via JEdit: www.jedit.org
    JEdit a OS Java application with a fairly painless install process (I'm assuming you already have a current JRE installed). Once its installed, you'll need to install the XSLT plugin - in JEdit goto Plugins | Plugin Manager | Install and pick the XSLT plugin. You'll need the Oracle JDBC classes on your classpath - this can be done by copying the oracle_jdbc4.jar into the [JEdit install directory]/jars directory.
    Restart to load that jar and you should be all set.
    I included a sample XSLT page at the bottom of this post that is somewhat of a template transform for the SQL extension - its more complicated then it needs to be, but it does some nice things with the results of the query. Save it as a file and make the appropriate changes to the 'datasource' parameter near the top of the file.
    Then in JEdit, open the file and make sure the XSLT plugin is visible (Plugins | XSLT | XSLT Processor Toggle - or alternately dock it in the window via global prefs). In the XSLT plugin: Allow the current buffer to be used as the source, Add that same file as a stylesheet via the '+' button, and pick a result file at the bottom. Then click the 'Transform XML' button.
    Troubleshooting: I seem to remember having some classpath errors when I tried this on windows, but others have had it work w/o issues. I do remeber that the XSLT plugin had a popup window that gave a pretty good explaintion of the problem, if it occurs. Also, for some reason the XSLT plugin will not create a new file for the output, so its often best to create a file first, then choose it as the output. Of course, you can always run a transformation from the command line or w/in an applicatoin. Full docs on the Xalan SQL extension can be found at: http://xml.apache.org/xalan-j/extensionslib.html#sql
    Here is my sample XSLT transform using the SQL extension:
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
              xmlns:sql="http://xml.apache.org/xalan/sql"
              xmlns:str="http://exslt.org/strings"
              xmlns:xalan="http://xml.apache.org/xalan"
              extension-element-prefixes="sql str xalan">
         <xsl:output indent="yes"/>
         <xsl:param name="driver">oracle.jdbc.OracleDriver</xsl:param>
         <xsl:param name="datasource">jdbc:oracle:thin:jqpublic/jqpublic@server_name:1521:dbname</xsl:param>
         <xsl:param name="jndiDatasource"><!-- jndi source for production use w/in enterprise environment --></xsl:param>
         <xsl:param name="debug">true</xsl:param>
         <xsl:variable name="connection" select="sql:new()"/>
         <xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
         <xsl:variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'"/>
         <!--
              The query:  You could pass parameters in to this query to build a where clause, but here is a simple example.
              Also, its nice to wrap the query with a max row number to prevent huge results.
         -->
         <xsl:param name="query">
         select * from (
      SELECT
              'One' FIELD_1,
              'Two' FIELD_2
         FROM DUAL
         ) where rownum < 100
         </xsl:param>
         <!-- Essentially, create a XConnection object -->
         <xsl:variable name="connection" select="sql:new()"/>
         <xsl:template match="/">
        <xsl:choose><!-- Connect using JNDI -->
          <xsl:when test="$jndiDatasource != ''">
            <xsl:if test="not(sql:connect($connection, $jndiDatasource))">
              <xsl:message>Failed to connect to db via jndi connection</xsl:message>
              <xsl:comment>Failed to connect to db via jndi connection</xsl:comment>
              <xsl:if test="$debug = 'true'">
                <xsl:copy-of select="sql:getError($connection)/ext-error"/>
              </xsl:if>
            </xsl:if>
          </xsl:when>
          <xsl:otherwise><!-- Connect using connection string -->
            <xsl:if test="not(sql:connect($connection, $driver, $datasource))">
              <xsl:message>Failed to connect to db via driver/url connection</xsl:message>
              <xsl:comment>Failed to connect to db via driver/url connection</xsl:comment>
              <xsl:if test="$debug = 'true'">
                <xsl:copy-of select="sql:getError($connection)/ext-error"/>
              </xsl:if>
            </xsl:if>
          </xsl:otherwise>
        </xsl:choose>
              <!--
              The results of the query.  The rowset is brought back in 'streaming' mode,
              so its not possible to ask it for the number of rows, or to check for zero
              rows.  There is a switch to disable streaming mode, but this requires all
              rows to be brought into memory.
              -->
              <xsl:variable name="table" select="sql:query($connection, $query)"/>
              <xsl:if test="not($table)">
                   <xsl:message>Error in Query</xsl:message>
                   <xsl:copy-of select="sql:getError($connection)/ext-error"/>
              </xsl:if>
              <page>
                   <!-- Your xalan environment -->
                   <xsl:copy-of select="xalan:checkEnvironment()"/>
                   <!-- Build a bunch of metadata about the rows -->
                   <meta>
                        <cols>
                             <xsl:apply-templates select="$table/sql/metadata/column-header"/>
                        </cols>
                   </meta>
                   <rowset>
                        <!--
                             With streaming results, you must use the apply-temmplates contruct,
                             not for-each, since for-each seems to attempt to count the rows, which
                             returns zero.
                        -->
                        <xsl:apply-templates select="$table/sql/row-set"/>
                   </rowset>
              </page>
              <xsl:value-of select="sql:close($connection)"/><!-- Always close -->
         </xsl:template>
         <xsl:template match="row">
              <row>
                   <xsl:apply-templates select="col"/>
              </row>
         </xsl:template>
         <xsl:template match="column-header">
              <col>
                   <xsl:attribute name="type">
                        <xsl:value-of select="@column-typename"/>
                   </xsl:attribute>
                   <xsl:attribute name="display-name">
                        <xsl:call-template name="create-display-name"/>
                   </xsl:attribute>
                   <xsl:value-of select="@column-name"/>
              </col>
         </xsl:template>
         <!-- Convert column names to proper caps: MY_FIELD becomes My Field -->
         <xsl:template name="create-display-name">
              <xsl:variable name="col-name">
                   <xsl:for-each select="str:tokenize(@column-name, '_')">
                        <xsl:value-of
                             select="concat(translate(substring(., 1, 1), $lowercase, $uppercase), translate(substring(.,2), $uppercase, $lowercase), ' ')"/>
                   </xsl:for-each>
              </xsl:variable>
              <xsl:value-of select="substring($col-name, 1, string-length($col-name) - 1)"/>
         </xsl:template>
         <!-- Creates data columns named 'col' with a column-name attribute -->
         <xsl:template match="col">
              <col>
                   <xsl:attribute name="column-name"><xsl:value-of select="@column-name"/></xsl:attribute>
                   <xsl:value-of select="."/>
              </col>
         </xsl:template>
    </xsl:stylesheet>

  • Save all details error in Exception Block of BizTalk

    In orchestration A,I make a Exception Block ,created a System.Exception object and saved Exception Error in a string and checking it in admin console.
    In my orchestarion, I got amount value from a element Amount, used a custom xslt and in that custom xslt, I used a C# function for desired calculation for the value of amount.
    Now when,input string of amount is not in a correct format then a error is saved regarding mapping  as follows:
    Transformation failed for Map A.
    But the actual error is as follows:
    input string was not in a correct format.
    How can I get this error in  exception handler block?
    Prakash

    Hi Prakash,
    Like you have mentioned that you are using Custom XSLT, my advice will be that you can raise an exception from within an XSLT template, based on the value.
    <xsl:message terminate="yes">Custom error text</xsl:message>
    This will cause the XSLT engine to stop processing immediately, and raise an exception.   This exception, including the custom error text contained within the message segment,
    can be caught in the BizTalk Orchestration engine by explicitly catching an exception of type 
    Microsoft.XLANGS.BaseTypes.TransformationFailureException.
    Refer: Biz Talk : How To : Throw Custom Exception in Map
    For step-by-step explanation on this refer: Flowing clear error messages from transforms
    Rachit
    Please mark as answer or vote as helpful if my reply does

Maybe you are looking for

  • Can't move tracks in playlists

    Since upgrading I appear unable to move tracks within playlists. Previously I just 'drag and dropped'. Any suggestions?

  • Error 800703f9 on update to 8.1 (Lumia 720)

    I'm getting this error 800703f9 when I try to update to windows 8.1. I made sure I'e suffiecient space(phone is almost empty) and charged. After downloading and installing, it restarts and shows this error code. What is wrong?

  • Trnasfer My music from my mini to my nano

    I have a mini but I get A nano and new computer as well so I instal the Nano sofwer in the computer, but now I like to see how I can put all the music that I have in the mini in to the nano library? Can some one help?

  • Execution time transaction MIGO

    I am with problems in the execution of transaction MIGO, the time of access in tables MLAUFCR, MLAUF and MLAUFKEPH arrives at the 1 minute. Somebody would know to say what to be able to be occurring? Thank you. Lucas

  • Starting with Dashboard

    Hi Experts,       I'm new to Dashboard.so give some example Url and some tips...how to start  work with sap dashboard.. Thanks in Advance.. Ashwin