XSLT transformation in XML to ABAP: special characters issue

Hi,
I am parsing well-formed XML file that has the following data (:
<projects><project><name>Wallis &amp; Futuna</name></project></projects>
I use XSLT transformation:
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
<xsl:strip-space elements="*"/>
<xsl:template match="projects">
    <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
        <PROJECTS>
          <xsl:for-each select="project">
            <PROJECT>
              <NAME>
                <xsl:value-of select="name"/>
              </NAME>
            </PROJECT>
          </xsl:for-each>
        </PROJECTS>
      </asx:values>
    </asx:abap>
  </xsl:template>
</xsl:transform>
If I use the above example without &amp;amp; everything works fine, but the original XML fails with exception CX_XSLT_DESERIALIZATION_ERROR and message "Error during deserialization". Googling around did not give an answer.
Any words of wisdom?
Edited by: Alexei Isaev on Apr 26, 2011 5:04 AM
Edited by: Alexei Isaev on Apr 26, 2011 5:05 AM

Hi,
Please visit the following link for reference.
http://help.sap.com/abapdocu_70/en/ABAPCALL_TRANSFORMATION.htm
Thanks & Regards,
Harish

Similar Messages

  • XSLT transformation for XML to ABAP internal table

    Hi, can anyone please tell me how it should be the xslt tranformation to conver this xml
    <Embargos_ARBA_DOC>
         <ns:Embargos_ARBA_MT
              xmlns:ns="un:swissmedical:sap:proxy:embargos_arba:file">
              <Embargos_ARBA_MT>
                   <FECHA>20081101</FECHA>
                   <CUIT>50000002124</CUIT>
                   <MONTO>0000013794090</MONTO>
                   <RAZON_SOCIAL>RAUL ARMANDO CUNQUEIRO S.A.C.I.</RAZON_SOCIAL>
              </Embargos_ARBA_MT>
              <Embargos_ARBA_MT>
                   <FECHA>20081101</FECHA>
                   <CUIT>55000001456</CUIT>
                   <MONTO>0000001144410</MONTO>
                   <RAZON_SOCIAL>PARODI ESTEBAN ARMANDO</RAZON_SOCIAL>
              </Embargos_ARBA_MT>
         </ns:Embargos_ARBA_MT>
    </Embargos_ARBA_DOC>
    to this abap Table....
      DATA: BEGIN OF i_embargos_arba_doc occurs 0,
              fecha TYPE d,
              cuit TYPE char11,
              monto TYPE char13,
              razon_social(120),
            END OF i_embargos_arba_mt.
    so i can transform it with this sentence
          CALL TRANSFORMATION ('embargos_transformation')
            SOURCE XML source
            RESULT Embargos_ARBA_DOC = embargos.
    pls i need help because i am unable to create this xslt transformation...
    I will give the highest rewards points to the one who can help me.
    thanks!
    mariano

    Hi Mariano
    Why you need to use XSLT for transforming XML file into ABAP table
    Code is a part of some ABAP report. Looks like it is reading a file from file system and updating table after transformation
    If you have requirement like you need to read XML file and then insert the data into a SAP table
    You can use
    File to RFC
    File to Proxy scenario using SAP PI.
    Please provide more inputs on requirement to help
    Thanks
    Gaurav

  • XSLT Transformation from XML to ABAP  field

    Hi all,
    How can I retrieve my XML node's value (EMPLOYEE) XML to an ABAP variable (W_KUNNR)
      DATA w_kunnr TYPE string.
      CONCATENATE
        '<services>'
        '<Myservice>'
        '<APPLICATION>APPLI1</APPLICATION>'
        '<SERVICE>SERV1</SERVICE>'
        '<TOSAP>'
        '<EMPLOYEE>00000036</EMPLOYEE>'
        '</TOSAP>'
        '</Myservice>'
        '</services>'
      INTO request.
      CALL TRANSFORMATION z_trans
      SOURCE XML request
      RESULT kunnr = w_kunnr.
    thanks.
    Edited by: Noureddine MOUTAA on Oct 28, 2008 2:25 PM

    I did like this:
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      <xsl:output encoding="iso-8859-1" indent="yes" method="xml" version="1.0"/>
      <xsl:strip-space elements="*"/>
      <xsl:template match="/">
        <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <KUNNR>
              <xsl:value-of select="//services/Myservice/TOSAP/EMPLOYEE"/>
            </KUNNR>
          </asx:values>
        </asx:abap>
      </xsl:template>
    </xsl:transform>

  • BI Admin Tool and XSLT transformation for XML data source - How it works ?

    Hello,
    There is a possibility to import data from XML data source using BI Admin Tool.
    In the import window we can point XSLT file. What is the purpose of that XSLT field?
    Why I am asking ?
    I thought it is smth like XSLT processor, but simply it doesnt work.
    What I did:
    - I pointed XML data source file
    - I pointed XSLT transformation file
    - Click OK, and still get the message that the XML file structure is not supported
    After that I transformed that XML file with some desktop XSLT processor using the same XSLT file, and I tried to connect that file directly using BI Admin tool.Then it works. So it means that the transformation is ok.
    So basically one question comes to my mind in that situation:
    What is the purpose of XSLT field in BI Admin Tool when it comes to XML data source ?
    (it doesnt look like XSLT processor)
    Greetings
    /Michal

    Hi Mariano
    Why you need to use XSLT for transforming XML file into ABAP table
    Code is a part of some ABAP report. Looks like it is reading a file from file system and updating table after transformation
    If you have requirement like you need to read XML file and then insert the data into a SAP table
    You can use
    File to RFC
    File to Proxy scenario using SAP PI.
    Please provide more inputs on requirement to help
    Thanks
    Gaurav

  • Using XSLT to link XML and ABAP data

    Hi Experts,
    I am using XSLT to deal with XML and ABAP data.
    I using the following statement to convert a Internal Table to XML String:
    CALL TRANSFORMATION id SOURCE  root = lt_sflight RESULT XML l_xml_string.
    And I get the XML String:
    <?xml version="1.0" encoding="utf-16" ?>
    <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
    <asx:values>
    <ROOT>
    <SFLIGHT>
    </SFLIGHT>
    <SFLIGHT>
    </SFLIGHT>
    </ROOT>
    </asx:values>
    </asx:abap>
    But What I expected is:
    <?xml version="1.0" encoding="utf-16" ?>
    <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
    <asx:values>
    <ROOT>
    <DATA>
    </DATA>
    <DATA>
    </DATA>
    </ROOT>
    </asx:values>
    </asx:abap>
    Could you tell me how to get my dream format using XSLT?
    Best Regards,
    Guo Guo Qing
    Edited by: guoqing guo on Jun 11, 2008 9:58 AM

    Hi Experts,
    I am using XSLT to deal with XML and ABAP data.
    I using the following statement to convert a Internal Table to XML String:
    CALL TRANSFORMATION id SOURCE  root = lt_sflight RESULT XML l_xml_string.
    And I get the XML String:
    <?xml version="1.0" encoding="utf-16" ?>
    <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
    <asx:values>
    <ROOT>
    <SFLIGHT>
    </SFLIGHT>
    <SFLIGHT>
    </SFLIGHT>
    </ROOT>
    </asx:values>
    </asx:abap>
    But What I expected is:
    <?xml version="1.0" encoding="utf-16" ?>
    <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
    <asx:values>
    <ROOT>
    <DATA>
    </DATA>
    <DATA>
    </DATA>
    </ROOT>
    </asx:values>
    </asx:abap>
    Could you tell me how to get my dream format using XSLT?
    Best Regards,
    Guo Guo Qing
    Edited by: guoqing guo on Jun 11, 2008 9:58 AM

  • FindNode returning Null And XML Not Accepting Special Characters

    Hi All,
    i am trying the get the attribute value in the element "ns4:InfoCFDi" using FindNode method, but the method is returning NULL. I used the same code for other sample as well and was successfull. but for this specific XML file(which is below) I am getting a Null.
    i can get till S:Body, but when i try to use FindNode for ":Body/s4:ResponseGeneraCFDi" I get Null value.
    And I used "S:Body/*[local-name()=" | "ns4:ResponseGeneraCFDi" | "]";
    as mentioned in other post but still no success.
    ==>I Have one more question relating to special characters. I need to use characters such as - ó in my XML to read as well as write. When I try to read i am getting XML parse error and when writing, i cannot open the file properly.
    Your help is much appreciated.
    My code is here:
    Local XmlDoc &inXMLDoc, &reqxmldoc;
    Local XmlNode &RecordNode;
    &inXMLDoc = CreateXmlDoc();
    &ret = &inXMLDoc.ParseXmlFromURL("D:\Agnel\Mexico Debit Memo\REALRESPONSE.xml");
    If &ret Then
    &RecordNode = &inXMLDoc.DocumentElement.FindNode("" );
    If &RecordNode.IsNull Then
    Warning MsgGet(0, 0, "Agnel FindNode not found.");
    rem MessageBox(0, "", 0, 0, "FindNode not found");
    Else
    &qrValue = &RecordNode.GetAttributeValue("asignaFolio ");
    Warning MsgGet(0, 0, "asignaFolio." | &qrValue);
    End-If;
    Else
    Warning MsgGet(0, 0, "Error. ParseXmlString");
    End-If;
    XML File:
    - <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    - <S:Body>
    - <ns4:ResponseGeneraCFDi xmlns="http://www.xxl.com/ns/xsd/bf/rxx/52" xmlns:ns2="http://www.sat.gob.mx/cfd/3" xmlns:ns3="http://www.xx/ns/bf/conector/1&quo t; xmlns:ns4="http://www.xx/ns/xsd/bfxx/xx/32&qu ot; xmlns:ns5="http://www.xxcom/ns/xsd/bf/xxxxx&q uot; xmlns:ns6="http://wwwxx.com/ns/referenceID/v1">
    - <ns3:Result version="1">
    <ns3:Message message="Proceso realizado con exito." code="0" />
    </ns3:Result>
    - <ns4:InfoCFDi noCertificadoSAT="20001000000100003992" refId="STORFAC20121022085611" fechaTimbrado="2012-10-22T08:56:45" qr=" "
    uuid="a37a7d92-a17e-49f4-8e4d-51c983587acb" version="3.2" tipo="XML" archivo="xxx" sello="B8WjuhYLouSZJ6LU2EjxZ0a4IKyIENZNBx4Lb4 jkcAk6wA+EM477yz91/iDdsON0jm8xibBfom5hvHsH7ZK1ps3NnAXWr1LW 7ctmGsvYKAMvkCx/yOVzJTKFM2hN+OqCTE0WVfgv690vVy2CDQWKlMxbK+3idwG4t OKCMelrN9c=" fecha="2012-10-22T08:56:44" folio="281" serie="IICC">
    <InfoEspecial valor="Este documento es una representacin impresa de un CFDI." atributo="leyendaImpresion" />
    <InfoEspecial valor="||1.0|a37a7d92-a17e-49f4-8e4d-51c983587acb|2012-10-22T08:56:45|B8WjuhYLouSZJ6LU2EjxZ0a4IKyIENZNBx4Lb4 jkcAk6wA+EM477yz91/iDdsON0jm8xibBfom5hvHsH7ZK1ps3NnAXWr1LW 7ctmGsvYKAMvkCx/yOVzJTKFM2hN+OqCTE0WVfgv690vVy2CDQWKlMxbK+3idwG4t OKCMelrN9c=|20001000000100003992||" atributo="cadenaOriginal" />
    <InfoEspecial valor="Doscientos dieciocho mil cuatrocientos setenta y cinco pesos 00/100 M.N." atributo="totalConLetra" />
    </ns4:InfoCFDi>
    </ns4:ResponseGeneraCFDi>
    </S:Body>
    </S:Envelope>
    TIA

    First of all you have to supply a value you want to search for and this has to be the complete path to the value. You're saying you already tried that, but can you paste the code which you used for that? I don't see the path mentioned in the code you posted.
    *FindNode*
    Syntax
    FindNode(Path)
    Description
    Use the FindNode method to return a reference to an XmlNode.
    The path is specified as the list of tag names, to the node that you want to find, each separated by a slash (/).
    Parameters
    Path
    Specify the tag names up to and including the name of the node that you want returned, starting with a slash and each separated by a slash (/). This is known as the XPath query language.>
    Another option would be this snippet of code:
    &InfoCFDiArray = GetElementsByTagName("ns4:InfoCFDi");
    &InfoCFDiNode = &InfoCFDiArray [1];
    &attValue = &InfoCFDiNode.GetAttributeValue("noCertificadoSAT")
    Warning(&attValue);
    It creates an array of XML Nodes which match the name "ns4:InfoCFDi". Since there's only one in the XML it's safe to assume it will be the one and only node in the array. I've assigned that node to the variable &InfoCFDiNode and use that to retrieve the attribute "noCertificadoSAT" value. The warning message should display the value supplied there.
    Concering the special characters; you will have to change the encoding of the XML. Peoplecode sets this to UTF-8 by default, but doesn't include this in the header. There's a little hack for that somewhere on the web, I'll see if I can find it.

  • Special characters issue in output XML - file adapter  - SOA 10.1.3.4

    Hi,
    I use a DB adapter and File adapter to retreive data from database and create output XML file.
    For the database record which have special characters (for example ' , <, >), it will just output the same character in XML file, which cause other system to reject this XML file because of those characters.
    Anyone have this issue ? How can i resolve that ?
    Thanks

    Try converting the characters to &lt; and &gt;. This should work. Make sure the stand-alone & character is converted to & amp; (written with space as HTML will convert it back to &).
    -AR

  • File Adapter write XML file with special characters

    Hi,
    I have a BPEL processes which use DB adapter to retrieve record and output in a XML document using File Adapter.
    In the table, some records contain these special characters - ">" , "<" , "." . I was expecting the file adapter will convert it to escape characters, but it didn't happen. it just put the same value back to the XML file, which cause other system to reject the file. Do anyone know how to resolve this ?
    The version of SOA is 10.1.3.4
    Thanks for the help.
    Calvin
    Edited by: user12018221 on May 25, 2011 1:48 PM

    one option is to specify validateXML on the partnerlink (that describes the file adapter endpoint) such as shown here
    <partnerLinkBinding name="StarLoanService">
    <property name="wsdlLocation"> http://<hostname>:9700/orabpel/default/StarLoan/StarLoan?wsdl</property>
    <property name="validateXML">true</property>
    </partnerLinkBinding>
    hth clemens

  • Creating xml and converting special characters

    I am trying to creating an xml representation of some data. I have created various methods for creating the various parts of the structure.
    But is there an easy way to transform invalid xml characters to the xml representations (such as converting to a particular charset) e.g & -> amp;
    public class XMLTagDisplayFormatter extends AbstractTagDisplayFormatter
        private static XMLTagDisplayFormatter formatter;
        protected static final String xmlOpenStart = "<";
        protected static final String xmlOpenEnd = ">";
        protected static final String xmlCloseStart = "</";
        protected static final String xmlCloseEnd = ">";
        protected static final String xmlSingleTagClose = " />";
        protected static final String xmlSingleDataTagClose = "]] />";
        /** Return xml open tag round a string e.g <tag> */
        public static String xmlOpen(String xmlName)
            return xmlOpenStart + xmlName + xmlOpenEnd;
        public static String xmlOpenHeading(String name,String data)
            return(xmlOpen(name+" id=\""+data+"\""));
        /** Return xml close tag around a string e.g </tag> */
        public static String xmlClose(String xmlName)
            return xmlCloseStart + xmlName + xmlCloseEnd;
        public static String xmlSingleTag(String data)
           return xmlOpenStart + data + xmlSingleTagClose;
       public static String xmlFullTag(String xmlName,String data)
           return     xmlOpen(xmlName)
                   +  data
                   +  xmlClose(xmlName);
        StringBuffer sb = new StringBuffer();
        public void   openHeadingElement(String type,String value)
             if(value.equals(""))
                 sb.append(xmlOpen(type));
             else
                 sb.append(xmlOpenHeading(type,replaceXMLCharacters(value)));
        public void   openHeadingElement(String type,boolean value)
          openHeadingElement(type,String.valueOf(value));
       public void   openHeadingElement(String type,int value)
            openHeadingElement(type,String.valueOf(value));
        public void   closeHeadingElement(String type)
            sb.append(xmlClose(type));
        public void addElement(String type, String value)
            sb.append(xmlFullTag(type,replaceXMLCharacters(value)));
        public void addElement(String type, int value)
            addElement(type,String.valueOf(value));
        public void addElement(String type, boolean value)
            addElement(type,String.valueOf(value));
        public String toString()
            return sb.toString();
        public AbstractTagDisplayFormatter getInstanceOf()
            if (formatter == null)
                formatter = new XMLTagDisplayFormatter();
            return formatter;
    }

    Thanks,
    Ive written this method which seems to work for me although Im only using it for debugging.
    public static String xmlCData(String xmlData)
            char tempChar;
            StringBuffer replacedString = new StringBuffer();
            for(int i=0;i<xmlData.length();i++)
               tempChar = xmlData.charAt(i);
               if(
                   (Character.isLetterOrDigit(tempChar)==true)
                   ||
                   (Character.isSpaceChar(tempChar)==true)
                   replacedString.append(tempChar);
               else
                   replacedString.append("#x"+Character.digit(tempChar,16));
             return xmlCDataTagOpen + replacedString + xmlCDataTagClose;
        }

  • Special Characters issue---u00FA ,u00A3---- in Reciver SOAP Adapter

    Hi ,
    I am facing issues with Spceial Characters ú ,£ at the reciver SOAP adapter  ,the messages was stuk in XI with to the following error :An invalid character was found in text content. Error processing resource
    I tried in several ways buy using XMBWS.XMLEncoding=iso-8859-1,
    but it was not resloved still I am getting the same error,
    Any one plz suggest me how to resolve this issue....
    Regards,
    Teja.

    Hi ,
    My scenario is RFC--SOAP ,the messages was successfully rached to RFC adapter and I am facing the issue at the receiver SOAP Adapter ......
    I am getting error messages such as :
    1) 400 Bad Request
    2) In the XML Payload ......It is showing as Invalid Character found ....
    For this I tried ...
    1) In the source payload XML I done the  chages in the encodding part
    encoding part as iso-8859-1instead of utf-8.
    2) I have triggered the message from Integration Engine ....then it was successfully processed through SOAP Adapter
    3) with special characters...means there is no issue at target end.
    4) the issue lies in XI so we have to resolve it.
    I tried by using Adapter paramters  which was provided by SAP but the result is same..
    so the paramters which was provided by SAP are incorrect(for encoding)
    Please help me in resolving this issue .........
    Regards,
    Teja.

  • Special Characters issue in JAXB Classes generated

    Hi,
    I have generated Java bean classes from an xml schema using JAXB 2.0 Content Model feature in Jdeveloper 11g. I have another class, which has a method testMethod which takes the Java Bean class object as input. I have exposed this method as java webservice. I am just printing the FirstName from the input I have got.
    public String testMethod(TestBean testbean) {
    testBean,getContact().getFirstName();
    When there are some special characters like �, my java bean accepts and displays as �. I printed the value directly in my getter method, but it prints differently.
    How can I set my Java Bean class to use ISO-8859-1 as encoding.

    Sorry but this has nothing to do with ADF. Please try in the right forum here https://forums.oracle.com/forums/category.jspa?categoryID=285

  • Special Characters Issue

    Hi,
    I am trying to load text data from a flat file which has some special characters in the text description like ö ø æ ü å. I have entered this in RSKC. Now when I look in the preview these characters are replaced by this symbol #. Can you help me out in figuring out what I am doing wrong and if there is anything I should be doing. I have loaded the same data in North America BW instance and it works fine. Now when I do the same in Europe system it is giving me the above error.Europe is on a unicode system whereas North America is not. May be if this helps.
    Thanks,
    Kal

    Hi Kal,
    Checkout the link below,
    RSKC
    Regards
    Sajeed

  • Special Characters issue in DEV and QAS

    Hi,
    I am uploading a file that has special characters (Japanese).
    In the DEV system the special character is converted to #. Which the business wants.
    In QAS system the special character is not converted and is as it is, which makes the business users difficult to find out if any speical characters are there and they don't want the special character as it is
    The file consists millions of record with a possibility of four or five records with special characters
    The special characters on keyboards is not an issue.
    The programs in DEV and QAS system are same and the file tested is also the same but different results.
    Tried in Tcode SNLS to find something but didn't know what and where to look into.
    What could be the issue in this? Looks like this is Basis issue but would like to know if anyone can let me know.......
    Regards
    Sandeep

    Hi ,
    i want to check ur open dataset statement in the program which is being used here if at all in ur case.
    Can you please check the relavant code page in both the D and Q systems and search with the appropriate hexa decimal values(for the special characters ) in both the systems ..
    u can use code page by tcode scp ..
    ex -> as u say a special char sp1 is having entry in q and code page which is being used (like 4200 )
    is not having in d03 .
    then if in d03 this page has no entry then it shows as # , since it is showing in q then it has an entry over there. this is my guess..
    so if at all the client wants not to see this special char's , u need to remove them from this code page.. and check ..
    Cant say if this can solve but u can take this as one more way of dealing with code pages  and special chars....
    br vijay..

  • Orgchart export to image: special characters issue

    Hello,
    Using Orgchart Accelerated 2.01.
    We have an issue when exporting to image.  The issue happens when org unit name or attributes contains some special characters like é or ë (common in French).  In the jpg export, these characters are being replaced by some square characters.  In the preview and in the application, everything is displaying just fine.
    This doesn't happen for ppt export (pdf export still not functionning)
    Thanks,
    Laurent

    HI Laurent,
    This is quite unusual. As far as I am aware the OrgChart Accelerated solution only supports English at present. However, you should raise an OSS message via Service Marketplace as I would expect it to export these characters okay.
    Many thanks,
    Luke

  • Oracle text search - special characters issue

    Hi.
    I'm facing a real annoying problem with text search query, and everything I've tried failed...
    I have a table with a varchar column indexed by text index. The column contains special characters like '&', ',' and mainly- '-'. Since I want to disregard these special characters for searches I have created a basic lexer of type skipjoins for the column index. So now, the phrase 'aaa-bbb something'. for example, can be searched without '-', like this: 'aaabbb'. But I want to make it possible for this phrase to be searched with and without '-'. So, that when the user enters 'aaabbb' he will get the same results as when he enters 'aaa-bbb'.
    In other words, This condition:
    WHERE CONTAINS(column, '<query> <textquery grammar="context"> <progression><seq>'
    ||'aaabbb'
    ||'</seq></progression> </textquery> </query> ' ,1)> 2
    Will return the same results as this condition:
    WHERE CONTAINS(r.POI_NAME, '<query> <textquery grammar="context"> <progression><seq>'
    ||'aaa-bbb'
    ||'</seq></progression> </textquery> </query> ' ,1)> 2
    Since text query treats the '-' sign as a minus sign and searches for 'aaa' which doesn't contain 'bbb', the only way I found to fix this was to wrap the search text with {}. like this:
    WHERE CONTAINS(r.POI_NAME, '<query> <textquery grammar="context"> <progression><seq>'
    ||'{aaa-bbb}'
    ||'</seq></progression> </textquery> </query> ' ,1)> 2
    This all went very well, until I wanted to create a relaxation query. like this:
    WHERE CONTAINS(r.POI_NAME, '<query> <textquery grammar="context"> <progression><seq>'
    ||'{aaab}'
    ||'</seq><seq>'
    ||'{aaab}'
    ||'%</seq></progression> </textquery> </query> ' ,1)> 2
    In this case, I would expect the first part of the query to return no results (since it's not the whole word) but the second part, using '%' should have returned the record of 'aaa-bbb'. It doesn't. It will only return my result if I remove the '{}' for the second part. I can't do that, because the exact same search, when containing '-', will not return the expected results when I remove the braces (the sign is treated as minus sign):
    WHERE CONTAINS(r.POI_NAME, '<query> <textquery grammar="context"> <progression><seq>'
    ||'{aaab}'
    ||'</seq><seq>'
    ||'aaa-b'
    ||'%</seq></progression> </textquery> </query> ' ,1)> 2
    So I now have no solution. My question is- How can I create a query that will disregard the minus sign and treat it as a regular sign, but would still handle percentage sign as a special sign. So that I could run a query like the last example and will get the results of searching the phrase 'aaa-b%'?
    In short, and to simplify my question, I'm looking for a way to escape all characters (not only the minus sign) except for a specific character. Kind of like 'unescaping' a specific character (the '%' sign) within braces {}. Or, another way would be to remove the space that is added to the phrase inside the braces at the end of the word, preventing me from adding "%" at the end of the word, outside the braces.
    Thanks you,
    Nili

    I'm looking for a way to escape all characters (not only the minus sign) except for a specific character. Kind of like 'unescaping' a specific character (the '%' sign) within braces {}What about if you apply a function like regexp_replace to escape all known "specific characters", and then unescape the particular specific character again back as e.g. in
    SQL>  select 'a.da-df%df*' str, replace (
                                                   regexp_replace (
                                                        'a.da-df%df*',
                                                        '([[:punct:]])',
                                                        '\\\1'
                                                   str2
      from dual
    STR         STR2         
    a.da-df%df* a\.da\-df%df\*
    1 row selected.i.e. don't escape with curly brackets but with the backslash character.
    You can then use this string in your query like in
    WHERE CONTAINS(r.POI_NAME, '<query> <textquery grammar="context"> <progression><seq>'
    ||'aaab'
    ||'</seq><seq>'
    ||'aaa\-b'
    ||'%</seq></progression> </textquery> </query> ' ,1)> 2

Maybe you are looking for