Changeset 36287


Ignore:
Timestamp:
2022-07-04T16:32:02+12:00 (5 months ago)
Author:
anupama
Message:

PagedImg-e showed up a bug where only the first page of a paged-img document was shown with its img and text. Dr Bainbridge identified the bug as the self-closing div problem and suggested I look at gsf:div definition for solution (if I couldn't use gsf:div itself). Following his Kathy's advice to debug document.xsl by adding AAAA to ZZZZ to each template, I've now found the location(s) that resulted in the self-closing div. Using gsf:div in place of div sufficed to fix the problem.

Location:
main/trunk/greenstone3/web/interfaces/default/transform
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/transform/gslib.xsl

    r36112 r36287  
    608608      The actual solution is here:
    609609      https://stackoverflow.com/questions/19998180/xsl-copy-nodes-without-xmlns
    610       - Close but adds namespacs to the first HTML tag:
     610      - Close but adds namespaces to the first HTML tag:
    611611      https://stackoverflow.com/questions/6199345/how-to-copy-all-child-nodes-of-any-type-of-a-template-context-element
    612612      Other links that are a learning experience:
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/document.xsl

    r36050 r36287  
    646646              </xsl:text>
    647647            </script>
    648                 <div id="image{@nodeID}">
     648                <gsf:div id="image{@nodeID}">
    649649                  <!-- when we ask for an individual section content we set ed=1. putting this test here prevents downloading all the screen and full images for each section of the document when we are just looking at the contents list. ed is not set for simple docs, so do this if doctype is simple -->
    650650                  <xsl:if test="/page/pageResponse/document[@docType='simple'] or /page/pageRequest/paramList/param[@name = 'ed']/@value='1'">
     
    689689                    </script>
    690690                </xsl:if>
    691                 </div>
     691                </gsf:div>
    692692            </xsl:when>
    693693            <xsl:otherwise>
    694                 <div id="image{@nodeID}">
     694                <gsf:div id="image{@nodeID}">
    695695                    <xsl:attribute name="style">
    696696                        <xsl:choose>
     
    704704                    </xsl:attribute>
    705705                    <xsl:call-template name="sectionImage"/><xsl:text> </xsl:text>
    706                 </div>
     706                </gsf:div>
    707707            </xsl:otherwise>
    708708        </xsl:choose>
Note: See TracChangeset for help on using the changeset viewer.