Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Embedding HTML Code in XSL FO Using Oracle APEX

JeeebeZJun 9 2019

I am having issues getting the internal html to actually work.

Any assistance would be helpful. Essentially I'm running a classic report with the following:

Select 1 LABEL,

       'Unit group details. <bold>01</bold> 10 - 19 units <bold>02</bold> 20 - 29 units <bold>03</bold> 30 - 39 units <bold>04</bold> 40 - 49 <bold>05</bold> 50 or more units' VALUE

from dual;

XML Output:

<DOCUMENT>

    <REGION ID="25265003372353199">

        <ROWSET>

            <ROW>

                <LABEL>2</LABEL>

                <VALUE>

Unit group details. <bold>01</bold> 10 - 19 units <bold>02</bold> 20 - 29 units <bold>03</bold> 30 - 39 units <bold>04</bold> 40 - 49 <bold>05</bold> 50 or more units

</VALUE>

            </ROW>

        </ROWSET>

    </REGION>

</DOCUMENT>

Then within my report I have:

  <xsl:template name="notes">

     <fo:list-block>

      <xsl:for-each select="DOCUMENT/REGION/ROWSET/ROW">

        <fo:list-item space-after="5pt">

          <fo:list-item-label>

            <fo:block>

              <xsl:value-of select="LABEL"/>

            </fo:block>

          </fo:list-item-label>

         

          <fo:list-item-body start-indent="2.5em">

            <fo:block linefeed-treatment="preserve" white-space-collapse="false">

              <xsl:apply-templates select="VALUE"/>

            </fo:block>

          </fo:list-item-body>

        </fo:list-item>

      </xsl:for-each>

    </fo:list-block>

  </xsl:template>

AND (Note: I have tried individual b, bold, BOLD, exc... and not always using an or)

  <xsl:template match="STRONG|B|b|bold">

    <fo:inline font-weight="bold">

            <xsl:apply-templates/>

    </fo:inline>

  </xsl:template> 

According to this page: https://docs.oracle.com/middleware/12213/bip/BIPRD/GUID-5115019E-E03C-4C57-87EC-3638C34E81CF.htm#BIPRD3092  it should work.

However, with Strip HTML = "No" on the report details I get this:

Unit group details.

<bold>01</bold> 10 - 19 units <bold>02</bold> 20 - 29 units <bold>03</bold> 30 - 39 units <bold>04</bold> 40 - 49 <bold>05</bold> 50 or more units

or With Strip HTML = "Yes" I get this:

Unit group details.

01 10 - 19 units 02 20 - 29 units 03 30 - 39 units 04 40 - 49 05 50 or more units

However I NEED this

Unit group details.

01 10 - 19 units 02 20 - 29 units 03 30 - 39 units 04 40 - 49 05 50 or more units

This issue is it has to be dynamic. I could easily throw in a bunch of blocks that show that info and bold specific things. But APEX isn't working the way I need it to

Comments
Post Details
Added on Jun 9 2019
1 comment
382 views