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
Similar Messages
-
Asset Issue - When execute AR01, system throw a error msg .AB064
Hi Gurus,
need guidance to solve the issue.
When my user run a t-code AR01, System throw a error "No data was selected - Message no. AB064".
Then checked through SU53. It shows that Authorization was successfully given. Checked with my Basis Consultant also. He confirmed that the required authorization was given to user. I don't know what the system reacts like this..
Pl guide me to solve the issue....
( As a consultant, i have all rights / authorization. When i executed AR01, it works perfectly ) .
tks / Devi Aparna...The below are the (xxxx) madatory things before you go and execute the report.
Company code xxxx
Asset number
Subnumber
Asset class
Business area
Cost center
Plant
Location
Asset super number
Worklist
Report date xxxxx
Depreciation area xx (Dep area 01, 15, 30, 60, 65)
Sort Variant xxxx
Translation method
Try this
Thanks -
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.
/Pontushtml-output
<html>
<body>
<img src="1.jpg"/>
<img src="2.jpg"/>
</body>
</html>
Please help me! -
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 PMpublic 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> -
Issue with XSL transformation in Java Stored Procedure
Hi,
Am having issue applying XSL transformation in Java Stored procedure. I have loaded the java class as well as .XSL files through loadjava uility and their status in DB is VALID.
Below is the code in the java stored procedure:
public static String tranform(String strInputXML ){
URL url = ClassLoader.getSystemClassLoader().getResource(first.xsl);
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(new ByteArrayInputStream (strInputXML.getBytes("UTF-8")));
TransformerFactory tFactory = TransformerFactory.newInstance();
StreamSource stylesource = new StreamSource(url.openStream());
Transformer transformer = tFactory.newTransformer(stylesource);
When I run this procedure, am getting following errors:
{color:#ff0000}*ERROR: 'No such file or directory'*
FATAL ERROR: 'Could not compile stylesheet'{color}
My first.xsl file has reference to other excel file (Ex: <xsl:include href="second.xsl"/>) which seems to be causing this error. When I remove the reference, procedure is working fine.
Pls let me know how to resolve this and read the .XSL file with references.
Thanks,Hello,
Thanks for the reply. Actually I have seen that post before creating this thread. I thought that I could make use of java mail to work around this problem. I created a java class that succesfully sends mail to SSL host. I tried to call this java class from pl-sql through java stored procedure. That did not work
So, is this not supported in Oracle ? Please note that I have tested this in both 9i and 11g , in both the versions I got the error. You can refer to the code in the above post.
Thanks
Srikanth
Edited by: user12050615 on Jan 16, 2012 12:17 AM -
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,
taybwAs 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. -
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 kotalwarSachin,
<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 -
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.
nullCan 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 -
Re: Error while throwing OAException message
Hi,
I am facing the same issue, doing the controller extension and when throwing an OAEXCEPTION im getting this error. Please let me know if there is any work around.
Thanks
DivyaHi,
Thanks for your reply. I am trying to extended the controller and do a validation and if it fails want to throw an error message on the page.
This is the extended code i have written in process form request:
public void processFormRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
OAApplicationModule am = oapagecontext.getApplicationModule(oawebbean);
OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl)am.getOADBTransaction();
if(oapagecontext.getParameter("HrNext")!=null)
oapagecontext.writeDiagnostics(this,"Clicked on the NExt Button",1);
String sql =
"BEGIN apps.XXMU_GENERAL_PKG.Funds_check_return(:1); END;";
String out1 = null;
try
oapagecontext.writeDiagnostics(this,"entered try",1);
OracleCallableStatement cs =
(OracleCallableStatement)am.getOADBTransaction().createCallableStatement(sql,0);
cs.registerOutParameter(1, Types.VARCHAR);
cs.execute();
out1 = cs.getString(1);
if ("Y".equals(out1))
oapagecontext.writeDiagnostics(this,"Funds check succesful",1);
super.processFormRequest(oapagecontext,oawebbean);
else
oapagecontext.writeDiagnostics(this,"Funds check failed",1);
throw new OAException("Funds Check Failed test123", OAException.ERROR);
cs.close();
catch (Exception ex)
throw new OAException("Error:"+ex.getMessage(),
OAException.ERROR); -
Xsl:output ignored when doing transformation by XMLReader and XMLFilter
I want to make XML transformation via XSL file using XMLReader and filter as described in java tutorial http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/xslt/5_chain.html, but it is not working correctly. Transformation is not using encoding and method set in xslfile by <xsl:output method="xml" encoding="ISO-8859-2"/>.
I wrote simple test program whitch has two method doing transformation:
transform_method1 - transforms by XMLReader and filter
transform_method2 - transforms in other manner described in the same tutorial
The second method is working, but first not. Maybe someone has some solution why the first method is not working correctly?
Here is test class:
package xslt;
import javax.xml.parsers.*;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
import javax.xml.transform.*;
import javax.xml.transform.sax.*;
import javax.xml.transform.stream.*;
import java.io.*;
public class TestTransform {
public static void main(String[] args) {
File xml_file = new File(args[0]);
File xsl_file = new File(args[1]);
File output_file_method1 = new File(args[2]);
File output_file_method2 = new File(args[3]);
transform_method1(xml_file, xsl_file, output_file_method1);
transform_method2(xml_file, xsl_file, output_file_method2);
private static void transform_method1(File xml, File xsl, File output) {
try {
BufferedInputStream bis = new BufferedInputStream(new FileInputStream(xml));
InputSource input = new InputSource(bis);
SAXParserFactory spf = SAXParserFactory.newInstance();
SAXParser parser = spf.newSAXParser();
XMLReader reader = parser.getXMLReader();
SAXTransformerFactory stf = (SAXTransformerFactory) TransformerFactory.newInstance();
XMLFilter filter1 = stf.newXMLFilter(new StreamSource(xsl));
filter1.setParent(reader);
StreamResult result = new StreamResult(output);
Transformer transformer = stf.newTransformer();
SAXSource transformSource = new SAXSource(filter1, input);
System.out.println("encoding method1="+transformer.getOutputProperty(OutputKeys.ENCODING));
transformer.transform(transformSource, result);
} catch (Exception e) {
e.printStackTrace();
private static void transform_method2(File xml, File xsl, File output) {
try {
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer( new StreamSource( xsl) );
System.out.println("encoding method2="+transformer.getOutputProperty(OutputKeys.ENCODING));
transformer.transform(new StreamSource(xml), new StreamResult(output));
} catch (Exception e) {
e.printStackTrace();
}and here is test xml file:
<?xml version="1.0" encoding="ISO-8859-2"?>
<root>
<line>Some text line 1</line>
<line>Some text line 2</line>
<line>Some text line 3</line>
</root>the test stylesheet:
<?xml version="1.0" encoding="ISO-8859-2"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="ISO-8859-2"/>
<xsl:template match="root">
<p><xsl:apply-templates/></p>
</xsl:template>
<xsl:template match="line">
<div><xsl:apply-templates/></div>
</xsl:template>
</xsl:stylesheet>I get output file from method1:
<?xml version="1.0" encoding="UTF-8"?>
Some text line 1
Some text line 2
Some text line 3and method2 output:
<?xml version="1.0" encoding="ISO-8859-2"?>
<p>
<div>Some text line 1</div>
<div>Some text line 2</div>
<div>Some text line 3</div>
</p>Output on System.out from program is:
encoding method1=UTF-8
encoding method2=ISO-8859-2Can someone help how can I make transformation like transform_method1 style not to ignore <xsl:output method="xml" encoding="ISO-8859-2"/> tag?You have two transformations chained together. The first is the XMLFilter, which uses your XSLT, and the second is the Transformer, which takes its output and does an identity transformation on it. The second transformation is the one that produces your final XML, so it's the one that controls what encoding it gets.
So your stylesheet should be working. Your only "problem" is that you get a different encoding than you expected. And I put "problem" in quotes because the output you are getting is identical, in XML terms, to the output you want to get. -
Just want to compare the result of one tag is equal to 'US' then display value of <xsl:value-of select="Amount/Currency/Code" />
else it has to display the value of <xsl:value-of select="Amount/Currency" />
I am trying some thing like this...
<xsl:if test="<xsl:value-of select="Address/2Digit"/> = 'US'>
<xsl:value-of select="Amount/Currency/Code" />
</xsl:if>
if the 2digit country is not US then it has to display the value of the below tag
<xsl:value-of select="Amount/Currency" /><xsl:value-of select="Address/2Digit"/>"2Digit" is not a valid XML name, is it a typo?
Anyway, you can use <tt>xsl:choose</tt> element :
<xsl:choose>
<xsl:when test="Address/Digit='US'">
<xsl:value-of select="Amount/Currency/Code" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="Amount/Currency" />
</xsl:otherwise>
</xsl:choose>
{code} -
Issue with the Transformation in ESB
Hi,
I am using 10.1.3.1 version of JDev. I developed a simple ESB process that uses a Routing service to invoke a BPEL process (Defined as a SOAP service in ESB). When I try to define a transformation that is required to convert ESB's input type to BPEL's input type, the JDev throws an error saying that "Failed to save the xsl" and I cannot do anything with that xsl later. Even when I try to invoke the Routing service from the Web Services Manager in SOA, it throws back a message saying that "No response obtained" where as if I directly invoke the SOAP service, it works fine. Not sure if I am missing any patch here or is there any setting in JDev that I need to enable or do you think I might be doing something wrong?
Please help.
Thanks
RaviHi.
Please check if ll the data is rolled up in the aggregates. Also check the consistency of aggregates from RSRV.
Hope this helps.
Thanks,
Mayuri -
Calling an XSL file in an XSL file
Hi,
I'm importing xsl file into xi and uisng it for mapping.
My query is im using a function in my mapping which is actually present in another xsl file
how can i call the other xsl file in my present xsl file which is the base file for the mappingi'll be a bit more specific
i'm using
xsl mapping
i have 2 map files
nested_flow.xsl is my main map file
and substring_flow.xsl is the map file im calling
<u>nested_floe.xsl:</u>
<?xml version="1.0" encoding="UTF-8" ?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="urn:Testns" xmlns:javamap="java:com.satyam.Javaclass">
<xsl:include href="substring_flow.xsl" />
- <xsl:template match="/">
- <substring_node_input>
- <InputString>
<xsl:value-of select="ns0:nested_node_input/Person/LName" />
</InputString>
</substring_node_input>
- <nested_node_output>
- <Emp>
- <Innitial>
<xsl:value-of select="ns0:substring_node_output/OutputString" />
</Innitial>
</Emp>
</nested_node_output>
</xsl:template>
</xsl:stylesheet>
<u>substring_flow.xsl:</u>
<?xml version="1.0" encoding="UTF-8" ?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="urn:Testns" xmlns:javamap="java:com.satyam.Javaclass">
- <xsl:template match="/">
- <substring_node_output>
- <OutputString>
<xsl:value-of select="substring(ns0:substring_node_input/InputString,0,1)" />
</OutputString>
</substring_node_output>
</xsl:template>
</xsl:stylesheet>
im trying to use the substring function present in the second xsl file in the master xsl
if u can observe the first xsl (nested_flow.xsl)
i included substring_flow.xsl using the xsl:include and and i tried to map the input to this substring function(Person/LName to InputString) and inturn oputput from substring to the output side field (Output string to Emp/Innitial)
but when i test the mapping it throws a Transformer error.
"Transformer configuration exception occurred when loading XSLT"
I'm importing both the map files in a single zip file into xi. and i'm using the master xsl file(nested_flow.xsl) in the interface mapping where it is reqd to specify the mapping.
Message was edited by: Sidharth Velagapudi
Message was edited by: Sidharth Velagapudi -
Not able to use xsl:import in my XSL doc
Hi,
I'm using Oracle 9.2.0.6.0 and DBMS_XSLPROCESSOR to transform my XML.
I build XML using DBMS_XMLDOM methods, build stylesheet using dbms_xslprocessor.newstylesheet,
then try to transform it using DBMS_XSLPROCESSOR.processXSL.
It work fine. But if I add <xsl:import href="new_file.xsl"/> to my original xsl file, then dbms_xslprocessor.newstylesheet
function fails with error:
[1]: (Error): ORA-31011: XML parsing failed ORA-19202: Error occurred in XML processing LPX-00412:
Message 412 not found; product=XDK; facility=LPX ORA-06512: at "XDB.DBMS_XSLPROCESSOR",
line 467 ORA-06512: at "XDB.DBMS_XSLPROCESSOR" ...
Any ideas??
Thanks in advance
FredOne idea. Do you have the namespace for the new_file.xsl defined?
-
Issues user come across while implementing electronic bidding (eRFx) in SAP
Dear All,
I am asked to while a report on eRFX as we are going to implement eRFx soon in our organisation. Please throw some light with your experience on the same. Thanks ! Deepika (0-9940101853)Hi,
As per Note: 2060017 - Change default value of Pcd.BasicRoleFactory.UmAttributesUpdatePolicy to "lazy"
and Configuring PCD Properties - Portal - SAP Library , I have changed the property and restarted..
However issue still persists and its throwing same "PcdInconsistentUpdateException: Transaction cache is outdated for object id " message in default trace..
Best Rgds,
Kiran Sathyan.
Maybe you are looking for
-
How to create a table control from a program internal table
Hi all, I try to create a table control that matches following requirements : - the source table is an internal table from program (not a dictionary table) - I need to specify my own column header titles - the fields need to be editable - some of the
-
hi I have been reading about a Mac mini CPU upgrade from a 1.5Ghz core solo to a 1.83ghz Core 2 duo. I was wondering if I managed to get a CPU for it, would the genius bar at apple store be able to put it in for me as I don't want to take all the mot
-
PSE4 - No thumbnails for .TIF files (Fuzzy TIF problem?)
My PSE4 newly installed on my Win XP. But, I just catalogued the first 100 of my black-and-white photos into the PSE Organizer. These were all a standard format of 4x6" at 300 dpi gray scale files. But, while the .jpg files show thumbnails in the Org
-
Reg: Vendor Account Group Number Range
Hi Guru's, I have created 3 Account groups for vendor - MV- Material Vendor , SV - Service Vendor , Ov - One Time Vendor And i need to number range (external) like this for MV- MV10000 to MV19999 and SV - SV10000 to SV19999 i tried by XKN1 but the
-
Getting errors and LabView with ARM project won't compile
Hello there, I am currently turning to make a project run on a STM32f103C8 chip using LabView with ARM. I am currently trying to compile a ARM project but I have no been successful. I have tried using the STM32F10x template uploaded by Joshua, and it