Preserving Whitespace in Report

Hi
Part of a report we generate is a free format text field and it's important to present the contents exactly as they were originally typed to maintain any sense of readability.
Two things are therefore essential - preserving white space and a non-proportional font. The latter we've done by adding *{font:10 pt Courier} to the CSS Style attribute of the relevant column (there might be an easier way...) However, the suggested method I found for the former, namely adding {white-space: pre} to the CSS style seems to make no difference.
Anyone have any other ideas? I am new to Apex so excuse me if this a stupid question!
Thanks in advance.

Hello,
APEX does not interpret the <pre> tag the browser does that. A <pre> tag is just a standard html tag. You can try and lower the font size of content within the <pre style="font-size:10px;"> to see if that makes it look nicer.
If you can put an example on apex.oracle.com it would also be easier to help you out. Client side formatting issues by definition are easier to debug if we can see them.
Carl

Similar Messages

  • Is there any way to force Sun C++ Preprocessor preserve whitespace?

    Hello!
    I'm preprocessing simple source file:
    void test()
        int i;
    }with command: CC -E test.cpp
    and CC preprocessor eats all whitespace at the beginning of each line, like this:
    void test()
    int i;
    }Is there any way to force CC preprocessor preserve whitespace?

    You cannot use the C preprocessor on C++ code, for at least two major reasons.
    1. The default -I options in CC are not the same as for cc. Try adding
    #include <iostream>
    #include <cstdlib>
    to your example.
    Even if you add the missing -I options, the conventions for finding the C++ standard headers are not known to the C preprocessor.
    Example:
    % cc -P -I/opt/SUNWspro/prod/include/CC/Cstd -I/opt/SUNWspro/prod/include/CC -I/opt/SUNWspro/prod/include/cc z.c
    "z.c", line 2: cannot find include file: <cstdlib>
    cc: acomp failed for z.c2. The predefined macros (-D options and predefined macros built into the compilers) are different for cc and CC.
    In particular, the C compiler predefines macros saying it is a C compiler. The C++ compiler predefines macros saying it is a C++ compiler. Code that is conditionalized on whether it is compiled by the C or C++ compiler will give different results. If you add -D options for C++ macros, the results will depend on the way the tests are coded. That is, testing for a C compiler or a C++ compiler will not give mutually exclusive answers, as they would if you use the correct compiler. The Solaris headers have conditional code for C and C++.

  • Preserve whitespace from longtext, but not overflow div

    I am building a page to display query results where one of the fields is long text with formatting (bullets, etc).  This field holds text that the user can copy and paste, so I want it to display as copied.  I have found that using whitespace=pre on my main-content div allows the text to display perfectly, except that it doesn't wrap within the div, and overflows into the next column (using a two column + header template).  Without using the whitespace property, everything wraps fine, but the longtext results is collapsed.  Is there a way to preserve the whitespace in my query results and still respect the boudaries of the div?

    Hi Murray,
    here's a link - http://gregdoucette.ca/joblistdetail.php?recordID=3
    There may be some misc residue from attempts to fix the problems, so some of the code may seem incoherent.  The text staring at "We are seeking ..." and ending at "We are committed to employment equity"  comes from a field called position_desc which has a longtext datatype.  You see how it overflows into the right sidebar div.  I am open to any suggestions.

  • Preserving whitespace in Run element

    When formatting a paragraph as so -
    <RichTextBlock><Paragraph xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>
    <Run></Run>
    <InlineUIContainer><TextBlock >Words here</TextBlock></InlineUIContainer>
    <Run xml:space="preserve"> </Run>
    <InlineUIContainer><TextBlock>More words here</TextBlock></InlineUIContainer>
    <Run xml:space="preserve"> Lastly some words here</Run>
    </Paragraph>
    </RichTextBlock>
    The <Run> element containing a single space is never displayed and ignore the space=preserve property. However the last run with a leading space is displayed correctly.
    How can I get a run containing a single space to display ?

    Hi BradStevenson,
    You can see the whitespace working principle in XAML from
    http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh758290.aspx.
    As we can see, “A space immediately following the start tag is deleted.”
    it should be removed by the system. But when we add whitespace before other characters, I think it is used as a string, because “If the type of the property is Object, then the inner text is parsed as a single String. If there are intervening element
    tags, this results in a XAML parser error, because the Object type implies a single object (String or otherwise).” When whitespace in inner text. You can find these explanation from the above link.
    So if you want to preserve the whitespace, use whitespace in string and make the system considering it as inner text.
    Feel free to let me know if you have any concerns.
    Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate
    the survey.

  • Preserving whitespace in XML fields?

    I have a requirement to preserve the character positioning within an XML field. I am using the standard XML/HTTP port for output from the ALE interface. One of the fields contains multiple spaces within the data. It appears the default setting of the XML processor is to condense these spaces into a single space. The xsl:preserve-space pre-processor command should preserve the whitespace, Does anyone know how to configure the SAP XML processor to do this?   Thanks!
    We are using basis 6.20

    There's a setting in Flash's XML object called ignoreWhitespace that you need to set to false (by default its true).
    Something like this should work:
    function convertStringToXML(source:String):XML
         var originalSettings:Object = XML.settings();
         try
              XML.ignoreWhitespace = false;
              var xmlTree:XML = new XML(source);
         finally
              XML.setSettings(originalSettings);
         return xmlTree;
    - robin

  • Jdeveloper 10.1.3: JAXB - how to preserve whitespace in text element??

    Dear all,
    i am trying to use jaxb to do the xml <> java object conversion.
    i meet a problem that the jaxb seems don't preserve the white space when xml to
    java conversion (but java to xml is ok, the whitespace is preserved.)
    for example:
    an element with string type: <Address> with leading and trailing spaces </Address>,
    in java code, obj.getAddress() return "with leading and trailing spaces", the spaces
    are trimmed..
    is there any configuration to make?
    how can i preserve the whitespaces?
    thank you
    ping

    Hi, Branislav,
    That's great! It works!
    I choose to use the first method. I have two project modules, both use the same data model. I opened the data model project's properties editor, highlighted the business components node, and the the Connection dropdown list is right there.
    Thank you very much! You are always very helpful!
    Newman

  • Preserve whitespace in xml parsing

    Hi,
    I am using PL.SQL to parse XML documents using DBMS_XMLDOM..
    and using XMLTYPE...
    Below is the code...
    set serveroutput on
    declare
         var_xmltype     XMLType;
         doc          dbms_xmldom.DOMDocument;
         ndoc          dbms_xmldom.DOMNode;
         docelem          dbms_xmldom.DOMElement;
         node          dbms_xmldom.DOMNode;
         l_loop_group_8_node_list          dbms_xmldom.DOMNodelist;
         l_loop_group_8_node_list_count          number(10);
         l_loop_group_8_sub_node_list          dbms_xmldom.DOMNodelist;
         l_lin_segment_node          dbms_xmldom.DOMNode;
         l_lin_segment_child_node     dbms_xmldom.DOMNode;
         l_loop_group_8_count number(10);
         p_clob_message CLOB;
         l_clob_message CLOB;
         CURSOR c is SELECT * from emx_message_storage where emx_message_id = '170615';
    begin
    for r in c loop
    p_clob_message := r.message_clob;
    end loop;
         var_xmltype := xmltype (p_clob_message);
         -- Create DOMDocument handle
         doc :=     dbms_xmldom.newDOMDocument (var_xmltype);
         ndoc := dbms_xmldom.makeNode (doc);
         docelem := dbms_xmldom.getDocumentElement (doc);
         -- Access Loop-Group_8 Node:
         l_loop_group_8_node_list := dbms_xmldom.getElementsByTagName(docelem, 'Loop-Group_8');
         l_loop_group_8_node_list_count := dbms_xmldom.getlength (l_loop_group_8_node_list);
         --dbms_output.put_line ('Number of Loop-Group_8 Nodes =' || l_loop_group_8_node_list_count);
         FOR l_ka IN 0..(l_loop_group_8_node_list_count-1) LOOP
              -- Get ith Loop-Group_8 node.
              node := dbms_xmldom.item (l_loop_group_8_node_list, l_ka);
              l_loop_group_8_sub_node_list := dbms_xmldom.getChildNodes (node);
              -- Get Segment-LIN
              l_lin_segment_node := dbms_xmldom.item (l_loop_group_8_sub_node_list,0);
              l_lin_segment_child_node := dbms_xmldom.getFirstChild (l_lin_segment_node);
              --dbms_output.put_line ('Before,' || dbms_xmldom.getNodeName (l_lin_segment_child_node) || ' = '  || dbms_xmldom.getNodeValue (DBMS_XMLDOM.getFirstChild(l_lin_segment_child_node)));
              dbms_xmldom.setNodeValue (DBMS_XMLDOM.getFirstChild(l_lin_segment_child_node), l_ka+1);
              --dbms_output.put_line ('After,' || dbms_xmldom.getNodeName (l_lin_segment_child_node) || ' = '  || dbms_xmldom.getNodeValue (DBMS_XMLDOM.getFirstChild(l_lin_segment_child_node)));
         END LOOP;
         DBMS_LOB.CreateTemporary(l_clob_message, TRUE);
         dbms_xmldom.writeToClob (doc, l_clob_message);
         dbms_xmldom.freeDocument(doc);
         update emx_message_storage set message_clob = l_clob_message where emx_message_id = '149329';
    end;
    The code works fine.. except for the fact that when in the input XML message i get one element as
    <Element-3042> </Element-3042>
    it converts it to
    <Element-3042/>
    The whitespace is removed...
    I tried using the xml parser method...and whitespacepreserver optioin...but it creates some extra lines...
    Which i dont want.
    Please suggest.
    Thanks,
    Rosh

    Difficult to read non-formatted code, so pardon not looking at it and trying to spot the problem/error. However, whitespaces seem to work fine for me (tested on 10.2.0.4). Note the resulting XML for a string value, a whitespace value and a null.
    SQL> create table foo_tab( attr1 number, attr2 varchar2(10) );
    Table created.
    SQL>
    SQL> insert into foo_tab values( 1, 'test 123' );
    1 row created.
    SQL> insert into foo_tab values( 2, ' ' );
    1 row created.
    SQL> insert into foo_tab values( 3, null );
    1 row created.
    SQL> commit;
    Commit complete.
    SQL>
    SQL> col XML format a50
    SQL> select
      2          XmlElement( "Row",
      3                  XmlForest(
      4                          attr1 as "Name",
      5                          attr2 as "Value"
      6                  )
      7          )               as XML
      8  from       foo_tab
      9  /
    XML
    <Row><Name>1</Name><Value>test 123</Value></Row>
    <Row><Name>2</Name><Value> </Value></Row>
    <Row><Name>3</Name></Row>
    SQL>

  • xsl:text not preserving whitespace

    When I try to use <xsl:text> to put spaces into the output of a transform, it does'nt work. Leading/trailing spaces gets stripped and a single space by itself gets dropped altogether.
    This is using the PL/SQL XSLT on an XMLType in 9.0.2.
    If I run the same transform on the same data but using XALAN XSLT it works fine.

    Was that supposed to read:
    <xsl:text>& amp;#xa0;</xsl:text>?
    (I added whitespace so you could see the ampersand, but that's not a non-breaking space, that's an actual printable character.
    I later found a solution that worked in this thread:
    Cannot get to print NEWLINE in XMLTransform using XSLT
    Posted: May 2, 2007 10:16 AM
    Cannot get to print NEWLINE in XMLTransform using XSLT
    Thanks,
    Eric

  • Preserve whitespace in XML element value

    I am trying to add XML element with value prefix with white space:
      ex_doc->create_simple_element(
          name = 'VALUEPART1'
          value = '          BQ/XWKB-99-5-9999-2'
          parent = lo_ele_e1bpparex_bape_vbak ).
    But when the XML is create, the white space is removed! How can I preserve the white space???
    <VALUEPART1>BQ/XWKB-99-5-9999-2</VALUEPART1>
    What i want is:
    <VALUEPART1>          BQ/XWKB-99-5-9999-2</VALUEPART1>
    Appreciate for any help

    Hi,
    if you had been using XSLT instead, I would have said 'remove the strip-space element or alter it according to your needs'...
    Please provide what class you are using, else it's too generic..
    regards, Lukas

  • Using configuration tool, how can I preserve whitespace in name field

    I created script to get the name using the business object and don't want remove spaces from name field.

    I would suggest raising a SR for this with Customer Support as it looks like issues around language translation

  • Should whitespace be preserved by default?

    Hi:
    I'm using xmltype.transform() to apply a stylesheet to an XML document and it seems to be ignoring whatever attempts I make to have spaces in certain places. Is the default to strip spaces out? I've even tried adding preserve-whitespace in the stylesheet though I think it may be deprecated. This didn't fix things either.
    Here's the procedure that loads the data and applies the transform.
    PROCEDURE GetSQLQueryFromXML(XMLClob in CLOB, XSLStylesheet in CLOB,
                SQLQuery out CLOB) IS
        -- Define the local variables
      xmldata               sys.XMLType ;  -- The XMLType format of the XML to transform
      xsldata               sys.XMLType ;  -- The XMLType format of the stylesheet to apply
      sqlQuery_XMLType      sys.XMLType ;  -- The XMLType format of the SQL query.
      --v_SQLQuery            Clob;     -- Holds XML Clob
    BEGIN
      -- Get the XML document using the getXML() function defined in the database.
      -- Since XMLType.transform() method takes XML data as XMLType instance,
      -- use the XMLType.createXML method to convert the XML content received
      -- as CLOB into an XMLType instance.
      xmldata := XMLType.createXML(XMLClob);
      -- Since XMLType.transform() method takes an XSL stylesheet as XMLType instance,
      -- use the XMLType.createXML method to convert the XSL content received as CLOB
      -- into an XMLType instance.
      xsldata := XMLType.createXML(XSLStylesheet);
      -- Use the XMLtype.transform() function to get the transformed XML instance.
      -- This function applies the stylesheet to the XML document and returns a transformed
      -- XML instance.
      -- DBMS_XMLGEN.CONVERT() is being used as a work around to an Oracle bug that
      -- prevented us from being able to surround text strings with apostrophes for
      -- searches.  dbms_xlmgen.convert returns a Clob which is what we want anyway.
      -- The bug is supposedly fixed in Oracle 11g.
      if(xmldata is null) then
        dbms_output.put_line('*** xmldata is null!!!');
      end if;
      if(xsldata is null) then
        dbms_output.put_line('*** xsldata is null!!!');
      end if;
      SQLQuery := dbms_xmlgen.convert(xmldata.transform(xsldata).getStringVal(),
                    dbms_xmlgen.ENTITY_DECODE);
    END GetSQLQueryFromXML;What I'm trying to do is transform some XML into a SQL query string. I'm losing whitespace though so in certain cases (using LIKE or NOT LIKE) it generates improper SQL. This isn't an Oracle XML thing because I get the same error when working in a "playground" site. ( http://www.paulchaplin.com/lab/xslt/ pretty handy!)
    My test XML file is:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <variable type="QueryContent">
      <queryType><![CDATA[PERSON]]></queryType>
      <tableName><![CDATA[PERSON]]></tableName>
      <queryItem>
      <item>
        <distinct><![CDATA[false]]></distinct>
        <columnName><![CDATA[PERSON_KEY]]></columnName>
        <fieldName><![CDATA[PERSON_KEY]]></fieldName>
        <criteria><![CDATA[=]]></criteria>
        <fieldType><![CDATA[INTEGER]]></fieldType>
        <value><![CDATA[8901234]]></value>
      </item>
      <item>
        <distinct><![CDATA[true]]></distinct>
        <columnName><![CDATA[LAST_NAME]]></columnName>
        <fieldName><![CDATA[LAST_NAME]]></fieldName>
        <criteria><![CDATA[=]]></criteria>
        <fieldType><![CDATA[STRING]]></fieldType>
        <value><![CDATA[SMITH]]></value>
      </item>
      <item>
        <distinct><![CDATA[false]]></distinct>
        <columnName><![CDATA[FIRST_NAME]]></columnName>
        <fieldName><![CDATA[FIRST_NAME]]></fieldName>
        <criteria><![CDATA[=]]></criteria>
        <fieldType><![CDATA[STRING]]></fieldType>
        <value><![CDATA[JANE]]></value>
      </item>
      <item>
        <distinct><![CDATA[false]]></distinct>
        <columnName><![CDATA[MIDDLE_NAME]]></columnName>
        <fieldName><![CDATA[MIDDLE_NAME]]></fieldName>
        <criteria><![CDATA[=]]></criteria>
        <fieldType><![CDATA[STRING]]></fieldType>
        <value><![CDATA[MIDNAME]]></value>
      </item>
      <item>
        <distinct><![CDATA[false]]></distinct>
        <columnName><![CDATA[SUFFIX_NAME]]></columnName>
        <fieldName><![CDATA[SUFFIX_NAME]]></fieldName>
        <criteria><![CDATA[=]]></criteria>
        <fieldType><![CDATA[STRING]]></fieldType>
        <value><![CDATA[MS]]></value>
      </item>
      <item>
        <distinct><![CDATA[false]]></distinct>
        <columnName><![CDATA[FULL_NAME]]></columnName>
        <fieldName><![CDATA[FULL_NAME]]></fieldName>
        <criteria><![CDATA[=]]></criteria>
        <fieldType><![CDATA[STRING]]></fieldType>
        <value><![CDATA[SMITH, JANE]]></value>
      </item>
      <item>
        <distinct><![CDATA[false]]></distinct>
        <columnName><![CDATA[EMPLOYER_ORG_CODE]]></columnName>
        <fieldName><![CDATA[EMPLOYER_ORG_CODE]]></fieldName>
        <criteria></criteria>
        <fieldType><![CDATA[STRING]]></fieldType>
        <value />
      </item>
      <item>
        <distinct><![CDATA[true]]></distinct>
        <columnName><![CDATA[SSN]]></columnName>
        <fieldName><![CDATA[SSN]]></fieldName>
        <criteria><![CDATA[=]]></criteria>
        <fieldType><![CDATA[STRING]]></fieldType>
        <value><![CDATA[222222222]]></value>
      </item>
      <item>
        <distinct><![CDATA[false]]></distinct>
        <columnName><![CDATA[GRADE_CODE]]></columnName>
        <fieldName><![CDATA[GRADE_CODE]]></fieldName>
        <criteria></criteria>
        <fieldType><![CDATA[PICKLIST]]></fieldType>
        <value/>
      </item>
      <item>
        <distinct><![CDATA[false]]></distinct>
        <columnName><![CDATA[POB_CITY]]></columnName>
        <fieldName><![CDATA[POB_CITY]]></fieldName>
        <criteria><![CDATA[=]]></criteria>
        <fieldType><![CDATA[STRING]]></fieldType>
        <value><![CDATA[PASCAGOULA]]></value>
      </item>
      <item>
        <distinct><![CDATA[false]]></distinct>
        <columnName><![CDATA[POB_COUNTY]]></columnName>
        <fieldName><![CDATA[POB_COUNTY]]></fieldName>
        <criteria><![CDATA[=]]></criteria>
        <fieldType><![CDATA[STRING]]></fieldType>
        <value><![CDATA[JACKSON]]></value>
      </item> 
      <item>
        <distinct><![CDATA[false]]></distinct>
        <columnName><![CDATA[POB_STATE_CODE]]></columnName>
        <fieldName><![CDATA[POB_STATE_CODE]]></fieldName>
        <criteria><![CDATA[=]]></criteria>
        <fieldType><![CDATA[PICKLIST]]></fieldType>
        <value><![CDATA[MS]]></value>
      </item>
      <item>
        <distinct><![CDATA[false]]></distinct>
        <columnName><![CDATA[POB_COUNTRY_CODE]]></columnName>
        <fieldName><![CDATA[POB_COUNTRY_CODE]]></fieldName>
        <criteria><![CDATA[=]]></criteria>
        <fieldType><![CDATA[STRING]]></fieldType>
        <value><![CDATA[USA]]></value>
      </item>
      <item>
        <distinct><![CDATA[false]]></distinct>
        <columnName><![CDATA[BIRTH_DATE]]></columnName>
        <fieldName><![CDATA[BIRTH_DATE]]></fieldName>
        <criteria><![CDATA[=]]></criteria>
        <fieldType><![CDATA[DATE]]></fieldType>
        <fieldFormat>DD-MON-YYYY</fieldFormat>
        <value><![CDATA[11-NOV-1911]]></value>
      </item>
      <item>
        <distinct><![CDATA[false]]></distinct>
        <columnName><![CDATA[SX]]></columnName>
        <fieldName><![CDATA[SX]]></fieldName>
        <criteria><![CDATA[=]]></criteria>
        <fieldType><![CDATA[STRING]]></fieldType>
        <value><![CDATA[F]]></value>
      </item>
      <item>
        <distinct><![CDATA[true]]></distinct>
        <columnName><![CDATA[SITE_CODE]]></columnName>
        <fieldName><![CDATA[SITE_CODE]]></fieldName>
        <criteria><![CDATA[NOT LIKE]]></criteria>
        <fieldType><![CDATA[STRING]]></fieldType>
        <value><![CDATA]></value>
    </item>
    <item>
    <distinct><![CDATA[false]]></distinct>
    <columnName><![CDATA[JOB_TITLE]]></columnName>
    <fieldName><![CDATA[JOB_TITLE]]></fieldName>
    <criteria><![CDATA[LIKE]]></criteria>
    <fieldType><![CDATA[STRING]]></fieldType>
    <value><![CDATA[CLERK]]></value>
    </item>
    </queryItem>
    </variable>
    My XSL file is:<?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="text" omit-xml-declaration="yes" indent="no"/>
    <!-- IF there are any column flagged as distinct, we'll be doing selecting -->
    <!-- just those columns with DISTINCT from the general query. -->
    <!-- Generate the DISTINCT outer query first, if there is one. Then generate -->
    <!-- the query that will always be generated. Then close the outer query if -->
    <!-- there is one. -->
    <xsl:preserve-space elements="*" />
    <xsl:variable name="aspace"> </xsl:variable>
    <xsl:template match="/">
    <xsl:apply-templates select="." mode="distincts"/>
    <xsl:apply-templates select="." mode="normal"/>
    <xsl:apply-templates select="." mode="closeDistincts"/>
    </xsl:template>
    <!-- If there are any column flagged with DISTINCT we'll create an outer query -->
    <xsl:template match="/" mode="distincts">
    <xsl:for-each select="/variable/queryItem/item/distinct[text() = 'true']">
    <xsl:variable name="distinctCount" select="position()" />
    <xsl:if test="$distinctCount = 1">
    <xsl:text>SELECT DISTINCT </xsl:text>
    </xsl:if>
    <xsl:if test="$distinctCount &gt; 1">
    <xsl:text>, </xsl:text>
    </xsl:if>
    <xsl:value-of select="../columnName"/>
    </xsl:for-each>
    <!-- If we had any DISTINCT elements, generate the "FROM (" clause. -->
    <xsl:if test="count(/variable/queryItem/item/distinct[text() = 'true']) > 0">
    <xsl:text> FROM (</xsl:text>
    </xsl:if>
    </xsl:template>
    <!-- If we did a DISTINCT outer query then we need to close it with a ')' -->
    <xsl:template match="/" mode="closeDistincts">
    <xsl:for-each select="/variable/queryItem/item/distinct[text() = 'true']">
    <xsl:variable name="distinctCount" select="position()" />
    <xsl:if test="$distinctCount &lt; 2">
    <xsl:text>) </xsl:text>
    </xsl:if>
    </xsl:for-each>
    </xsl:template>
    <!-- This will generate a query. It may or not be an inner query. -->
    <xsl:template match="/" mode="normal">
    <xsl:variable name="apos">'</xsl:variable>
    select * from
    <xsl:value-of select="/variable/tableName"/>
    where 1=1
    <xsl:for-each select="variable/queryItem/item">
    <xsl:choose>
    <!-- if the value node is not null... -->
    <!-- <xsl:when test="./value/text()[normalize-space(.)]"> -->
    <xsl:when test="./value/text()">
    AND
    <xsl:value-of select="./fieldName"/>
    <xsl:copy-of select="$aspace"/><xsl:value-of select="./criteria"/><xsl:copy-of select="$aspace"/>
    <xsl:choose>
    <xsl:when test="string(./fieldType)='NUMBER'">
    <xsl:value-of select="./value"/>
    </xsl:when>
    <xsl:when test="string(./fieldType)='INTEGER'">
    <xsl:value-of select="./value"/>
    </xsl:when>
    <xsl:otherwise>
    <!-- Type is something that we treat as a string compare. -->
    <!-- Currently those types are String, CLOB, RADIO and PICKLIST -->
    <xsl:copy-of select="$apos"/>
    <xsl:value-of select="./value"/>
    <xsl:copy-of select="$apos"/>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:when>
    </xsl:choose>
    </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>
    Not how the last two predicates need spaces around the operators.  It doesn't matter when the operator is "=" or ">" but "LIKE" and "NOT LIKE" mess things up when trying to run the generated SQL.SELECT DISTINCT LAST_NAME, SSN, SITE_CODE FROM (
    select * from
    PERSON
    where 1=1
    AND
    PERSON_KEY=8901234
    AND
    LAST_NAME='SMITH'
    AND
    FIRST_NAME='JANE'
    AND
    MIDDLE_NAME='MIDNAME'
    AND
    SUFFIX_NAME='MS'
    AND
    FULL_NAME='SMITH, JANE'
    AND
    SSN='222222222'
    AND
    POB_CITY='PASCAGOULA'
    AND
    POB_COUNTY='JACKSON'
    AND
    POB_STATE_CODE='MS'
    AND
    POB_COUNTRY_CODE='USA'
    AND
    BIRTH_DATE='11-NOV-1911'
    AND
    SX='F'
    AND
    SITE_CODENOT LIKE'B'
    AND
    JOB_TITLELIKE'CLERK')
    Thanks.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          

    This thread may help : Oracle XSLT Transformation not preserving space in text element [Oracle XSLT Transformation not preserving space in text element: A Workaround]

  • Xerces2 does not report ignorable whitespace with schemas

    I use JDK 1.3 with the Summer 02 XML pack, i. e. JAXP 1.2_01, but I also tried the current Xerces2 2.2.0.
    When I parse XML files and validate them against a schema (using SAX; namespaceAware, validation and schemaValidation all set to TRUE of course), parsing and validation work all right except for whitespace being reported via characters() instead of ignorableWhitespace(). I heard of similar problems from someone who uses DOM, so the problem apparently does not lie in SAX.
    I did a lot of searching on the topic, and it's not one of the common things like "you have to supply a grammar" or "you have to switch on validation". Xerces2 documentation says the parser has to be able to recognize ignorable whitespace as such. Thing is, when I supply a DTD instead of a schema, everything works fine.
    My XML schema is pretty complex, so I took one from w3schools.com for testing:
    The schema:
    <?xml version="1.0"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.w3schools.com"
    xmlns="http://www.w3schools.com" elementFormDefault="qualified">
    <xs:element name="note">
         <xs:complexType>
              <xs:sequence>
                   <xs:element name="to" type="xs:string"/>
                   <xs:element name="from" type="xs:string"/>
                   <xs:element name="heading" type="xs:string"/>
                   <xs:element name="body" type="xs:string"/>
              </xs:sequence>
         </xs:complexType>
    </xs:element>
    </xs:schema>The DTD:
    <!ELEMENT note (to, from, heading, body)>
    <!ELEMENT to (#PCDATA)>
    <!ELEMENT from (#PCDATA)>
    <!ELEMENT heading (#PCDATA)>
    <!ELEMENT body (#PCDATA)>The XML:
    <?xml version="1.0" encoding="UTF-8"?>
    <note xmlns="http://www.w3schools.com"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.w3schools.com note.xsd">
         <to>Koch</to>
         <from>Heckler</from>
         <heading>Reminder</heading>
         <body>Lunch at 12!</body>
    </note>This is the XML with the reference to the schema. Validates fine, but reports the tabs and line feeds as characters. When I change the XML to reference the DTD, I get my characters() calls. Since I suspected my code, I also tried all that with the DocumentTracer sample program supplied with Xerces2. Same behaviour, no ignorableWhitespace() calls when using schema.
    So what is it? Is there a special way to mark up whitespace in XML schema? I don't think so. By now I suspect Xerces2 to be responsible for the problem. I'm not too experienced on the subject, but AFAIK XML schema is fairly new, and so is Xerces2. Just wanted to ask around befor stirring trouble at Apache...

    Did you guys ever find a solution for this problem.
    I didn't have this problem with DTD's.
    Also, I noticed that when parsing using SAX parser, resolveentity callback used to get fired even if the validation was set to false( in case of DTD's).
    But don't see that happening when using XSD's.
    Thanks

  • [svn:fx-trunk] 13288: Changing the workaround for custom whitespace preservation in spark components in order to cater for fixes to SDK-24699 and SDK-24611 .

    Revision: 13288
    Revision: 13288
    Author:   [email protected]
    Date:     2010-01-05 15:21:57 -0800 (Tue, 05 Jan 2010)
    Log Message:
    Changing the workaround for custom whitespace preservation in spark components in order to cater for fixes to SDK-24699 and SDK-24611.
    We now preserve whitespace for all of the spark "text" tags at compile time (but not only-whitespace content if an alternate text attribute was specified).
    QE notes: Please ensure that whitespace preservation continues to work, including for the scenarios mentioned in previous issues SDK-22601, SDK-23160, SDK-23972.
    Doc notes: N/A
    Bugs:
    SDK-24699 - Binding does not work with Spark TextInput "text" property
    SDK-24611 - MXML compiler should preserve whitespace in FlowElement tags (such as
    Reviewer: Paul
    Tests run: checkintests, mustella RichText, List, TextArea (the 2 baseline position failures existed prior to these changes)
    Is noteworthy for integration: Yes
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24699
        http://bugs.adobe.com/jira/browse/SDK-24611
        http://bugs.adobe.com/jira/browse/SDK-22601
        http://bugs.adobe.com/jira/browse/SDK-23160
        http://bugs.adobe.com/jira/browse/SDK-23972
        http://bugs.adobe.com/jira/browse/SDK-24699
        http://bugs.adobe.com/jira/browse/SDK-24611
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/dom/MxmlScanner.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/dom/Node.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java

    This bug figures out also when creating a custom spark ComboBox, then trying to programatically update the userProposedSelectedIndex property. The proposed selected index is selected, but does not apply the same skin as when mouse is on rollover or item is selected due to up and down keys.
    The issue seems like updating the status of the item renderer to rollover or selected to get the same skin applied.
    Please could you attach DropDow nList.as that you edited ?
    Thank you so much.

  • Parse XML file, read a tag with whitespaces value.

    Hi all,
    I've got a problem with reading a spaced value record from xml file using sys.xmltype.
    My xml file contains the following:
    <?xml version = '1.0'?>;
    <ROWSET>
    <ROW num="1">
    <FIRSTNAME>Nik</FIRSTNAME>
    <LASTNAME> </LASTNAME>
    <AGE>30</AGE>
    </ROW>
    </ROWSET>
    As you see last name contains four spaces!
    Now when I'm trying to read value from LASTNAME record I'm getting a NULL value, but I want it to return me those 4 spaces as they are.
    Here is a short code description of what I'm doing:
    declare
         xml sys.xmltype;
    str1 varchar2(100);
    str2 varchar2(100);
    begin
         xml := sys.xmltype.createxml(fileContentClob); -- I copy the file content into the fileContentClob variable.
         If xml.existsnode('//ROW['1']/LASTNAME') > 0 Then -- This condition evaluates as true
    str1 := xml.extract('//ROW['1']/LASTNAME/text()'); -- str1 gets NULL value :(, I want spaces as they are in the file.
    str2 := xml.extract('//ROW[' || 1 || ']/LASTNAME').getstringval; -- str2 gets <LASTNAME/> null tag :(.
         End If;     
    end;
    Seems like when it createxml from the fileContentClob it ignores the spaces and find LASTNAME as a null field.
    Do you have any suggestions on how can I fix that, so I can read whitespaces as they are in the file?
    I generate the file also using a xml toolpackage from oracle:
    declare
    strSqlStmt Varchar2(300);
    varCtxHdl dbms_xmlquery.ctxhandle;
    varClob Clob;
    begin
    strSqlStmt := 'SELECT FIRSTNAME,LASTNAME,AGE FROM USERS WHERE ROWNUM =1';
    varCtxHdl := dbms_xmlquery.newcontext(strSqlStmt);
    varClob := dbms_xmlquery.getxml(varCtxHdl);
    dbms_xmlquery.closecontext(varCtxHdl);
    End;

    Even if the STORE AS CLOB clause is used to store the data and preserve whitespace for the XML, the actual extraction of data seems to be removing whitespace...
    SQL> ed
    Wrote file afiedt.buf
      1* create table t (xml xmltype) xmltype xml store as clob
    SQL> /
    Table created.
    SQL> ed
    Wrote file afiedt.buf
      1  insert into t (xml)
      2  values (q'[<?xml version = '1.0'?>
      3  <ROWSET>
      4  <ROW num="1">
      5  <FIRSTNAME>Nik</FIRSTNAME>
      6  <LASTNAME>    </LASTNAME>
      7  <AGE>30</AGE>
      8  </ROW>
      9* </ROWSET>]')
    SQL> /
    1 row created.
    SQL> select * from t;
    XML
    <?xml version = '1.0'?>
    <ROWSET>
    <ROW num="1">
    <FIRSTNAME>Nik</FIRSTNAME>
    <LASTNAME>    </LASTNAME>
    <AGE>30</AGE>
    </ROW>
    </ROWSET>
    SQL> set null NULL
    SQL> select x.rnum, x.firstname, x.lastname, x.age
      2  from t
      3      ,xmltable('/ROWSET/ROW'
      4                PASSING t.xml
      5                COLUMNS rnum      NUMBER       PATH '/ROW/@num'
      6                       ,firstname VARCHAR2(10) PATH '/ROW/FIRSTNAME'
      7                       ,lastname  VARCHAR2(10) PATH '/ROW/LASTNAME'
      8                       ,age       NUMBER       PATH '/ROW/AGE'
      9               ) x
    10  /
          RNUM FIRSTNAME  LASTNAME          AGE
             1 Nik        NULL               30
    SQL>

  • Get rid of the white space at the top and bottom of the report when Printing as PDF document

    Hello All,
    I have a wider tablix report which is 29 inches wide. I have given the paper size as custom and width as 29 and height as 11 in report properties.I have deployed it and saved it as PDF document. When I print preview the report I am using the paper size as
    tabloid (17 by 11) and selected the orientation as Landscape. I am getting the full report without any stripping but I am getting some extra space at the top and bottom when I print the report. Can anyone help me how to get rid of this space? . I checked the
    margins for the report and it was 0in. Please help.
    Thank You

    Hi There
    In Reporting Services (SSRS 2008), there are white spaces preserved in the report body by default. When the white space extends the body size beyond the width of the report, blank pages will be generated. To avoid the issue, you can set the “ConsumeContainerWhiteSpace”
    property of the report to “True”.
    Please try to adjust your margins (top + side) and hopefully this problem will get resolved
    Body Width <= Page Width - (Left Margin + Right Margin)
    Horizontal usable area:
    X = Page.Width - (Left Margin + Right Margin + Column Spacing)
    Vertical usable area:
    Y = Page.Height - (Top Margin + Bottom Margin + Header Height + Footer Height)
    Body Width <= Page Width - (Left Margin + Right Margin)
    Horizontal usable area:
    X = Page.Width - (Left Margin + Right Margin + Column Spacing)
    Vertical usable area:
    Y = Page.Height - (Top Margin + Bottom Margin + Header Height + Footer Height)
    If you have any questions please ask.
    Many Thanks
    Syed Qazafi Anjum
    Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful.

Maybe you are looking for

  • How do i change .pages to a .doc without microsoft? I've tried going to file format .doc but all of the selctions are grey as in i can't even click on them?

    How do i change a .pages to a .doc format when i don;t have microsoft. I've tried file>format>.doc, though all selections are grey as in a cant't select them? Please help. I can't afford microsoft yet and this is a new macso im very new to this and h

  • Windows not behaving properly

    hello! i am using windows 7 ultimate.  recently i upgraded to windows 8 and then again to windows 7. it was all fine for a week or so. but after that my windows crashes,hangs and mouse buttons are swapped and mouse buttons are pressed even if i dont

  • Google Search Example - Service call fails

    Hello, I can't make the service work. I feel I have problem in my portalapp.mxl file. Here it is: <?xml version="1.0" encoding="utf-8"?> <application>   <application-config>     <property name="SharingReference" value="com.sap.portal.runtime.applicat

  • When the Weblogic 6.1 Admin Server crashes.

    Hi there! I'm using weblogic server 6.1 sp1 on windows 2000. I have one adminserver en a two managed servers. The two managed server are a cluster. My question is : Can i rebuild the admin server on an other machine when the machine where the admin s

  • Add iWeb pages to .mac main page

    Hi all, I've just created two new pages with iWeb; I've put a photo with a link in my .mac main homepage and it works fine; however, I don't know how to add those two pages at the top of the main homepage menu where all the names of my .mac pages app