Ignore:
Timestamp:
11/16/17 15:08:49 (3 years ago)
Author:
kjdon
Message:

when we are in editing mode, we haven't got assocfilepath at teh top document level. rather than wastingtime in the java code adding it there, lets just look for it in the first documentNode as that will have it.

File:
1 edited

Legend:

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

    r31942 r32074  
    143143          <xslt:choose>
    144144            <xslt:when test="/page/pageResponse/document">
    145               <xslt:value-of disable-output-escaping="yes" select="/page/pageResponse/document/metadataList/metadata[@name='assocfilepath']" />
     145              <xslt:choose>
     146            <xslt:when test="/page/pageResponse/document/metadataList/metadata[@name='assocfilepath']">
     147              <xslt:value-of disable-output-escaping="yes" select="/page/pageResponse/document/metadataList/metadata[@name='assocfilepath']" />
     148            </xslt:when>
     149            <xslt:otherwise>
     150              <xslt:value-of disable-output-escaping="yes" select="/page/pageResponse/document/documentNode[@nodeType='root']/metadataList/metadata[@name='assocfilepath']" />
     151            </xslt:otherwise>
     152              </xslt:choose>
    146153            </xslt:when>
    147154            <xslt:otherwise>
     
    238245            </xsl:when>
    239246            <xsl:when test="@type='source'">
    240                 <xslt:variable name="thisAssocfilepath">                   
    241                     <xslt:choose>
    242                         <xslt:when test="/page/pageResponse/document">
    243                             <xslt:value-of disable-output-escaping="yes" select="/page/pageResponse/document/metadataList/metadata[@name='assocfilepath']" />
    244                         </xslt:when>
    245                         <xslt:otherwise>
    246                             <xslt:value-of disable-output-escaping="yes" select="(.//metadataList)[last()]/metadata[@name='root_assocfilepath']" />
    247                         </xslt:otherwise>
    248                     </xslt:choose>                     
     247              <xslt:variable name="thisAssocfilepath">                 
     248                <xslt:choose>
     249                  <xslt:when test="/page/pageResponse/document">
     250                <xslt:choose>
     251                  <xslt:when test="/page/pageResponse/document/metadataList/metadata[@name='assocfilepath']">
     252                    <xslt:value-of disable-output-escaping="yes" select="/page/pageResponse/document/metadataList/metadata[@name='assocfilepath']" />
     253                  </xslt:when>
     254                  <xslt:otherwise>
     255                    <xslt:value-of disable-output-escaping="yes" select="/page/pageResponse/document/documentNode[@nodeType='root']/metadataList/metadata[@name='assocfilepath']" />
     256                  </xslt:otherwise>
     257                </xslt:choose>
     258                  </xslt:when>
     259                  <xslt:otherwise>
     260                <xslt:value-of disable-output-escaping="yes" select="(.//metadataList)[last()]/metadata[@name='root_assocfilepath']" />
     261                  </xslt:otherwise>
     262                </xslt:choose>                     
    249263                </xslt:variable>
    250264                <xsl:variable name="image_meta">
Note: See TracChangeset for help on using the changeset viewer.