Escaping ampersand

How can I include an & ampersand on a query?
CASE
     WHEN vw_lui.cod_tipo_documento = 'A' THEN 'Sem limite de tempo de utiliza\ç\ão para todos os produtos'
     WHEN vw_lui.cod_tipo_documento = 'B' THEN 'Sem limite de tempo de utiliza\ç\ão para determinado(s) produto(s)'
     WHEN vw_lui.cod_tipo_documento = 'C' THEN 'Limite de tempo de utiliza\ç\ão negociável'
END AS AS descricao_lui
The query is running inside a procedure.
I've already tried with: SET DEFINE ~, SET ESCAPE '\' and SET SCAN OFF, with no success.

This thread should help: Ampersand  help
'||chr(38)||'
CASE
WHEN vw_lui.cod_tipo_documento = 'A' THEN 'Sem limite de tempo de utiliza'||chr(38)||'ccedil;'||chr(38)||'atilde;o para todos os produtos'
WHEN vw_lui.cod_tipo_documento = 'B' THEN 'Sem limite de tempo de utiliza'||chr(38)||'ccedil;'||chr(38)||'atilde;o para determinado(s) produto(s)'
WHEN vw_lui.cod_tipo_documento = 'C' THEN 'Limite de tempo de utiliza'||chr(38)||'ccedil;'||chr(38)||'atilde;o negociável'
END AS AS descricao_lui
Maybe this will work?
Jim P.
Message was edited by:
Jim P

Similar Messages

  • Essbase 11.1.1 not escaping ampersand in XMLA

    We are using Microsoft SQL Server Reporting Services (SSRS 2008 SP1 CU3) to report against Hyperion Essbase 11.1.1 using the XMLA interface. When reporting against specific cubes with "&" (ampersands) in the name of measures (such as "Services & Support"), we are running into problems where SSRS will reject the message as being "unrecognized".
    Troubleshooting have shown that Essbase is not correctly escaping the ampersand characters in the messages being send by Essbase to SSRS. I'll include an example of the XML being sent by Essbase:
    <EXPRESSION>"EBITDA" - "Depreciation & Amortization"-"Goodwill & Intangibles"-"Other Income & Expense"-"806140";</EXPRESSION> <---- Ampersand not escaped
    <MEASURE_NAME>Customization &-a-m-p-; Implementation</MEASURE_NAME> <--- Ampersand escaped, note: this forum interprets the escaping of ampersand's and I added dashes to illustrate the point
    Can somebody please confirm if there is a way to work around this problem in Essbase (setting?) or if this is a bug in the interface.

    Hi,
    I can only comment that &---> is reserved for substitution variable in Essbase. It may be creating this kind of error.
    Elsewhere we use " " to use &.
    Thanks
    Focusthread Hyperion Trainer
    [http://focusthread.com/training]

  • Escaped ampersand still causes LPX-00242 in xmltype.transform

    Running Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    Collecting input from web form, and fetching via SQLX functions to then transform into html and plain text documents. If the "&" is inputted... the SQLX functions does escape it to "&amp;"... but the LPX-00242 error is still raised when sending to xmltype.transform.
    A simple test case:
    set define off;
    declare
    l_xsl xmltype;
    l_xml xmltype;
    begin
    l_xsl := xmltype('<?xml version="1.0"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="text"/>
    <xsl:template match="/">
    Hello <xsl:value-of select="//name"/>
    </xsl:template>
    </xsl:stylesheet>');
    l_xml := xmltype('<test><name>Jane&amp;John Doe</name></test>');
    dbms_output.put_line(l_xml.transform
                                        (l_xsl
                                        ).getclobval ());
    end;the above code raises this exception:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00241: entity reference is not well formed
    Error at line 3
    ORA-06512: at "SYS.XMLTYPE", line 138
    ORA-06512: at line 20If I rerun the above block... but change the xml string to <test><name>Jane &amp;amp; John Doe</name></test>
    I now get the following exception:
    Error at line 2
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00242: invalid use of ampersand ('&') character (use &amp;)
    Error at line 3
    ORA-06512: at "SYS.XMLTYPE", line 138
    ORA-06512: at line 20If I change the xml string to <test><name>Jane &amp;amp;amp; John Doe</name></test>.. no exceptions and displays the following:
    Hello Jane &amp;amp; John Doe
    any reason why the SQLX function escaping is not sufficient and I need to double-escape it? The working version is not ideal, since I now have to decode the entity reference back to it's character, otherwise the entity reference code is displayed in the content.
    Edited by: pl_sequel on Sep 7, 2011 2:12 PM

    Hi tsuji,
    Interesting discussion, really, but I fail to see how the way we're generating the XMLType instance in the first place is important for any subsequent transformation.
    You said :
    That part is well noticed. And that precisely poses problem.and,
    [6.2] But the working (at least for this sample) of the latter but not the former using xmltype() precisely pose the problem of either xmltype().transform() implementation contains bug [...]Could you explain again what you think works and what doesn't?
    I may be missing something but all these appear to work correctly :
    SQL> var xsldoc varchar2(4000)
    SQL> begin
      2   :xsldoc := '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      3  <xsl:output method="text"/>
      4  <xsl:template match="/">Hello <xsl:value-of select="//name"/>
      5  </xsl:template>
      6  </xsl:stylesheet>';
      7  end;
      8  /
    PL/SQL procedure successfully completed
    SQL> set define off
    SQL> select xmltransform(
      2           xmlelement("test", xmlelement("name", 'Jane&John Doe'))
      3         , :xsldoc
      4         ).getclobval() as result
      5  from dual
      6  ;
    RESULT
    Hello Jane&John Doe
    SQL> select xmltransform(
      2           xmltype('<test><name>Jane&amp;John Doe</name></test>')
      3         , :xsldoc
      4         ).getclobval() as result
      5  from dual
      6  ;
    RESULT
    Hello Jane&John Doe
    SQL> select xmltype(
      2           '<test><name>Jane&amp;John Doe</name></test>'
      3         ).transform(xmltype(:xsldoc)).getclobval() as result
      4  from dual
      5  ;
    RESULT
    Hello Jane&John Doe
    SQL> select xmlelement("test",
      2           xmlelement("name", 'Jane&John Doe')
      3         ).transform(xmltype(:xsldoc)).getclobval() as result
      4  from dual
      5  ;
    RESULT
    Hello Jane&John Doe
    In any case, you know well there is a something fishy going on, one way of looking at it or another.Yes, I agree. For sure, Oracle XSLT processors are not bug-free.
    For the case we're looking at now, the essence of the XMLType datatype is probably more to blame than the XSLT processor though.
    A little off-topic addendum about the method="html" output :
    SQL> select xmltransform(xmlelement("test",
      2           xmlelement("name", 'Jane&John Doe')
      3         ),'<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      4  <xsl:output method="html" encoding="iso-8859-15" indent="yes"/>
      5  <xsl:template match="/"><html><head/><body><p><xsl:value-of select="//name"/></p></body></html>
      6  </xsl:template>
      7  </xsl:stylesheet>').getclobval()
      8  as result
      9  from dual;
    RESULT
    <html>
    <head>
      <meta http-equiv="Content-Type" content="text/html" charset="iso-8859-15">
      </meta>
    </head>
    <body>
      <p>Jane&#38;John Doe</p>
    </body>
    </html>
    Not perfect but the method seems supported too.
    Edited by: odie_63 on 11 sept. 2011 20:43

  • Ampersand in windows filename

    HI,
    I'm currently developing a Java application that needs to read a number of files from a user's Windows system. This works just fine until the user decides he wants the apllication to read a file which has an ampersand in the filename.
    For example, when I try to open a file named C:\testdir\test&file.txt it throws a FileNotFoundException
    , saying that it cannot find a file named file.txt (so it seems to be looking for file.txt and not test&file.txt)
    Can anyone tell me where this exception is coming from? Do I need to escape ampersand characters? If so, how?
    Thanks in advance for any light you can shed on this problem.
    Regards,
    Jeroen.

    Do I need to escape ampersand characters?no - at least i have code that doesn't and it works fine eg File f = new File("c:/aa&bb.txt"); f.createNewFile();works fine. This may be sensitive to the windows version you are using - eg my box is win2k, but I wouldn't be at all surprised if it didn't work for win95/98/ME etc..
    is it possible that the file doesn't exist? what file opening API are you using? where does the filename come from?
    you do need to escape backslashes - if you did this File f = new File("c:\testdir\test&file.txt") then the backslash followed by a "t" would be interpreted as a tab character - you need to backslash the backslashes in this case (sorry if you're not a newbie and this is patronising..)

  • Character mode Report in Landscape Format

    Hi All,
    I want to print my character mode report in landscape format. But I am not getting it. Everytime I get print as Portrait. I am printing from live previewer of report builder.
    I am using Oracle 9i and Report builder 6i (6.0.8.11.3).
    I have done following settings:
    System Parameter ORIENTATION=Landscape
    DESFORMAT=DECLAND.PRT (Given by Oracle)
    In the object navigator I have set following properties for Main Section
    Width=11
    Height=8.5
    Orientation=Landscape
    Char Mode Width=132
    Char Mode height=66
    I have done same settings for Header Section and Trailer Section. Please help me.
    Thanks in advance.
    Regards
    Mona

    You will need to edit prt files to add the printer escape sequences to change the page orientation to landscape. Printer escape sequences can be obtained from the printer manual, or the printer vendor.
    For instance, HP printer escape codes can be obtained from the HP website under the printer support links.
    The steps below describe how to print a landscape, character mode report from a Windows NT PC on an HP 4100N Printer. The 4100N is a dual mode printer that can use either PCL or Postscript printer language.
    1. Use a web browser to navigate to the HP website and obtain the printer escape codes for the HP 4100N. If you are unable to locate the HP4100N printer, look for generic PCL information. The HP site also includes detailed information on the printer command syntax.
    2. The HP4100N printer command for landscape page orientation is "ESC&l1O" - where ESC indicates escape, '&' (ampersand) is the parameterized character, 'l'(lower case letter l) is the group character, '1' (number one) is the printer value character and 'O' (upper case letter O) is the termination character.
    NOTE: The HP documentation uses "EC" to signify the escape character.
    It also suggests pressing CTRL and the letter P together, then
    releasing both keys and pressing the ESC key. If this is done in
    a dos editor, a left arrow will actually be displayed on screen.
    This character cannot be interpreted by Oracle Reports and will
    cause printing errors if used in a .prt file. Instead, just use
    the letters "ESC" to indicate that the code that follows is a printer
    escape sequence.
    3. Make a copy of the wide.prt file and rename it to "mywide.prt."
    4. Add the page orientation escapes to mywide.prt file:
    printer "mywide"
    height 66
    width 132
    before report esc "&l1O" *** Puts Page in Landscape Orientation***
    after page control(L)
    after report esc "&l0O" *** Resets page orientation to Portrait ***
    return control(M)
    linefeed control(J)
    SYNTAX NOTES: The escape sequence must be enclosed in double quotes ("). The above comments regarding page orientation are used to clarify where the escape codes gets added, but they should NOT be used when editing
    the actual .prt file.
    5. Save mywide.prt file to the $ORACLE_HOME\report60\printers\ directory.
    6. Go to Windows PC -> Start -> Settings -> Printers and open the properties for the HP printer. Ensure that the option to "Always Spool Raw Data" is checked. This option is usually under the General Printer
    Options, or Spool Options. On Windows NT, you must have Administrator privileges to change this setting.
    7. Test running the report to the printer and specify desformat mywide. It is not necessary to include the file extension (.prt).
    8. The report will now print in landscape orientation.

  • Org.xml.sax.SAXParseException

    Hi All,
    I am trying to parse an xml file whcih contains some special characters like "&" using DOM parser.
    So, i am gtting the saxparse exception "The reference to entity "T" must end with the ';' delimiter"
    Is there any way to overcome this exception, since i could not modify the xml file to remove the special characters, since it is coming from different application.
    Pls suggest a way to parse this xml file to get the root element?
    My XML contains:
    <P>Net: J^l </P>
    <P>Total: JL'J </P>
    *<P><Figure ActualText="&T ">*
    <ImageData src="images/17PT 07009K_img_1.jpg"/>
    &T </Figure>
    Checked by </P>
    Thanks in advance...

    It appears that this "other application" is generating malformed XML. Apparently its author did not code it to escape ampersands in text elements correctly.
    There is no way for you to parse that. You will have to get the other application fixed.

  • XHTML Validation and Accessibility

    We've recently completed developing some Application Express systems for a customer, and they were disappointed the pages did not pass W3C XHTML validation to meet their accessibility targets.
    I've had the chance to do a bit of a post-mortem and nailed some issues that were down to our templates. I've also noted some previous threads here (notably Re: Validation!!! and Re: HTML DB and Accessibility (AA-Compliance) and look forward to resolution of markup validation issues in future releases. In the meantime, here are the most frequent problems we encountered. I'd appreciate any explanations, and any suggestions on how to improve matters in the short term.
    INVALID ENTITIES
    The majority of the validation errors are like:
    Cannot generate system identifier for general entity "p_fname"
    General entity "p_fname" not defined and no default entity
    Reference not terminated by REFC delimiter
    Reference to external entity in attribute value
    Reference to entity "p_fname" for which no system identifier could be generated
    Entity was defined here
    Where the App Ex engine is generating internal URLs and not escaping ampersands, that are then interpreted by the validator as forming part of an entity. This isn't disastrous, but an early fix in a future release would be welcome as it would reduce the number of errors and make it easier to spot any arising from invalid template code.
    Am I right in thinking that storing CSS, images and scripts externally to App Ex would eliminate this?
    STANDARD HTML BUTTONS
    All "HTML Buttons" result in:
    Value of attribute "type" cannot be "BUTTON"; must be one of "text", "password", "checkbox", "radio", "submit", "reset", "file", "hidden", "image", "button"                    
    There is no attribute "onClick"                         
    End tag for "input" omitted, but OMITTAG NO was specified
    Where the engine is generating an attribute value in uppercase and attribute names in camel-hump case instead of all lowercase. We can work round this by creating an "HTML Button" template with valid attributes and values.
    ITEM LABEL
    Reference to non-existent ID "P1_DATASET_CATEGORIES"
    Where the label is the overall label for a checkbox item with multiple checkboxes, all of which have their own valid label. Should the engine include the checkbox item as a hidden item? Can we work round this by doing that manually, e.g. in Post Element Text?
    HEADERS
    Reference to non-existent ID "GV_VALUE"
    Where a report has report has Headings Type "None" and hence no &lt;th&gt;s for headers attributes to refer to. Is there a workaround for this?
    REPORT BREAK FORMATTING
    End tag for "br" omitted, but OMITTAG NO was specified
    &lt;br&gt; tags inserted by break processing within the engine are not terminated " /&gt;". This is not controllable by any template (that I am aware of) - anything that can be done?
    TEXT FIELDS
    This is rather puzzling, as it seems to be random: items on some pages are affected, those on others are not. Anyone have an explanation?
    There is no attribute "TYPE"
    There is no attribute "NAME"
    There is no attribute "SIZE"
    There is no attribute "MAXLENGTH"
    There is no attribute "VALUE"
    There is no attribute "id"
    Element "INPUT" undefined
    End tag for "INPUT" omitted, but OMITTAG NO was specified
    Reference to non-existent ID "P5_ENTRIES_DISPLAYED"
    Where the engine is generating an element and attribute names in uppercase instead of all lowercase. From earlier threads, I'm presuming nothing can be done at present.
    HYPERLINK
    There is no attribute "HREF"
    Element "A" undefined
    As above: element and attribute names in uppercase instead of all lowercase.
    TABLE HEADING/DATA ALIGNMENT
    Value of attribute "align" cannot be "LEFT"; must be one of "left", "center", "right", "justify", "char"
    Attribute value generated in uppercase. Any workaround?
    REPORT SORT ARROW
    End tag for "img" omitted, but OMITTAG NO was specified
    Sort arrow &lt;img&gt; element not terminated " /&gt;". Any workaround? (Or can this be suppressed completely/replaced?)

    Hello,
    Most of your issues are things we are aware of and hope to get fixed in 3.0 as they are produced from an engine specifically using htf package to render elements which we will be changing. Unfortunatly with most of those issues I see there I don't think you can do much.
    I doubt the html the engines produce will pass xhtml strict in 3.0 but we will pass xhtml transitional (other than maybe urls in links) with a custom DTD that takes into account things we output in our namespace.
    Carl

  • Stop Xerces to resolve Entities

    Hi,
    1) Question:
    ============
    I've got the following problem. In one of my swing-projects i need the possiblity to edit XML-Code. Now when reading in the XML-File Xerces expands ENTITITES like &amp; and in my Swing-App only & is shown. I have not found a property or something like this to prevent Xerces from expanding the entities. Does anybody know how to do this?
    2) Question:
    ============
    At the moment I have solved the problem from above by using the xml-Parser which comes with java-1.4. It does not expand Entities when setting
    -----------------cut----------------------
    factory.setExpandEntityReferences( false );
    -----------------cut----------------------
    Now there's the problem. For some of the XML-Files I need Schema-Validation which could only be done by Xerces (am I right?). Still at the moment when I add the xercesImpl.jar to my classpath the sun-parser does not resolve entities any more. Does anybody know what's going on there?
    thx
    tom

    XML does not allow & by itself to appear in a text node. The rule is that it must be escaped, i.e. you must put &amp; when you want that ampersand character. That rule, however, only specifies how the ampersand character must appear when it is in an XML file. When it is extracted from the XML file by software, Xerces or other, it will be treated as an ampersand.
    So that's the rule. Presumably what you said about "expanding entities" was a confusion of that rule, but I couldn't really tell.
    Anyway, what your Swing app should display for the ampersand character depends on what it is designed to display. If you are just putting raw XML into a text box and allowing the user to edit it, then you should put valid XML there, and that means the escaped version (&amp;). But I wouldn't recommend that approach, because humans are likely to violate XML rules, like the escaping rule for example and many others. You are likely to end up with malformed XML if you do that.
    However, if you have something like a tree structure with an element or an attribute at each node, then you should certainly display the unescaped version (&). This is what you will get when you extract a text node from a DOM anyway, and it's a correct representation of what is actually in the XML file from the user's point of view.
    That's how you should treat the ampersand character, in my view. But the escaped ampersand character is normally not considered to be an entity. If you are declaring it as an entity in your schema, perhaps you should not do that as it seems to be leading to a lot of confusion.

  • Parsing Special Charcters in XML File like & ,'

    HI my xml is like this
    <?xml version="1.0" encoding="UTF-8" ?>
    <contact-info>
    <name>Jane Smith</name>
    <company>AT & T</company>
    <phone>(212) 555-4567</phone>
    </contact-info>
    how can i parse it as the & symbol is there in AT & T text .
    Need some Java code to replace all kind of special characters

    So the parser is giving you a message saying that the XML is not well-formed? Then you should contact the person who gave you that XML document. Tell them that is isn't well-formed (and that they should escape ampersands correctly).
    It's not your responsibility to parse any old garbage that somebody sends you. It's their responsibility to send you well-formed XML.

  • JSp or JSF Unrecognized Content Type.

    I have a simple JSF application that simply creates a panelGrid dynamically based on an input field I supply stating how many grids to render. The initial page loads up fine but when I click on either of the buttons to exit or submit the request to render the grid I get the following exception::
    javax.faces.FacesException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Unrecognized Content Type.
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:327)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:110)
    Here is a copy of my faces-config.xml
    <?xml version="1.0"?>
    <!DOCTYPE faces-config PUBLIC
    "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
    "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
    <faces-config>
    <managed-bean>
    <description>The one and only HelloBean.</description>
    <managed-bean-name>helloBean</managed-bean-name>
    <managed-bean-class>com.cvs.corp.demoapp.presentation.bean.HelloBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
    <description>Navigation from the hello page.</description>
    <from-view-id>/faces/hello.jsp</from-view-id>
    <navigation-case>
    <from-outcome>success</from-outcome>
    <to-view-id>/faces/goodbye.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    </faces-config>
    The interesting thing is that when I click the back button and refresh the page it properly displays the panel with the render fields! This seem like it may be a stupid mistake but any info would be much appreciated... I am going crazy...
    Here are the JSPs and the managed bean as well...
    * Created on Jul 7, 2005
    * TODO To change the template for this generated file go to
    * Window - Preferences - Java - Code Style - Code Templates
    package com.cvs.corp.demoapp.presentation.bean;
    import java.util.List;
    import javax.faces.application.Application;
    import javax.faces.component.html.HtmlOutputText;
    import javax.faces.component.html.HtmlPanelGrid;
    import javax.faces.context.FacesContext;
    import javax.faces.event.ActionEvent;
    * @author ksbober
    * TODO To change the template for this generated type comment go to
    * Window - Preferences - Java - Code Style - Code Templates
    public class HelloBean {
    private int numControls;
    private HtmlPanelGrid controlPanel;
    public HtmlPanelGrid getControlPanel() {
    return controlPanel;
    public void setControlPanel(HtmlPanelGrid controlPanel) {
    this.controlPanel = controlPanel;
    public int getNumControls() {
    return numControls;
    public void setNumControls(int numControls) {
    this.numControls = numControls;
    public void addControls(ActionEvent actionEvent) {
    System.out.println("Am I in here??");
    Application application = FacesContext.getCurrentInstance().getApplication();
    List children = controlPanel.getChildren();
    children.clear();
    for(int count = 0; count < numControls; count++) {
    HtmlOutputText output = (HtmlOutputText)application.createComponent(HtmlOutputText.COMPONENT_TYPE);
    output.setValue(" "+count+" ");
    output.setStyle("color: blue");
    children.add(output);
    public String goodbye() {
    System.out.println("How about here??");
    return "success";
    JSPs
    hello.jsp
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD/ HTML 4.01 Transitional//EN">
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" isELIgnored="false" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <f:view>
    <html>
    <head>
         <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
    <title>JSF in Action - Hello World!</title>
    </head>
    <body>
         <h:form id="welcomeForm">
         <h:outputText id="welcomeOutput"
                        value="Welcome to Java Server Faces! You da' man Kyle!!!"
                        style="font-family:Arial,san-serif; font-size:24; color:green;" />
              <p>
              <h:message id="errors" for="helloInput" style="color:red;" />
              </p>
              <p>
              <h:outputLabel for="helloInput">
                   <h:outputText id="helloInputLabel"
                                  value="Enter number of controls to display:" />
              </h:outputLabel>
              <h:inputText id="helloInput"
                             value="#{helloBean.numControls}"
                             required="true">
                   <f:validateLongRange minimum="1" maximum="500" />
              </h:inputText>
              </p>
              <p>
              <h:panelGrid id="controlPanel"
                             binding="#{helloBean.controlPanel}"
                             columns="20"
                             border="1"
                             cellspacing="0" />
              </p>
              <h:commandButton id="redisplayCommand"
                                  type="submit"
                                  value="Redisplay"
                                  actionListener="#{helloBean.addControls}" />
              <h:commandButton id="goodbyeCommand"
                                  type="submit"
                                  value="Goodbye"
                                  action="#{helloBean.goodbye}"
                                  immediate="true" />
    </h:form>
    </body>
    </html>
    </f:view>
    goodbye.jsp
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD/ HTML 4.01 Transitional//EN">
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" isELIgnored="false" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
    <title>JSF in Action - Hello World!</title>
    </head>
    <body>
    sdhfjsdhf
         <f:view><%--
         <h:form id="goodbyeForm">
              <p>
              <h:outputText id="welcomeOutput"
                                  value="GoodBye!"
                                  style="font-family:Arial,sans-serif; font-size:24; font-style:bold; color:green;" />
              </p>
              <p>
              <h:outputText id="helloBeanOutputLabel"
                                  value="Number of controls displayed:" />
              <h:outputText id="helloBeanOutput"
                                  value="#{helloBean.numControls}" />
              </p>
         </h:form>
         --%>
         </f:view>
         </body>
    </html>

    Agreed. JSPX is a well-formed version of a JSP file (i.e. an XML version of JSP). Thus, it is easy to produce pages that adhere to strict XHTML standards. A couple of things that you will need to do in JSPX files is escape ampersands and close script tags with a complete tag closure rather than the customary shortcut.
    --RiC                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Escape the Ampersand in SQL Interface

    How can I escape the & in the SQL Interface? Backslash doesn't work. I don't have any subvars.
    Essbase 11.1.1.3

    Have you tried putting quotes around the member name?
    Anytime you have a space, then ampersand, then text, it will try to resolve it as a subvar. Now if you have a member name with Text & Text, you would naturally have quotes around it as "Text & Text", which would be ok.
    As a best practice, just don't nestle the & up to text on the right side as it will always look for it to be a subvar. I've even encountered issues with that in ASO, as membernames are enclosed by brackets(not quotes).
    Robert

  • Using html in cf report builder and escaping the & ampersand character

    Some of the data we collect is entered via a WYSIWYG editor.  Therefore formatting such as bold, italic etc is translated into HTML.
    The text could also contain special characters/accented characters, again these are translated into their html equivalents.
    In CF Report Builder, I have set the XHTML Text formatting to TRUE.  However the report won't render the text in these boxes.  From what I can see it doesn't like the '&' character (ampersand).
    I have read elsewhere that report builder is limited in the characters etc that it can read and that I should translate the values.  I ended up doing this in the database to try and save some time.
    CREATE  OR REPLACE FUNCTION translatexhtmltoasci(var_text IN appendix3%TYPE)
      RETURN clob
    ISvar_translated_text clob;BEGIN
     select  replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(re place(replace(
      replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(re place(replace
      (replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(r eplace(replace
      (replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(r eplace(replace
      (replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(r eplace(replace
      (replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(r eplace(replace
      (replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(r eplace(replace
      (replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(r eplace(replace
      (replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(r eplace(replace
      (replace(replace(replace(replace(replace(replace(replace(replace(replace(
    var_text , chr(38) || 'lt;', chr(60))
      , chr(38) || 'gt;', chr(62))
      , chr(38) || 'euro;', chr(49792))
      , chr(38) || 'iexcl;', chr(49825))
      , chr(38) || 'cent;', chr(49826))
      , chr(38) || 'pound;', chr(49827))
      , chr(38) || 'curren;', chr(49828))
      , chr(38) || 'yen;', chr(49829))
      , chr(38) || 'brvbar;', chr(49830))
      , chr(38) || 'uml;', chr(49832))
      , chr(38) || 'copy;', chr(49833))
      , chr(38) || 'ordf;', chr(49834))
      , chr(38) || 'laquo;', chr(49835))
      , chr(38) || 'not;', chr(49836))
      , chr(38) || 'shy;', chr(49837))
      , chr(38) || 'reg;', chr(49838))
      , chr(38) || 'macr;', chr(49839))
      , chr(38) || 'deg;', chr(49840))
      , chr(38) || 'plusmn;', chr(49841))
      , chr(38) || 'sup2;', chr(49842))
      , chr(38) || 'sup3;', chr(49843))
      , chr(38) || 'acute;', chr(49844))
      , chr(38) || 'micro;', chr(49845))
      , chr(38) || 'para;', chr(49846))
      , chr(38) || 'middot;', chr(49847))
      , chr(38) || 'cedil;', chr(49848))
      , chr(38) || 'sup1;', chr(49849))
      , chr(38) || 'ordm;', chr(49850))
      , chr(38) || 'raquo;', chr(49851))
      , chr(38) || 'frac14;', chr(49852))
      , chr(38) || 'frac12;', chr(49853))
      , chr(38) || 'frac34;', chr(49854))
      , chr(38) || 'iquest;', chr(49855))
      , chr(38) || 'Agrave;', chr(50048))
      , chr(38) || 'Aacute;', chr(50049))
      , chr(38) || 'Acirc;', chr(50050))
      , chr(38) || 'Atilde;', chr(50051))
      , chr(38) || 'Auml;', chr(50052))
      , chr(38) || 'Aring;', chr(50053))
      , chr(38) || 'AElig;', chr(50054))
      , chr(38) || 'Ccedil;', chr(50055))
      , chr(38) || 'Egrave;', chr(50056))
      , chr(38) || 'Eacute;', chr(50057))
      , chr(38) || 'Ecirc;', chr(50058))
      , chr(38) || 'Euml;', chr(50059))
      , chr(38) || 'Igrave;', chr(50060))
      , chr(38) || 'Iacute;', chr(50061))
      , chr(38) || 'Icirc;', chr(50062))
      , chr(38) || 'Iuml;', chr(50063))
      , chr(38) || 'ETH;',

    I also stuck with this . Still no answer, no solution

  • Problem with display of ampersand in reports

    I enter the following text into a "notes" item on a page:
    Send request to AT&T.
    When I use this notes item in a report the following is displayed:
    Send request to AT
    Note the ampersand and the T are missing.
    If I remove the period at the end of the note:
    Send request to AT&T
    The report displays properly:
    Send request to AT&T
    If I append text to the original note like this:
    Send request to AT&T for test.
    The report note will display properly:
    Send request to AT&T for test.
    The issue seems caused by the period following AT&T. This is APEX 3.2.1.00.12.
    Besides the work around of editing the text, does anyone know what else might fix the problem?

    Doesn't appear to be anything out of the ordinary there.
    The obvious solution is to escape the ampersand, which will stop it being specially treated by either APEX or HTML:
    SELECT n.note_id, l.lce_type, htf.escape_sc(n.note) note, n.created_by, n.created_date, n.last_updated_by, n.last_updated
    FROM ticket_lces l, lce_notes n
    WHERE l.ticket_id = :P33_TICKET_ID
    AND l.lce_id = n.lce_idAlthough I'm not sure why this is necessary. Can't say I've come across a report column doing this before...
    Standard or interactive report?
    If it's a standard report: What is the Display As property of the <tt>note</tt> column? Is there any post-query manipulation of the <tt>note</tt> column in the report: HTML Expression, Link etc?

  • SQL*Plus: list of characters that need to be escaped

    Hi all,
    We have a requirement where we need to add comments to tables and table columns and this is done using SQL*Plus. I understand that there are some special characters that are interpreted by SQL*Plus such as ampersand (&). I would like to know the list of such characters so that we can escape them before passing it on to CREATE COMMENT ON statement. So far we have identified the following special characters:
    The following characters need to be escaped no matter where they are present in the comment
    single quote "'" (hex 27)
    define "&" (hex 26)
    sqlterminator ";" (hex 3b)
    The following characters need to be escaped when they are the only character on a line
    forward slash "/" (hex 2f)
    blockterminator "." (hex 2e)
    sqlprefix "#" (hex 23)
    The following characters need to escaped if they are followed by a newline
    line continuation "-" (hex 2d)
    We would like to know if there are other special characters and appreciate if someone can provide the list.
    Thanks
    Edited by: user779842 on Aug 20, 2009 3:37 AM
    Edited by: user779842 on Aug 20, 2009 3:55 AM

    I think the only two characters you need to worry about in your comment strings are: ' and & (apostrophe/single quote and ampersand). The latter you can get around by doing:
    set define offbefore running your statements, but the apostrophe you'll have to double up to allow oracle to recognise that it's not the end of the string. Eg:
    I'm a stringwould become
    'I''m a string'  -- NB. this is two single quotes, not 1 double quote!or, if you're on 10g or above, you can use the quote operator (q):
    select q'#I'm a string#' from dual;See the documentation for what characters can be used as the quote delimiters: http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_sqltypes.htm#sthref377

  • XML Parsing attributes with encoded ampersand causes wrong order

    Hi all,
    I am writing in the forum first (because it could be that i am doing something wrong.... but i think it is a bug. Nonetheless, i thought i'd write my problem up here first.
    I am using Java 6, and this has been reproduced on both windows and linux.
    java version "1.6.0_03"
    Problem:
    read XML file into org.w3c.dom.Document.
    XML File has some attributes which contain ampersand. These are escaped as (i think) is prescribed by the rule of XML. For example:
    <?xml version="1.0" encoding="UTF-8"?>
         <lang>
              <text dna="8233" ro="chisturi de plex coroid (&gt;=1.5 mm)" it="Cisti del plesso corioideo(&gt;=1.5mm)" tr="Koro&#305;d pleksus kisti (&gt;=1.5 mm)" pt_br="Cisto do plexo cor&oacute;ide (&gt;=1,5 mm)" de="Choroidplexus Zyste (&gt;=1,5 mm)" el="&Kappa;&#973;&sigma;&tau;&epsilon;&iota;&sigmaf; &chi;&omicron;&rho;&omicron;&epsilon;&iota;&delta;&omicron;&#973;&sigmaf; &pi;&lambda;&#941;&gamma;&mu;&alpha;&tau;&omicron;&sigmaf; (&gt;= 1.5 mm)" zh_cn="&#33033;&#32476;&#33180;&#22218;&#32959;&#65288;&gt;= 1.5 mm&#65289;" pt="Quisto do plexo coroideu (&gt;=1,5 mm)" bg="&#1050;&#1080;&#1089;&#1090;&#1072; &#1085;&#1072; &#1093;&#1086;&#1088;&#1080;&#1086;&#1080;&#1076;&#1085;&#1080;&#1103; &#1087;&#1083;&#1077;&#1082;&#1089;&#1091;&#1089; (&gt;= 1.5 mm)" fr="Kystes du plexus choroide (&gt;= 1,5 mm)" en="Choroid plexus cysts (&gt;=1.5 mm)" ru="&#1082;&#1080;&#1089;&#1090;&#1099; &#1089;&#1086;&#1089;&#1091;&#1076;&#1080;&#1089;&#1090;&#1099;&#1093; &#1089;&#1087;&#1083;&#1077;&#1090;&#1077;&#1085;&#1080;&#1081; (&gt;=1.5 mm)" es="Quiste del plexo coroideo (&gt;=1.5 mm)" ja="&#33032;&#32097;&#33180;&#22178;&#32990;&#65288;&gt;=1.5mm&#65289;" nl="Plexus choroidus cyste (&gt;= 1,5 mm)" />
    </lang>As you might understand, we need to have the fixed text '>' for later processing. (not the greater than symbol '>' but the escaped version of it).
    Therefore, I escape the ampersand (encode?) and leave the rest of the text as is. And so my > becomes >
    All ok?
    Symptom:
    in fetching attributes, for example by the getAttribute("en") type call, the wrong attribute values are fetched.
    Not only that, if i only read to Document instance, and write back to file, the attributes are shown mixed up.
    eg:
    dna: 8233, ro=chisturi de plex coroid (>=1.5 mm), en=&#1082;&#1080;&#1089;&#1090;&#1099; &#1089;&#1086;&#1089;&#1091;&#1076;&#1080;&#1089;&#1090;&#1099;&#1093; &#1089;&#1087;&#1083;&#1077;&#1090;&#1077;&#1085;&#1080;&#1081; (>=1, de=Choroidplexus Zyste (>=1,5 mm)Here you can see that 'en' is shown holding what looks like greek, ... (what is ru as a country-code anyway?) where it should have obviously had the english text that originally was associated with the attribute 'en'
    This seems very strange and unexpected to me. I would have thought that in escaping (encoding) the ampersand, i have fulfilled all requirements of me, and that should be that.
    There is also no error that seems to occur.... we simply get the wrong order when fetching attributes.
    Am I doing something wrong? Or is this a bug that should be submitted?
    Kind Regards, and thanks to all responders/readers.
    Sean
    p.s. previously I had not been escaping the ampersand. This meant that I lost my ampersand in fetching attributes, AND the attribute order was ALSO WRONG!
    In fact, the wrong order was what led me to read about how to correctly encode ampersand at all. I had been hoping that correctly encoding would fix the order problem, but it didn't.
    Edited by: svaens on Mar 31, 2008 6:21 AM

    Hi kdgregory ,
    Firstly, sorry if there has been a misunderstanding on my part. If i did not reply to the question you raised, I appologise.
    In this 'reply' I hope not to risk further misunderstanding, and have simply given the most basic example which will cause the problem I am talking about, as well as short instructions on what XML to remove to make the problem disappear.
    Secondly, as this page seems to be displayed in ISO 8859-1, this is the reason the xml I have posted looks garbled. The xml is UTF-8. I have provided a link to the example xml file for the sample below
    [example xml file UTF-8|http://sean.freeshell.org/java/less2.xml]
    As for your most recent questions:
    Is it specified as an entity? To my knowledge (so far as my understanding of what an entity is) , yes, I am including entities in my xml. In my below example, the entities are the code for the greater than symbol. I am under the understanding that this is allowed in XML ??
    Is it an actual literal character (0xA0)? No, I am specifying 'greater than' entity (code?) in order to include the actual symbol in the end result. I am encoding it in form 'ampersand', 'g character', 't character', 'colon' in order for it to work, according to information I have read on various web pages. A quick google search will show you where I got such information from, example website: https://studio.tellme.com/general/xmlprimer.html
    Here is my sample program. It is longer than the one you kindly provided only because it prints out all attributes of the element it looks for. To use it, only change the name of the file it loads.
    I have given the xml code seperately so it can be easily copied and saved to file.
    Results you can expect from running this small test example?
    1. a mixed up list of attributes where attribute node name no longer matches its assigned attribute values (not for all attributes, but some).
    2. removing the attribute bg from the 'text' element will reduce most of these symptoms, but not all. Removing another attribute from the element will most likely make the end result look normal again.
    3. No exception is thrown by the presence of non xml characters.
    IMPORTANT!!! I have only just (unfortunately) noticed what this page does to my unicode characters... all the the international characters get turned into funny codes when previewed and viewed on this page.
    Whereas the only codes I am explicitly including in this XML is the greater than symbol. The rest were international characters.
    Perhaps that is the problem?
    Perhaps there is an international characters problem?
    I am quite sure that these characters are all UTF-8 because when I open up this xml file in firefox, It displays correctly, and in checking the character encoding, firefox reports UTF-8.
    In order to provide an un-garbled xml file, I will provide it at this link:
    link to xml file: [http://sean.freeshell.org/java/less2.xml]
    Again, sorry for any hassle and/or delay with my reply, or poor reply. I did not mean to waste anyones time.
    It will be appreciated however if an answer can be found for this problem. Chiefly,
    1. Is this a bug?
    2. Is the XML correct? (if not, then all those websites i've been reading are giving false information? )
    Kindest Regards,
    Sean
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NamedNodeMap;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.xml.sax.InputSource;
    public class Example
        public static void main(String[] argv)
              try
                   FileInputStream fis = new FileInputStream("/home/sean/Desktop/chris/less2.xml");
                 Document doc = DocumentBuilderFactory.newInstance()
                 .newDocumentBuilder()
                 .parse(new InputSource(fis));
                   Element root = doc.getDocumentElement();
                   NodeList textnodes = root.getElementsByTagName("text");
                   int len = textnodes.getLength();
                   int index = 0;
                   int attindex = 0;
                   int attrlen = 0;
                   NamedNodeMap attrs = null;
                   while (index<len)
                        Element te = (Element)textnodes.item(index);
                        attrs = te.getAttributes();
                        attrlen = attrs.getLength();
                        attindex = 0;
                        Node node = null;
                        while (attindex<attrlen)
                             node = attrs.item(attindex);          
                             System.out.println("attr: "+node.getNodeName()+ " is shown holding value: " + node.getNodeValue());
                             attindex++;                         
                        index++;
                        System.out.println("-------------");
                 fis.close();
              catch(Exception e)
                   System.out.println("we've had an exception, type "+ e);
    }  [example xml file|http://sean.freeshell.org/java/less2.xml]
    FOR THE XML, Please see link above, as it is UTF-8, and this page is not. Edited by: svaens on Apr 7, 2008 7:03 AM
    Edited by: svaens on Apr 7, 2008 7:23 AM
    Edited by: svaens on Apr 7, 2008 7:37 AM
    Edited by: svaens on Apr 7, 2008 7:41 AM

Maybe you are looking for

  • IPod no longer syncs with computer

    My iPod will no longer sync with my laptop. I keep getting the following message: "The iPod "JRT's iPod" cannot be syned. You do not have enough access privledges for this operation." Apple told me tht it was a problem with my Norton 360 software. I

  • UC 540

    Hello, I am trying to add this to my network to appy updates, but I can not ping it cable is plugged into interface FastEthernet0/1/0 IP is set to 192.168.5.89, however, I can not ping it Any help wold be appreciated below is config Y log 2014.02.11

  • Import RFC/IDOC error

    Hi all, I am following "How to...push data in to BW from XI." In the 5th step in the document it is given Choose "Import RFC/IDOC" in the context menu of "Imported Objects" and enter your user data to logon to the BW system. Select the function modul

  • Only 4 interaction records display on BP confirm

    Hi, While confirming BP on ICWebclient we get the list of Interaction records. In our case we are getting only last 4 interaction records history on BP confirm view. But if you search through Interaction History then you get the complete list with ba

  • JUnit in jdeveloper 10g

    Can someone give me some documentation on how to create test cases and incorporate JUnit into jdeveloper? I have looked around but haven't had much luck. Thanks