lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Reg D group "illustration-assumption" page missing?


From: Vadim Zeitlin
Subject: Re: [lmi] Reg D group "illustration-assumption" page missing?
Date: Fri, 28 Sep 2018 23:51:03 +0200

On Fri, 28 Sep 2018 21:09:13 +0000 Greg Chicares <address@hidden> wrote:

GC> Vadim--Having once studied 'reg_d_group.xsl',

 I'm afraid this one of those experiences that you tend to evacuate as
quickly as possible for self-protection, so while I remember that I found a
lot of questionable things in the existing XSL-FO, I don't remember this
one in particular. I think I might have just missed it initially and then
never returned to it because, if this page was never printed, I could not
have noticed any discrepancies between the old and the new PDFs, which is
how I verified the new code correctness.

GC> can you remember why
GC> this logical page:
GC>         <!-- Define the Illustration Assumption Detail page. -->
GC>         <fo:simple-page-master master-name="illustration-assumption">
GC> seems never to print? AFAICT:
GC>  - Old XSL-FO PDFs match new wxPdfDoc PDFs for 'sample2gpp'.
GC>  - New PDFs have no code for this page.
GC>  - Old PDFs do have code for this page, but seem never to print it.
GC> 
GC> My theory is that this is dead code. I see conditionals in the
GC> template that depend on whether there is a supplemental report,
GC> and on whether the PDF is a composite...
GC> 
GC>   <xsl:template name="illustration-assumption">
GC>     <xsl:variable name="illustration_assumption_columns_raw">
GC> ...
GC>     <xsl:variable name="illustration_assumption_columns" 
select="document('')//xsl:address@hidden'illustration_assumption_columns_raw']/column"/>
GC>     <xsl:variable name="columns" 
select="$illustration_assumption_columns[not(@composite) or 
(boolean(@composite='1')=$is_composite)]"/>
GC> ...
GC>     <fo:flow flow-name="xsl-region-body">
GC> ...
GC>       <xsl:if test="not($has_supplemental_report)">
GC>         <fo:block id="endofdoc"/>
GC>       </xsl:if>
GC>     </fo:flow>
GC>   </xsl:template>
GC> 
GC> ...but I tried all combinations of those two conditions and couldn't
GC> get this page to print with the old XSL-FO system.

 The has_supplemental_report is only used to check whether we need to end
the document here and doesn't seem to have any bearing on whether this page
itself is output or not. The "composite" check seems to filter by column
attribute, so still shouldn't affect the presence or absence of the page.

 My hypothesis would be that there are no columns at all in this table
because the variable "illustration_assumption_columns_raw" is not defined.
But checking whether this is really the case is not obvious and I'm afraid
I won't be able to look into this today any more. Please let me know if you
need me to debug this.

 BTW, if we just need to add this page to the new PDF code, this would seem
to be straightforward to do, so I could do this too.

GC> Perhaps this XSL fragment...
GC> 
GC>        [not(@composite)
GC>         or (boolean(@composite='1')=$is_composite)
GC>        ]
GC> 
GC> ...expresses a condition that can never be satisfied?

 I don't think so if only because the same condition is used in
tabular-detail page of illustration_reg.xsl, which is definitely printed.

 Regards,
VZ


reply via email to

[Prev in Thread] Current Thread [Next in Thread]