Changeset 12029
- Timestamp:
- 2006-07-06T12:51:41+12:00 (18 years ago)
- Location:
- trunk/gsdl3/web/interfaces/default/transform
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/web/interfaces/default/transform/classifiertools.xsl
r12015 r12029 50 50 <table width='100%'> 51 51 <xsl:for-each select='documentNode'> 52 <tr valign='top'><xsl:apply-templates select='.'><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='serviceName' select='$serviceName'/></xsl:apply-templates></tr> 52 <tr valign='top'><xsl:call-template name="documentNodeWrapper"> 53 <xsl:with-param name='collName' select='$collName'/> 54 <xsl:with-param name='serviceName' select='$serviceName'/> 55 </xsl:call-template></tr> 53 56 </xsl:for-each> 54 57 </table> … … 62 65 <xsl:param name="serviceName"/> 63 66 <table width='100%'> 64 <xsl:for-each select='classifierNode|documentNode'> 65 <tr valign='top'><xsl:apply-templates select='.'><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='serviceName' select='$serviceName'/></xsl:apply-templates></tr> 66 <xsl:if test='name()="classifierNode" and (child::classifierNode or child::documentNode)'> 67 <!--recurse into the children--> 68 <tr valign='top'><td><xsl:text> </xsl:text></td><xsl:apply-templates select='.' mode='process-all-children'><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='serviceName' select='$serviceName'/></xsl:apply-templates></tr> 69 </xsl:if> 70 </xsl:for-each> 67 <xsl:call-template name="processNodeChildren"> 68 <xsl:with-param name='collName' select='$collName'/> 69 <xsl:with-param name='serviceName' select='$serviceName'/> 70 </xsl:call-template> 71 71 </table> 72 72 <xsl:call-template name="dividerBar"/> 73 73 </xsl:template> 74 <!-- recursively process all nodes and documents -->75 74 75 <!-- this is a wrapper node, which the interface can use to add stuff into the query results that isn't part of and doesn't depend on the documentNode template which may come from the collection --> 76 <xsl:template name="documentNodeWrapper"> 77 <xsl:param name="collName"/> 78 <xsl:param name="serviceName"/> 79 <xsl:if test="$berryBaskets = 'true'"> 80 <xsl:call-template name="addBerry"> 81 <xsl:with-param name="collName" select="$collName"/> 82 </xsl:call-template> 83 </xsl:if> 84 <xsl:apply-templates select="."> 85 <xsl:with-param name="collName" select="$collName"/> 86 <xsl:with-param name="serviceName" select="$serviceName"/> 87 </xsl:apply-templates> 88 </xsl:template> 89 76 90 <xsl:template match="documentNode"> 77 91 <xsl:param name="collName"/> 78 92 <xsl:param name="serviceName"/> 79 <!--TODO: add berry basket switch --> 80 <td valign="top"><img class='pick' id="{$collName}:{@nodeID}" src="interfaces/default/images/berry3.png" alt="in basket" width="15" height="15" border="0"/></td><td><a href="{$library_name}?a=d&c={$collName}&d={@nodeID}&dt={@docType}&p.a=b&p.s={$serviceName}"><xsl:apply-templates select="." mode="displayNodeIcon"/></a></td><td align='left'><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></td> 93 <td><a href="{$library_name}?a=d&c={$collName}&d={@nodeID}&dt={@docType}&p.a=b&p.s={$serviceName}"><xsl:apply-templates select="." mode="displayNodeIcon"/></a></td><td align='left'><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></td> 81 94 </xsl:template> 95 82 96 83 97 <!-- icon + title template--> … … 100 114 101 115 102 <!-- processing for the recursive bit --> 103 <!-- if interleave=true, process all child nodes and documents, else just do nodes --> 104 105 116 <!-- processing for the recursive bit --> 106 117 <xsl:template match="classifierNode" mode="process-all-children"> 107 118 <xsl:param name="collName"/> 108 119 <xsl:param name="serviceName"/> 109 <!-- only do this if there are children --> 110 <xsl:if test="classifierNode|documentNode"> 111 <td> 112 <table> 113 <xsl:for-each select='classifierNode|documentNode'> 114 <tr valign='top'><xsl:apply-templates select='.'><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='serviceName' select='$serviceName'/></xsl:apply-templates></tr> 115 <xsl:if test='name()="classifierNode" and (child::classifierNode or child::documentNode)'> 116 <tr valign='top'><td><xsl:text> </xsl:text></td><xsl:apply-templates select='.' mode='process-all-children'><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='serviceName' select='$serviceName'/></xsl:apply-templates></tr> 117 </xsl:if> 118 </xsl:for-each> 120 <td> 121 <table> 122 <xsl:call-template name="processNodeChildren"> 123 <xsl:with-param name='collName' select='$collName'/> 124 <xsl:with-param name='serviceName' select='$serviceName'/> 125 </xsl:call-template> 119 126 </table> 120 </td> 121 </xsl:if> 127 </td> 122 128 </xsl:template> 123 129 130 <xsl:template name="processNodeChildren"> 131 <xsl:param name="collName"/> 132 <xsl:param name="serviceName"/> 133 <xsl:for-each select='classifierNode|documentNode'> 134 <xsl:choose><xsl:when test="name()='documentNode'"> 135 <tr valign='top'> 136 <xsl:call-template name="documentNodeWrapper"> 137 <xsl:with-param name='collName' select='$collName'/> 138 <xsl:with-param name='serviceName' select='$serviceName'/> 139 </xsl:call-template> 140 </tr> 141 </xsl:when> 142 <xsl:otherwise> 143 <tr valign='top'> 144 <xsl:apply-templates select='.'> 145 <xsl:with-param name='collName' select='$collName'/> 146 <xsl:with-param name='serviceName' select='$serviceName'/> 147 </xsl:apply-templates> 148 </tr> 149 <xsl:if test="child::classifierNode or child::documentNode"> 150 <!--recurse into the children--> 151 <tr valign='top'><td><xsl:text> </xsl:text></td> 152 <xsl:apply-templates select='.' mode='process-all-children'> 153 <xsl:with-param name='collName' select='$collName'/> 154 <xsl:with-param name='serviceName' select='$serviceName'/> 155 </xsl:apply-templates> 156 </tr> 157 </xsl:if> 158 </xsl:otherwise> 159 </xsl:choose> 160 </xsl:for-each> 161 </xsl:template> 124 162 </xsl:stylesheet> -
trunk/gsdl3/web/interfaces/default/transform/querytools.xsl
r12015 r12029 100 100 <table> 101 101 <xsl:for-each select="documentNodeList/documentNode"> 102 <!--<tr><td><a href="" onClick="addToBasket('{$collName}:{@nodeID}'); return false;">pick</a></td>--> 103 <!--TODO: add berry basket switch --> 104 <tr><td valign="top"><img class='pick' id="{$collName}:{@nodeID}" src="interfaces/default/images/berry3.png" alt="in basket" width="15" height="15" border="0"/></td> 105 106 <xsl:apply-templates select="."> 102 <tr> 103 <xsl:call-template name="documentNodeWrapper"> 107 104 <xsl:with-param name="collName" select="$collName"/> 108 105 <xsl:with-param name="serviceName" select="/page/pageResponse/service/@name"/> 109 </xsl: apply-templates>106 </xsl:call-template> 110 107 </tr> 111 108 </xsl:for-each> 112 109 </table> 113 110 </xsl:template> 111 112 <!-- this is a wrapper node, which the interface can use to add stuff into the query results that isn't part of and doesn't depend on the documentNode template which may come from the collection --> 113 <xsl:template name="documentNodeWrapper"> 114 <xsl:param name="collName"/> 115 <xsl:param name="serviceName"/> 116 <xsl:if test="$berryBaskets = 'true'"> 117 <xsl:call-template name="addBerry"> 118 <xsl:with-param name="collName" select="$collName"/> 119 </xsl:call-template> 120 </xsl:if> 121 <xsl:apply-templates select="."> 122 <xsl:with-param name="collName" select="$collName"/> 123 <xsl:with-param name="serviceName" select="$serviceName"/> 124 </xsl:apply-templates> 125 </xsl:template> 114 126 115 127 116 128 <!-- the default doc node template for the query results --> 117 129 <!-- eventually shouldn't need sib arg here -->
Note:
See TracChangeset
for help on using the changeset viewer.