Remove Special Character in XSLT

Hi All,
Could anyone please help me in removing the special characters  in the XSLT file.
For Example, XSLT tag has like below code,
<Name>
<xsl:valule-of select="Payee/Name"/>
</Name>
where as Payee/name has value of "ORACLE%$ISGREAT".(I can have only A..Z and 0..9, no other than this)
Could any one pls help me.
Regards,
Uva

Which XSLT version are you able to use? 1.0 or 2.0 ?
On 2.0, regular expressions support makes it easy :
<xsl:value-of select="replace(Payee/Name, '[^0-9A-Z]', '')"/>
On 1.0, it's just a bit more complicated, using the double translate trick :
translate($str, translate($str, '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ', ''), '')
which you can turn into a named template for modularity :
  <xsl:template name="sanitize">
    <xsl:param name="str"/>
    <xsl:value-of select="translate($str, translate($str, '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ', ''), '')"/>
  </xsl:template>
and call it like this :
<xsl:call-template name="sanitize">
  <xsl:with-param name="str" select="Payee/Name"/>
</xsl:call-template>

Similar Messages

  • Remove Special Character "/" from file name

    I'm trying to upload a PDF located on my desktop to a server that won't accept special characters, and the mac path is by default ~/desktop/file ... all those forward slashes read as "special characters" and the file is rejected. I moved the file as high as I could, out of the user folder and onto the HD, but it still contains a "/" as the initial character even there.
    How do I get rid of the "/" at the beginning of the file name? Thanks...

    You can't; every location where a file can be placed on a disk available to Mac OS X contains a / in the path. Contact the server's operators or move the file to a computer running another OS.
    (42358)

  • How to remove Special characters in XSLT

    Hi
    I have one issue in XSLT transformation,in my input xml I have the < and > symbols but while in response it is coming as &lt due to this we lose some data . so is there any functions to get the symbols.
    Regards
    Mani

    Hi Eric,
    Thanks for reply,I am able to get the <,>,&etc.. in response by using "disable-output-escaping='yes'" but apos and cap symbols, unable to get in the response,how to get these.
    Regards
    Mani

  • How to remove special characters in a particular column

    Hello,
    i have a csv feed and i load it into a sql table (the sql table has all varchar data type fields)
    feed data looks like (just sampled 2 rows but my file has thousands of like this)
    "K" "AIF" "AMERICAN IND FORCE" "FRI" "EXAMP" "133" "DISPLAY" "505250" "MEDIA INC." 03/01/10" "INV31202" ".00" ".00" "0.00" "ALLO" ;
    "K" "AIF" "AMERICAN IND FORCE" "THU" "TRTH" "123" "MUN MARCH 2010" "505099" "SOCIALTYZE" "03/01/10" "1308" "40,282.32" "40,282.32" "45564.64" "DIS" ;
    some times i got some special characters in my table column (example: in my invoice no column some time i do have # or ! kind of invalid characters ) so how can i remove some kind of special characters in my column
    once it is eliminated then i can write it to new table (with correct data format such as integer)
    could some one please tell me how can i remove special character in a column of particular table
    thanks in advance
    asita

    Removes any characters from
    @myString that do not meet the
    provided criteria.
    CREATE FUNCTION dbo.GetCharacters(@myString varchar(500), @validChars varchar(100))
    RETURNS varchar(500) AS
    BEGIN
    While @myString like '%[^' + @validChars + ']%'
    Select @myString = replace(@myString,substring(@myString,patindex('%[^' + @validChars + ']%',@myString),1),'')
    Return @myString
    END
    Go
    Declare @testStr varchar(1000),
    @i int
    Set @i = 1
    while @i < 255
    Select
    @TestStr = isnull(@TestStr,'') + isnull(char(@i),''),
    @i = @i + 1
    Select @TestStr
    Select dbo.GetCharacters(@TestStr,'a-z')
    Select dbo.GetCharacters(@TestStr,'0-9')
    Select dbo.GetCharacters(@TestStr,'0-9a-z')
    Select dbo.GetCharacters(@TestStr,'02468bferlki')
    perfect soluction

  • How to find and remove any special character in filename?

    I have a files in various Windows Servers 2003 with a special character at his names, who are causing problem with backup software, i don´t know what character is because in explorer they are not shown and in command line they are shown only as interrogation
    mark and for this, i don´t know how i will find and remove then.
    Thanks.

    Hi,
    I agree with Dave. We can try using
    chkdsk utility to check the file system and file system metadata of a volume for logical and physical errors.
    Regarding
    chkdsk, the following article can be referred to for more information.
    Chkdsk
    http://technet.microsoft.com/en-us/library/cc730714.aspx
    Best regards,
    Frank Shen

  • 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,
    Jitender

    hi,
       [Problem in transforming XML to string using XSLT;
    Chk the above link.might solve ur issue.
    Regards.
    Siddhesh Naik

  • To Remove a special character

    Hi All,i am transferring XML file to SAP ,so while doing this i am facing some problem while handling some special character 'micro'. Is there any replacment for micro in SAP?......please tell me..

    Hi Amruta,
    you can encode the string like this.
    encoded_string = cl_http_utility=>escape_html( source_string ).
    Cheers
    Graham

  • Error "TK287" when releasing a request - Special character "_" is invalid.

    I have some tables in Solution Manager and having some warnings:
    Table: CRM_SVY_DB_ST
    Field value:CRM_SVY_GENERATE_BSP_TEMPLATE.XSLT
    Field: TRANSFORMATIONID
    It doesn´t accept the special character "_"
    Below the error when releasing and the explanation of the error in the sequence.
    Key messages: TABU CRM_SVY_DB_ST 300DSWPCI_ISSUE_FDBCK 0000000000DCRM_               
    Special character "_" in generic key                                                                               
    Key messages: TABU CRM_SVY_DB_ST 300DSWPCI_ISSUE_FDBCK 0000000000DCRM_               
    Special character "_" in generic key                                                                               
    Key messages: TABU CRM_SVY_DB_ST 300DSWPCI_ISSUE_FDBCK 0000000000DCRM_               
    Special character "_" in generic key                                                                               
    Key messages: TABU CRM_SVY_DB_ST 300DSWPCI_SERVICE_FDBCK 0000000000DCRM_             
    Special character "_" in generic key                                                                               
    Key messages: TABU CRM_SVY_DB_ST 300DSWPCI_SERVICE_FDBCK 0000000000DCRM_             
    Special character "_" in generic key                                                 
    Explanation of the error:
    Special character "_" in generic key
    Message no. TK287
    Diagnosis
    The generic key 300DSWPCI_ISSUE_FDBCK 0000000000DCRM_ was entered for the object CRM_SVY_DB_ST. All keys that match up to the asterisk are to be transported.
    The key cannot have any special characters before the asterisk, since they are interpreted in different ways by different database systems.
    The key contains the special character _.
    System Response
    The entry is rejected.
    Procedure
    Extend the generic entry, or specify all keys individually.

    Hi,
    Go through SAP note 711103 & 688363.
    Regards,
    Sachin Rane.
    Edited by: Sachin Rane on Mar 12, 2009 2:48 PM

  • How to remove special characters in xml

    Dear friends,
    How to remove the special character  from the xml. I am placing the xml file and  fetching through file adapter.
    The problem is when there is any special character in xml. i am not able to pass to target system smoothly.
    Customer asking schedule the file adapter in order to do that the source xml should not have any special charatcters
    How to acheive this friends,
    Thanx in advance.
    Take care

    Hi Karthik,
    Go throgh the following links how to handle special character
    https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/9420 [original link is broken] [original link is broken] [original link is broken]
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/502991a2-45d9-2910-d99f-8aba5d79fb42
    Restricting special characters in XML within XI..
    Regards
    Goli Sridhar

  • Need to prevent special character in generated XML file

    Hello,
    I am using E-business Suite 12.1.3 and XML version 5.6.3.
    My XML file is ending up with a special character (a Latin capital letter U with circumflex) at the end, after the final closing tag.
    Due to this the concurrent program that needs to output the XML is ending with warning.
    My XML file is produced using a PL/SQL procedure, as follows (I've simplified it):
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<?xml version="1.0" encoding="UTF-8" ?>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<DOCS>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<LETTER>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<EMP_NAME>Michaela Hart</EMP_NAME>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</LETTER>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</DOCS>');
    But when I run the concurrent request that creates the output then try to view the output in Internet Explorer I get the following error:
    Invalid at the top level of the document. Error processing resource 'http://servername.domain...
    </DOCS>
    If I view the source of the page in Internet Explorer it shows a square after </DOCS> indicating the special character that has been added.
    I checked this by looking at the output file in unix (cat -v o7766582.req) and it showed up the Latin U character.
    I realise it could be to do with the character set I am using. I checked what we had on the server:
    > echo $NLS_LANG
    American_America.UTF8
    I would have thought that corresponded with the XML declaration character set but I'm not sure.
    Does anyone have any other ideas about why I have this special character, and how it could be removed?
    Thanks in advance,
    Hazel

    Hi AlexAnd,
    thanks very much for your reply.
    I'm now unable to recreate the problem since dbms_xmlgen worked. If I switch back to my previous method it works fine!
    I'm not sure your suggestion would help, as there were no special characters in the data, the special character was added after the last tag I output. I hard coded the data (as in my example) for testing purposes so there was no SQL in use and the special character was still added at the end of the XML output. But I will definitely give it a try if I get the problem again.
    I had the idea that maybe I should have been using FND_FILE.PUT rather than FND_FILE.PUT_LINE but now the error is gone I can't tell if that would have solved the problem either.
    I appreciate your input.
    Regards
    Hazel

  • How to Eliminate Special Character in SQL LOADER Script

    How to eliminate special character from SQL LOADER script file which suppose not to insert in TABLE
    example.CSV lile like this
    <ABC/ , 7747>
    <DEF/ , 7763>
    <NEW/ , 7779>
    <OLD/, 7795>
    I have to remove < > and / character at the time of loading into table. How It could be done. It is not possible to remove < , > , / character manually from CSV file

    On Unix/Linux that's very easy, on Windows... I don't know...
    $ cat myfile.csv
    <ABC/ , 7747>
    <DEF/ , 7763>
    <NEW/ , 7779>
    <OLD/, 7795>
    $ tr -d "\057\074\076" <myfile.csv >outfile.csv
    $ cat outfile.csv
    ABC , 7747
    DEF , 7763
    NEW , 7779
    OLD, 7795
    $

  • Special character in receiver xml

    Dear All,
    I have a file being moved from SAP to Market end point server. The receiver side is in xml format (no FCC)
    Code page conversion is used - UTF8 TO UTF16LE
    A special character is occurring in the receiver side: [] It is actually new line character and I suupose due to incompatibility it is coming.
    How do we get rid of this character?
    Thanks

    Hi,
    What Kind of mapping do you use? I have explored this behaviour in a XSLT Mapping and i resolved it by using <xsl:strip-space element = "*" />
    Maybe this help?
    Regards,
    Björn

  • Special character in XML causing the file to hit worng folder.

    I am facing program, while sending a data to a repository using SOAP XML. The file path which is needed has a special character and this is not getting identified at the target.
    here is the brief descriptio.
    1) We generate the PDF using the XML report in ERP.
    2) Using the same data, we generate SOAP XML file and send to a respoitory.
    3) Here using this SOAP XML, the PDF is generated and stored in a location which is sent in the file.
    we are sending the target path as "PO's from Customer" as below:
    '&lt;target_folder_path&gt;'||'/Documents/'||TO_CHAR(SYSDATE,'YYYY')||'/PO's from Customer'||'&lt;/target_folder_path&gt;';
    The path needed is '/Documents/2012/PO's from Customer' , but due the apostrophe, the file is hit /adadmin path.
    I have tried replcaing the special character by &apos; , but still no luck. If i remove the special characters, then the file is hitting correct path.
    But the requirement is to have '/Documents/2012/PO's from Customer' .
    Is there is a way this can be achived. Please advice.

    Is it as simple as using two single quotes between PO and s?
    '/PO''s from Customer'I can't tell from what you wrote how you are generating the value in the first place so if not correct provide more details related to whatever builds the path.

  • 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.

  • How to detect any special character ina string?

    Hi!
    I'm having a problem with a string. Basically the string is an output of some function and that may contains some special character which is not shown in the string - for example - chr(10)/chr(13) etc.
    Is there any method or procedure that can detect all the special character inside that string and remove them all other than all the characters and digitis which is in form of character? I'm using oracle 9i.
    Thanks in advance for your reply.
    Regards.
    Satyaki De.

    I've tried your solution - but i don't think it is working --
    satyaki>ed
    Wrote file afiedt.buf
      1  create or replace function extract_printable(vc varchar2)
      2  return varchar2
      3  is
      4  c_non_printable varchar2(33)
      5    := chr(00)||chr(01)||chr(02)||chr(03)||chr(04)||chr(05)||chr(06)||chr(07)||chr(08)||chr(09)
      6    || chr(10)||chr(11)||chr(12)||chr(13)||chr(14)||chr(15)||chr(16)||chr(17)||chr(18)||chr(19)
      7    || chr(20)||chr(21)||chr(22)||chr(23)||chr(24)||chr(25)||chr(26)||chr(27)||chr(28)||chr(29)
      8    || chr(30)||chr(31)||chr(127);
      9  begin
    10    return(translate(vc,'a'||c_non_printable,'a'));
    11* end;
    satyaki>/
    Function created.
    satyaki>
    satyaki>select length(extract_printable('this is        ')) src
      2  from dual;
           SRC
            15
    satyaki>But, thanks for your reply.
    Regards.
    Satyaki De.

Maybe you are looking for

  • Can I add a second drive to a dv7t-7000 quad edition?

    The HP parts store said on one drive was supported but the configuration options showed several configuration with two disks. I had hoped I could add a caddy and power/bus connector from the parts store. I only configured the machine with one drive a

  • MathML vs Indesign CS2, CS3

    Hi developers Anyone give me an idea about MathML into Indesign process. Originally I am trying to create equations when I am importing XML+MathML into Indesign. Is this possible? Your comments are most welcome Thanks in advance regards a r u l

  • DB Link & Repository detail

    Hi, a)i am using oracle 9i warehouse builder. during defining source for oracle, it asks for connection information(source for metadata import). here it gives 2 options: (1) oracle data dictionary (2) oracle designer repository while selecting option

  • Why is Firfox no longer asking me to save any website passwords?

    When I upgraded to Firefox 5.0.1 the feature asking if I wanted passwords saved stopped. Is there a way to reactivate this option because I really liked having the option to save passwords?

  • Header batch no copy to component batch in Process order

    Hi, I have following requirement... we create process orders with COR1 in PP module.. then we assign the batch no to in the goods receipt tab as shown below.. Now when we save the Process order system has to automatically assign the same batch no to