Lines 9-15
Link Here
|
9 |
<xsl:import href="MARC21slimUtils.xsl"/> |
9 |
<xsl:import href="MARC21slimUtils.xsl"/> |
10 |
<xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" /> |
10 |
<xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" /> |
11 |
<xsl:key name="item-by-status" match="items:item" use="items:status"/> |
11 |
<xsl:key name="item-by-status" match="items:item" use="items:status"/> |
12 |
<xsl:key name="item-by-status-and-branch" match="items:item" use="concat(items:status, ' ', items:holdingbranch)"/> |
12 |
<xsl:key name="item-by-status-and-branch-holding" match="items:item" use="concat(items:status, ' ', items:holdingbranch)"/> |
|
|
13 |
<xsl:key name="item-by-status-and-branch-home" match="items:item" use="concat(items:status, ' ', items:homebranch)"/> |
13 |
|
14 |
|
14 |
<xsl:template match="/"> |
15 |
<xsl:template match="/"> |
15 |
<xsl:apply-templates/> |
16 |
<xsl:apply-templates/> |
Lines 19-24
Link Here
|
19 |
<!-- Option: Display Alternate Graphic Representation (MARC 880) --> |
20 |
<!-- Option: Display Alternate Graphic Representation (MARC 880) --> |
20 |
<xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/> |
21 |
<xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/> |
21 |
|
22 |
|
|
|
23 |
<xsl:variable name="OPACResultsBranchXSLT" select="marc:sysprefs/marc:syspref[@name='OPACResultsBranchXSLT']"/> |
22 |
<xsl:variable name="hidelostitems" select="marc:sysprefs/marc:syspref[@name='hidelostitems']"/> |
24 |
<xsl:variable name="hidelostitems" select="marc:sysprefs/marc:syspref[@name='hidelostitems']"/> |
23 |
<xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/> |
25 |
<xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/> |
24 |
<xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/> |
26 |
<xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/> |
Lines 1028-1050
Link Here
|
1028 |
select="key('item-by-status', 'available')"/> |
1030 |
select="key('item-by-status', 'available')"/> |
1029 |
<xsl:choose> |
1031 |
<xsl:choose> |
1030 |
<xsl:when test="$singleBranchMode=1"> |
1032 |
<xsl:when test="$singleBranchMode=1"> |
1031 |
<xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]"> |
1033 |
<xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]"> |
1032 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<xsl:value-of select="items:itemcallnumber"/>]</xsl:if> |
1034 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<xsl:value-of select="items:itemcallnumber"/>]</xsl:if> |
1033 |
<xsl:text> (</xsl:text> |
1035 |
<xsl:text> (</xsl:text> |
1034 |
<xsl:value-of select="count(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch)))"/> |
1036 |
<xsl:value-of select="count(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch)))"/> |
1035 |
<xsl:text>)</xsl:text> |
1037 |
<xsl:text>)</xsl:text> |
1036 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose> |
1038 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose> |
1037 |
</xsl:for-each> |
1039 |
</xsl:for-each> |
1038 |
</xsl:when> |
1040 |
</xsl:when> |
1039 |
<xsl:otherwise> |
1041 |
<xsl:otherwise> |
1040 |
<xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:holdingbranch))[1])]"> |
1042 |
<xsl:choose> |
1041 |
<xsl:value-of select="items:holdingbranch"/> |
1043 |
<xsl:when test="$OPACResultsBranchXSLT='homebranch'"> |
1042 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<xsl:value-of select="items:itemcallnumber"/>]</xsl:if> |
1044 |
<xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]"> |
1043 |
<xsl:text> (</xsl:text> |
1045 |
<xsl:value-of select="items:homebranch"/> |
1044 |
<xsl:value-of select="count(key('item-by-status-and-branch', concat(items:status, ' ', items:holdingbranch)))"/> |
1046 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<xsl:value-of select="items:itemcallnumber"/>]</xsl:if> |
1045 |
<xsl:text>)</xsl:text> |
1047 |
<xsl:text> (</xsl:text> |
1046 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose> |
1048 |
<xsl:value-of select="count(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch)))"/> |
1047 |
</xsl:for-each> |
1049 |
<xsl:text>)</xsl:text> |
|
|
1050 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose> |
1051 |
</xsl:for-each> |
1052 |
</xsl:when> |
1053 |
<xsl:when test="$OPACResultsBranchXSLT='holdingbranch'"> |
1054 |
<xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-holding', concat(items:status, ' ', items:holdingbranch))[1])]"> |
1055 |
<xsl:value-of select="items:holdingbranch"/> |
1056 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<xsl:value-of select="items:itemcallnumber"/>]</xsl:if> |
1057 |
<xsl:text> (</xsl:text> |
1058 |
<xsl:value-of select="count(key('item-by-status-and-branch-holding', concat(items:status, ' ', items:holdingbranch)))"/> |
1059 |
<xsl:text>)</xsl:text> |
1060 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose> |
1061 |
</xsl:for-each> |
1062 |
</xsl:when> |
1063 |
</xsl:choose> |
1048 |
</xsl:otherwise> |
1064 |
</xsl:otherwise> |
1049 |
</xsl:choose> |
1065 |
</xsl:choose> |
1050 |
</span> |
1066 |
</span> |
Lines 1062-1077
Link Here
|
1062 |
<xsl:when test="count(key('item-by-status', 'reference'))>0"> |
1078 |
<xsl:when test="count(key('item-by-status', 'reference'))>0"> |
1063 |
<span class="available"> |
1079 |
<span class="available"> |
1064 |
<b><xsl:text>Copies available for reference: </xsl:text></b> |
1080 |
<b><xsl:text>Copies available for reference: </xsl:text></b> |
1065 |
<xsl:variable name="reference_items" |
1081 |
<xsl:variable name="reference_items" select="key('item-by-status', 'reference')"/> |
1066 |
select="key('item-by-status', 'reference')"/> |
1082 |
|
1067 |
<xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:holdingbranch))[1])]"> |
1083 |
<xsl:choose> |
1068 |
<xsl:value-of select="items:holdingbranch"/> |
1084 |
<xsl:when test="$OPACResultsBranchXSLT='homebranch'"> |
1069 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<xsl:value-of select="items:itemcallnumber"/>]</xsl:if> |
1085 |
<xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]"> |
1070 |
<xsl:text> (</xsl:text> |
1086 |
<xsl:value-of select="items:homebranch"/> |
1071 |
<xsl:value-of select="count(key('item-by-status-and-branch', concat(items:status, ' ', items:holdingbranch)))"/> |
1087 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<xsl:value-of select="items:itemcallnumber"/>]</xsl:if> |
1072 |
<xsl:text>)</xsl:text> |
1088 |
<xsl:text> (</xsl:text> |
1073 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose> |
1089 |
<xsl:value-of select="count(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch)))"/> |
1074 |
</xsl:for-each> |
1090 |
<xsl:text>)</xsl:text> |
|
|
1091 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose> |
1092 |
</xsl:for-each> |
1093 |
</xsl:when> |
1094 |
<xsl:when test="$OPACResultsBranchXSLT='holdingbranch'"> |
1095 |
<xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-status-and-branch-holding', concat(items:status, ' ', items:holdingbranch))[1])]"> |
1096 |
<xsl:value-of select="items:holdingbranch"/> |
1097 |
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<xsl:value-of select="items:itemcallnumber"/>]</xsl:if> |
1098 |
<xsl:text> (</xsl:text> |
1099 |
<xsl:value-of select="count(key('item-by-status-and-branch-holding', concat(items:status, ' ', items:holdingbranch)))"/> |
1100 |
<xsl:text>)</xsl:text> |
1101 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose> |
1102 |
</xsl:for-each> |
1103 |
</xsl:when> |
1104 |
</xsl:choose> |
1075 |
</span> |
1105 |
</span> |
1076 |
</xsl:when> |
1106 |
</xsl:when> |
1077 |
</xsl:choose> |
1107 |
</xsl:choose> |
1078 |
- |
|
|