Special character problem in XSLT
When using escaped output charcters like:
< &; > "e; etc, the lt and amp just don't seem to be handled correctly. Result for the above code is:
< & > "Instead of the < and & you would expect, you get the ascii codes.
What do I have to do to get < and & in my output?
null
hi,
[Problem in transforming XML to string using XSLT;
Chk the above link.might solve ur issue.
Regards.
Siddhesh Naik
Similar Messages
-
Xml publisher reprot - special character problem
I invoice report through xml publisher. I have '&' special character in vendor list. I am getting below error
A semi colon character was expected. Error processing resource.
Below is the code
CREATE OR REPLACE PACKAGE BODY XML_RPT AS
FUNCTION XML_TAG (p_tag IN VARCHAR2, p_data IN VARCHAR2) RETURN VARCHAR2 IS
l_ret_str VARCHAR2(5000);
BEGIN
l_ret_str := '<'||p_tag||'>'||p_data||'</'||p_tag||'>';
RETURN l_ret_str;
END XML_TAG;
PROCEDURE VENDOR(errbuf OUT VARCHAR2,
retcode OUT NUMBER) IS
CURSOR inv_Cur IS
select pv.vendor_name
from po_vendors pv;
xmldata varchar2(1000);
l_sqlstr varchar2(1000);
l_seqnum varchar2(3);
l_vendor_name varchar2(100);
BEGIN
xmldata := '<?xml version="1.0" encoding="UTF-8"?>';
xmldata :=xmldata|| '<VENDOR>';
xmldata := xmldata||' <LIST_VENDOR>';
fnd_file.put_line(fnd_file.output,xmldata);
FOR rpt_rec IN inv_Cur LOOP
xmldata := '<VENDOR_REC>';
l_vendor_name := replace(rpt_rec.VENDOR_NAME,'&','&');
xmldata := xmldata || XXMCG_XML_TAG('VENDOR_NAME',L_VENDOR_NAME);
xmldata :=xmldata|| '</VENDOR_REC>';
fnd_file.put_line(fnd_file.output,xmldata);
END LOOP;
xmldata := '</LIST_VENDOR>';
xmldata := xmldata||'</VENDOR>';
fnd_file.put_line(fnd_file.output,xmldata);
EXCEPTION
WHEN OTHERS THEN
fnd_file.put_line(fnd_file.log,substr(SQLERRM,1,500));
END VENDOR;
END XML_RPT;can any one advice.Duplicate post ? xml publisher report problem
Srini -
& special character problem with parseXML() and parseEscapedXML().
Hi,
I'm having a problem to parse messages that has '&' character. According to metalink note 1340195.1 I tried to use parseXML instead of parseEscapedXML, still had same problem. Then added the following scope that replaces "&" with "& a m p ; a m p" (without spaces). Tried to use the java code as mentioned in the metalink note...
<scope name="Replace_spec_char_scope">
<faultHandlers>
<catchAll>
<sequence name="Error_Sequence_9_spec_char">
<assign name="Assign_Error_Message_9">
<copy>
<from expression="ora:getInstanceId()"/>
<to variable="Error_Handler_Invoke_initiate_InputVariable"
part="payload"
query="/ns8:ErrorHandlerProcessRequest/ns8:instanceId"/>
</copy>
<copy>
<from expression="string('XXOGL.B106.001')"/>
<to variable="Error_Handler_Invoke_initiate_InputVariable"
part="payload"
query="/ns8:ErrorHandlerProcessRequest/ns8:errorCode"/>
</copy>
<copy>
<from expression="ora:getProcessId()"/>
<to variable="Error_Handler_Invoke_initiate_InputVariable"
part="payload"
query="/ns8:ErrorHandlerProcessRequest/ns8:process"/>
</copy>
<copy>
<from expression="string('Receive_Kund')"/>
<to variable="Error_Handler_Invoke_initiate_InputVariable"
part="payload"
query="/ns8:ErrorHandlerProcessRequest/ns8:activity"/>
</copy>
<copy>
<from expression="ora:getFaultAsString()"/>
<to variable="Error_Handler_Invoke_initiate_InputVariable"
part="payload"
query="/ns8:ErrorHandlerProcessRequest/ns8:errorPayload"/>
</copy>
<copy>
<from expression="bpws:getVariableData('Receive_Kund_Dequeue_InputVariable','Message','/ns6:Message/Kund')"/>
<to variable="Error_Handler_Invoke_initiate_InputVariable"
part="payload"
query="/ns8:ErrorHandlerProcessRequest/ns8:inputPayload"/>
</copy>
</assign>
<bpelx:exec name="Log_Error_9" language="java" version="1.5">
<![CDATA[OGLLogger logger = new OGLLogger("B106.bpel");
try{
Element errorDetails= (Element)getVariableData("Error_Handler_Invoke_initiate_InputVariable","payload","/ns8:ErrorHandlerProcessRequest/ns8:errorPayload");
logger.error("XXOGL.B106.001","InstanceID: "+getInstanceId()+" Error details: "+errorDetails.getFirstChild().getNodeValue());
}catch(BPELFault e){
addAuditTrailEntry(e);
logger.fatal("Failed to log error details for message XXOGL.B106.001",e);
}]]>
</bpelx:exec>
<terminate name="Terminate_1"/>
</sequence>
</catchAll>
</faultHandlers>
<bpelx:exec name="Replace_spec_char" language="java" version="1.5">
<![CDATA[java.lang.String temp = (String) getVariableData("Receive_Kund_Dequeue_InputVariable");
OGLLogger logger = new OGLLogger("B106.bpel");
try{
temp = temp.replaceAll("&", "&amp");
setVariableData("Receive_Kund_Dequeue_InputVariable", temp);
}catch(BPELFault e){
addAuditTrailEntry(e);
logger.fatal("Failed to replace special character ",e);
}]]>
</bpelx:exec>
</scope>Now getting this error.
<scope name="Replace_spec_char_scope">
Replace_spec_char(faulted)
[2012/05/18 11:16:28] "{http://schemas.oracle.com/bpel/extension}runtimeFault" has been thrown. less
-<runtimeFault xmlns="http://schemas.oracle.com/bpel/extension">
-<part name="code">
<code>java.lang.ClassCastException
</code>
</part>
-<part name="summary">
<summary>com.collaxa.cube.engine.types.bpel.CXMessageVariable
</summary>
</part>
-<part name="detail">
<detail>
java.lang.ClassCastException: com.collaxa.cube.engine.types.bpel.CXMessageVariable
at bpel.xxogl_b106_kundinterface.ExecLetBxExe5.execute(ExecLetBxExe5.java:197)
at com.collaxa.cube.engine.ext.wmp.BPELXExecWMP.__executeStatements(BPELXExecWMP.java:50)
at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:200)
at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:4174)
at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1680)
at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75)
at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:238)
at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:335)
at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:6285)
at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1111)
at com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke(DeliveryService.java:650)
at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(CubeDeliveryBean.java:381)
at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:31)
at com.evermind.server.ThreadState.runAs(ThreadState.java:705)
at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
at CubeDeliveryBean_LocalProxy_4bin6i8.handleInvoke(Unknown Source)
at com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessageHandler.handle(InvokeInstanceMessageHandler.java:37)
at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:148)
at com.collaxa.cube.engine.dispatch.BaseDispatchTask.run(BaseDispatchTask.java:58)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
</detail>
</part>
</runtimeFault>
<catchAll>
<sequence>
Assign_Error_Message_9
[2012/05/18 11:16:28] Updated variable "Error_Handler_Invoke_initiate_InputVariable" More...
[2012/05/18 11:16:28] Updated variable "Error_Handler_Invoke_initiate_InputVariable" More...
[2012/05/18 11:16:28] Updated variable "Error_Handler_Invoke_initiate_InputVariable" More...
[2012/05/18 11:16:28] Updated variable "Error_Handler_Invoke_initiate_InputVariable" More...
[2012/05/18 11:16:28] Updated variable "Error_Handler_Invoke_initiate_InputVariable" More...
[2012/05/18 11:16:28] Updated variable "Error_Handler_Invoke_initiate_InputVariable" More...
Log_Error_9
[2012/05/18 11:16:28] bpelx:exec executed
Terminate_1
[2012/05/18 11:16:28] Instance terminated. Don't really understand what's wrong... Am I doing it incorrectly? Can anybody pls help!!
Thanks in advance.
LisanTry to use parameters instead hardcoding values in the queries:
select * from user where lower(username)=?;
and don't forget to lower the value from java side as well ;-) -
Special Character Problem In MS Excel
Hi All,
I have a field like Ship to Name and value of that field is 'Fire Systems US - Northford ' .When we download this field into Microsoft excel we are getting like Fire Systems US âu20ACu201C Northford . Hear special character (âu20ACu201C) is updating insted of Hypen(-).
How can we download the the same ship to name with out any special character in Microsoft excel.
Please help me.
Thanks,
VenkatHi Venkat,
If you can verify that whether the special character is from SAP or excel. This you need to verify by de-bugging in SAP and then by opening the downloaded file in notepad.
Please refer the link below for details:
Link: [Re: FM: GUI_DOWNLOAD not picking initial zero]
Regards,
Pranav. -
SAX Parser and special character problem
Hi,
Could anyone help with the following problem?
Background:
1. Using a SAX Parser (Oracle Implementation) to read XML from a CLOB, convert this XML to another format to be inserted in the database.
2. Due to performance issues we parse the input stream from the CLOB.
3. For same reason, we are not using XSL.
This is the problem we face:
1. Values of some of the tags in the XML have special characters (Ex: &, <, >).
2. While using the SAX Parser, the element handler function for the SAX Parser is called by the frame work with the value of these tags broken up with each of these characters being treated as a tag delimiter.
Ex: <Description>SomeText_A & SomeText_B</Description>
is treated as SomeText_A in first call to the handler; SomeText_B in the second call.
The handler function does not get to see the "&" character.
Thus, the final conversion is
Say, <Description> is to be converted to <FreeText>
we, get <FreeText>SomeText_A</FreeText>
<FreeText>SomeText_B</FreeText>
We tried using &; but it then breaks it up into SomeText_A, & and SomeText_B.
How can we get the whole value for the <Description> tag in the characters() function in the SAXParser so that we can convert it to <FreeText>SomeText_A & SomeText_B</FreeText>.
Thanks in advance..
Chirdeep.We already tried that..looks like the line where I mentioned that it converted the entity referece characters to an ampersand..
"We tried using <entity reference for &> but it then breaks it up into SomeText_A, & and SomeText_B."
null -
INVOIC96a to EDI-XML by Conversion Agent fails, Special Character Problem
Hi,
with your help in another thread, I recognized that the EDIFACT INVIOC96a Parser of the Itemfield Conversion Agent has a Problem with special characters.
So like described in this blog SAP XI supports EDIFACT i created a Library Project and tried to test the conversion.
It is only working when no special characters are in the EDI file. If there a special characters insight the file, conversion agent say's no error, but the xml file is corrupted. In fact you can't display it in IE or by opening it with XMLPad it says "Not well formed".
Hope that someone has an idea for this problem
Thank you
regardsHi,
I have already faced the same problem when using Itemfield Conversion Agent.
I solved the same with change properties of the project.
In conversion agent project :
opne the menu : Project --> Properties --> Encoding --> Change the output Encoding Schema (None).
use None in that schema in place of XML.
Your problem can be solved.
Regards,
Sandeep Kaushik -
HTTP Test Tool Umlaut (Special Character) Problem iso-8859-1 utf-8
Hi folks,
I habe a Problem in an HTTP to IDOC Scenario. The configuration works and when I test it, by using the Test Message Tool from the Runtime Workbench i get the following problem:
I post an IDOC XML Charset iso-8859-1 when it arrive as IDoc in business system german umlauts would be displayd very cryptic
ä = ä
ü = ü
and so on ....
When I post the XML with UTF-8 charset it works, what can i do to handle this ?
Thank youHi,
maybe this document is helpful:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/502991a2-45d9-2910-d99f-8aba5d79fb42
and also this thread:
Character translation error in Mapping Lookup API (RFC)
Regards
Patrick -
Error in XSLT Mapping when special character is passed through
Hi Experts,
We have used the XSLT mapping. When ever any special character like é is being passed, then the below mentioned error is displayed in the Integration engine.
Error occurred during XSLT mapping of the application
It is working fine with normal case if we are not sending any special character.
I am not sure whether the problem exists in XSLT mapping or the issue with the legacy system?
Early response would be highly appreciated and points will be awarded.
Thanks in Advance,
Jitenderhi,
[Problem in transforming XML to string using XSLT;
Chk the above link.might solve ur issue.
Regards.
Siddhesh Naik -
Request.getParameter(): special character handling problem
Hello, there:
This should be an easy question for the gurus in here.
I use a string attached to the url as the parameter string, which includes spaces. the system automatically converts them to %20, but when I receive them in my servlet using request.getParameter, a special character, Â appears; I couldn't proceed with it.
I suppose this is a common problem but seems that I didn't find topics about it on this forum.
So anyone can help? Any encoder/decoder APIs to handle it?
Thanks a lot,
Swayhi,
escape can solve ur problem
use js function to submit form like
function subForm()
var any_spcl_value ="kdfhjdf$%@#$% 2FGSFG @%@#%@# V";
mainForm.action = "index.jsp?value="+ escape(any_spcl_value);
mainForm.submit();
and use request.getParameter("value");
u ll get kdfhjdf$%@#$% 2FGSFG @%@#%@# V as it is.
AE -
Problem with special Character & in Proxy
Hi,
We have a File --> XI --> R/3 Scenario. In this scenario, from XI we are passing the data to R/3 by calling the Proxy. When the data in the file has special character like & (for example <Companyname>Dave&Busters</Companyname>), it is failing in R/3. But if I replace "&" with "&" in the file it works fine. Is there any solution to this problem without writting custom code in XI to replace & with &.
Thanks
Sudheer>But if I replace "&" with "&" in
> the file it works fine. Is there any solution to this
> problem without writting custom code in XI to replace
> & with &.
No. If the sender of the message provides an XML format with an unescaped &, then the XML is not valid and therefore cannot be processed.
All adapters (IDOC, RFC, File with content conversion) perform the escaping and deescaping.
Regards
Stefan -
ALV Excel Download problem ( Special Character)
Hi,
I am unable to download completely in XLS format from ALV grid. When i tried in couple of ways there is a special character( " ) in one of the filed. Due to the same Excel download has some problem. I tested by removing those and it worked fine,
Please suggest me to solve the issue.
Thanks,
Bhanu Gattu,Data strings with special characters can not be downloaded into XLS format from ALV grid. In my case, I replaced the special character " with space and I could download the data into excel.
-
Problem about printing special character in bex query analyzer
Hi,
in bex query analyzer i have created one restricted key figure , in which i have substracted two date with the help of replacement path.
So i got result.
But i am facing one problem. when in both date, if one date is null or # then it is giving some big value like -734567.
But i want some special character like X instead of this big values.
So how can i do this?
With the help of if and else it can be done.
But how can we print special character in report.
Please help me
Thank you in advancehi,
You cannot show X in a formula result. You can highlight the row using exception.
Still if you want to show X in the result then you need to create a formula variable on a char which returns X value all the times.
Then you can use the three formula variable to write a formula so that it shows the difference:
date1 -- formula variable
date2 -- formula variable
charx -- formula variable.
the formula will be
Count(date1)Count(date2)(date1 - date2) + charx *(count (delta(date1) + delta(date2))).
this would return the X value if any of the dates are empty otherwise their difference.
regards.
Arvind. -
Problem in Smartform convert to PDF with special character
Hi ABAP Guru,
While convert smartforms to pdf.Some special character like ( - ) convert to ( # ).In development server there is no problem but the problem arise in quality.Please helpHi Palash,
Please use PDF! in print preview command field.. it will convert pdf file.
regards,
Thangam.P -
Problem in dealing with special-character filename
Hi,
I am facing a weird problem while dealing with a file which has a special character in its name. That character is the big-hyphen, i.e. '' (not the normal hyphen we can type from keyboard), you would have seen this character in MS Word.
My java program is running on HP-UX OS, and its basically trying to copy this file to a Windows target system through socket. But while executing it, I am getting Broken Pipe Exception.
I am applying UTF-8 encoding while running my program (by specifying the argument "-Dfile.encoding=UTF-8" in the java process), and I am also confirming that the file-encoding is being applied to UTF-8 properly by putting a debug in the beginning of the program. My understanding is UTF-8 supports all the characters exist in this world.
Any suggestion / pointers would be really appreciated.
Thanks,
RajivFine..... but is there any way to know which encoding has been applied on it ..
Let's say if you create any file on unix-based system in any application, which encoding gets applied there by default ?
This file is basically nothing but an html page created using 'Save As' from the browser.
The person who has created the file is a non-technical .. and won't know much about this all stuff... encoding etc. -
Problem with the special character '&'
Hi,
I am facing problem with special character '&' in report files. When I run the report locally(report builder), i am getting the data printed with '&' correctly. But if I execute same report thr' the application, via application server, I am getting the data printed with "&:". It is not displaying &. Please suggest me how to overcome this problem.
'ADP & Liablility' is printed as 'ADP &: Liablility' in the web. We are not sending any value thr' the url. This is just a report title. Taking the value from the database and printing it.
Appreciate the quick response.
Thanks and Regards,
A.K.MalathiModerator: Off topic. This forum is for Java Collections API questions. Locking.
Maybe you are looking for
-
I want to execute [b]some shell [/b]commands in a java program
Hello, I would like to know if it's possible to execute some unix commands in the same "environment"... I mean, if I use the exec() function to execute the "cd /tmp" command, and after that, if I want to do "ls" , I'm not in the "/tmp" directory, kno
-
Xp networking problems on mbp c2d
i don't know if this problem should be addressed under the mbp forum or boot camp forum so i'll post in both to get the most input. i'm having a problem connecting to my home wireless network under bootcamp. i installed xp sp2 as well as the driver c
-
Hi, All Experts. I want to what is clearing rule in FI ( OBIA & OBIB )? In mysystem OBIA is blank but in OBIB it is showing in Account Type K and clearing Rule is CH where it is not define in OBIA. So from where it come exactly ? I am facing one prob
-
10g BC4J bug in alias query column
something strange ... i created some view's in expert mode and gave the result set aliases to replace the expression used in the select clause (select expression "Alias" from ...). The alias was mixedcase like in the parenthesis. After creating two v
-
All, I was wondering how do we delete Authorization generated by Profile generation Program in 3.5. I have read from help Sap.com that I should do the following If a data record with the user name 'D_E_L_E_T_E' is loaded into the DataStore objec