Changeset 26498


Ignore:
Timestamp:
2012-11-22T14:00:37+13:00 (9 years ago)
Author:
sjm84
Message:

Document metadata in on the classifier page is now stored in the gs variable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/transform/javascript-global-setup.xsl

    r26211 r26498  
    9393            </xsl:for-each>
    9494           
     95            <xsl:for-each select="/page/pageResponse/classifier/documentNode">
     96                {
     97                <xsl:text disable-output-escaping="yes">var nodeID = "</xsl:text><xsl:value-of select="@nodeID"/><xsl:text disable-output-escaping="yes">";</xsl:text>
     98                <xsl:text disable-output-escaping="yes">var emptyLang = "";</xsl:text>
     99                <xsl:text disable-output-escaping="yes">var metaList = new Array();</xsl:text>
     100                <xsl:for-each select="metadataList/metadata">
     101                    <xsl:text disable-output-escaping="yes">name = "</xsl:text><xsl:value-of select="@name"/><xsl:text disable-output-escaping="yes">";</xsl:text>
     102                    <xsl:text disable-output-escaping="yes">value = "</xsl:text><xsl:value-of disable-output-escaping="yes" select="util:escapeNewLinesAndQuotes(.)"/><xsl:text disable-output-escaping="yes">";</xsl:text>
     103                    <xsl:text disable-output-escaping="yes">lang = "</xsl:text><xsl:value-of select="@lang"/><xsl:text disable-output-escaping="yes">";</xsl:text>
     104                    addMetadataToList(name, value, metaList, lang);
     105                </xsl:for-each>
     106                addMetadataToList(nodeID, metaList, gs.documentMetadata, emptyLang);
     107                }
     108            </xsl:for-each>
     109           
    95110            <xsl:text disable-output-escaping="yes">addMetadataToList("docType", "</xsl:text><xsl:value-of select="/page/pageResponse/document/@docType"/><xsl:text disable-output-escaping="yes">", gs.documentMetadata, "</xsl:text><xsl:value-of select="@lang"/><xsl:text disable-output-escaping="yes">");</xsl:text>
    96111        </script>
Note: See TracChangeset for help on using the changeset viewer.