History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: OQ-188
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Mark Gaywood
Reporter: Dick Anderson
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenQuote

Terms & Conditions section not rendered in quotation document

Created: 09/Feb/10 04:21 AM   Updated: 12/Mar/10 04:27 AM
Component/s: None
Affects Version/s: 1.2
Fix Version/s: 1.2

File Attachments: 1. XML File document-style.xsl (28 kb)
2. XML File scratch.xml (8 kb)


Release Notes Comment: Quotation documents now correctly render Terms and Conditions section. The "industrial" document style template has been enhanced to include T&C sections as used in the MotorPlus demo product.


 Description  « Hide
The MotorPlus product's quotation document definition includes a "Terms and Conditions" section which it pulls in by URL from Alfresco. However, the rendered PDF shows only the section header, the text of the section is blank.

The first step of the document generation process (data merge) appears to be completing successfully. The result of this process in XML is attached to this JIRA (scratch.xml). It looks as though the xsl into fop is at fault. The relevant xsl is also attached.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Mark Gaywood - 13/Feb/10 11:11 AM
I've check-in a version, sadly for who-knows-why I can't test it on my machine (too many servers I suspect).

It appeared that an <fo:block> was being closed before containing a <fo:table> within an <fo:table-cell>. Subsequently, no Wordings section.

I leave this open until it's fully tested.

Also, looks like the xsl:fo spec is being altered to be in-line with XHTML that means the "font-family" and few other attributes need to be rethought as they'll need to be expressed in a "style" attribute. This should only effect us when we upgrade FOP and saxon/xalan

Dick Anderson - 09/Mar/10 07:50 AM - edited
Might not be at all relevant, but I just spotted this. Could it be the root of the problem??

In the XSL, the template for itemData looks like this:

    <xsl:template match="itemData">
        <!-- resolve classes-->
        <xsl:if test="text()!=''">
           [SNIP]
        </xsl:if>
    </xsl:template">

And the XML source looks like this:

  <chapterData id="c3" title="Terms and Conditions" class="string">
    <block title="Terms and Conditions" class="string" placement="body" applicability="all">
      <itemData title="Terms and Conditions" class="wording">
        <p class="term-title">
          <b>Policy Cancellation</b>
          <br />
        </p>
        [SNIP]
      </itemData>
    </block>
  </chapterData>

The xsl:if test="text()!=''" in the XSL looks like it would always prevent the wordings from being populated - because the wordings are just text floating inside an itemData element.

Mark Gaywood - 09/Mar/10 12:55 PM
Actually, you may have inadvertently found it.

This <xsl:if test="text()!=''">, basically say do while not empty. But, this is only when there is no text. All the information for the T&C information are within other elements, so we should be checking for children too.

OK I should be checking something in this evening.

Thanks
Dick