6
# Copyright Ericsson AB 2009. All Rights Reserved.
6
# Copyright Ericsson AB 2009-2010. All Rights Reserved.
8
8
# The contents of this file are subject to the Erlang Public License,
9
9
# Version 1.1, (the "License"); you may not use this file except in
10
10
# compliance with the License. You should have received a copy of the
11
11
# Erlang Public License along with this software. If not, it can be
12
12
# retrieved online at http://www.erlang.org/.
14
14
# Software distributed under the License is distributed on an "AS IS"
15
15
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
16
16
# the License for the specific language governing rights and limitations
17
17
# under the License.
40
40
<div id="container">
41
41
<script id="js" type="text/javascript" language="JavaScript" src="{$topdocdir}/js/flipmenu/flipmenu.js"/>
42
42
<script id="js2" type="text/javascript" src="{$topdocdir}/js/erlresolvelinks.js"></script>
43
<script language="JavaScript" type="text/javascript">
44
<xsl:text disable-output-escaping="yes"><![CDATA[
46
function getWinHeight() {
48
if( typeof( window.innerHeight ) == 'number' ) {
50
myHeight = window.innerHeight;
51
} else if( document.documentElement && ( document.documentElement.clientWidth ||
52
document.documentElement.clientHeight ) ) {
53
//IE 6+ in 'standards compliant mode'
54
myHeight = document.documentElement.clientHeight;
55
} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
57
myHeight = document.body.clientHeight;
62
function setscrollpos() {
63
var objf=document.getElementById('loadscrollpos');
64
document.getElementById("leftnav").scrollTop = objf.offsetTop - getWinHeight()/2;
67
function addEvent(obj, evType, fn){
68
if (obj.addEventListener){
69
obj.addEventListener(evType, fn, true);
71
} else if (obj.attachEvent){
72
var r = obj.attachEvent("on"+evType, fn);
79
addEvent(window, 'load', setscrollpos);
43
83
<!-- Generate menu -->
44
84
<xsl:call-template name="menu">
45
85
<xsl:with-param name="chapnum" select="$chapnum"/>
780
<xsl:variable name="loadscrollpos">
782
<xsl:when test="$curModule = $cval">loadscrollpos</xsl:when>
783
<xsl:otherwise>no</xsl:otherwise>
734
787
<xsl:variable name="link_cval"><xsl:value-of select="translate($cval, '­', '')"/></xsl:variable>
737
790
<xsl:when test="$genFuncMenu = 'true'">
739
<li title="{$cval} " expanded="{$expanded}">
792
<li id="{$loadscrollpos}" title="{$cval} " expanded="{$expanded}">
740
793
<xsl:value-of select="$cval"/>
788
841
<xsl:when test="string-length($fname) > 0">
789
842
<li title="{$fname}">
790
843
<a href="{$basename}.html#{$fname}">
791
<xsl:value-of select="$fname"/>()
796
<li title="{name/nametext}">
797
<a href="{$basename}.html#{name/nametext}">
798
<xsl:value-of select="nametext"/>()
805
<xsl:when test="ancestor::erlref">
807
<xsl:variable name="tmpstring">
808
<xsl:value-of select="substring-before(substring-after(., '('), '->')"/>
811
<xsl:variable name="ustring">
813
<xsl:when test="string-length($tmpstring) > 0">
814
<xsl:call-template name="remove-paren">
815
<xsl:with-param name="string" select="$tmpstring"/>
844
<xsl:value-of select="$fname"/>()
819
<xsl:call-template name="remove-paren">
820
<xsl:with-param name="string" select="substring-after(., '(')"/>
849
<li title="{name/nametext}">
850
<a href="{$basename}.html#{name/nametext}">
851
<xsl:value-of select="nametext"/>()
826
<xsl:variable name="arity">
827
<xsl:call-template name="calc-arity">
828
<xsl:with-param name="string" select="substring-before($ustring, ')')"/>
829
<xsl:with-param name="no-of-pars" select="0"/>
832
<xsl:variable name="fname">
833
<xsl:value-of select="substring-before(., '(')"/>
835
<li title="{$fname}-{$arity}">
836
<a href="{$basename}.html#{$fname}-{$arity}">
837
<xsl:value-of select="$fname"/>/<xsl:value-of select="$arity"/>
858
<xsl:when test="ancestor::erlref">
860
<xsl:variable name="tmpstring">
861
<xsl:value-of select="substring-before(substring-after(., '('), '->')"/>
864
<xsl:variable name="ustring">
866
<xsl:when test="string-length($tmpstring) > 0">
867
<xsl:call-template name="remove-paren">
868
<xsl:with-param name="string" select="$tmpstring"/>
872
<xsl:call-template name="remove-paren">
873
<xsl:with-param name="string" select="substring-after(., '(')"/>
879
<xsl:variable name="arity">
880
<xsl:call-template name="calc-arity">
881
<xsl:with-param name="string" select="substring-before($ustring, ')')"/>
882
<xsl:with-param name="no-of-pars" select="0"/>
886
<xsl:variable name="fname">
887
<xsl:variable name="fname1">
888
<xsl:value-of select="substring-before(., '(')"/>
890
<xsl:variable name="fname2">
891
<xsl:value-of select="substring-after($fname1, 'erlang:')"/>
894
<xsl:when test="string-length($fname2) > 0">
895
<xsl:value-of select="$fname2"/>
898
<xsl:value-of select="$fname1"/>
903
<li title="{$fname}-{$arity}">
904
<a href="{$basename}.html#{$fname}-{$arity}">
905
<xsl:value-of select="$fname"/>/<xsl:value-of select="$arity"/>
1121
1190
<a name="{substring-before(nametext, '(')}"><span class="bold_code"><xsl:value-of select="ret"/><xsl:text> </xsl:text><xsl:value-of select="nametext"/></span></a><br/>
1123
1192
<xsl:when test="ancestor::erlref">
1124
<a name="{substring-before(., '(')}-{$arity}"><span class="bold_code"><xsl:value-of select="."/></span></a><br/>
1193
<xsl:variable name="fname">
1194
<xsl:variable name="fname1">
1195
<xsl:value-of select="substring-before(., '(')"/>
1197
<xsl:variable name="fname2">
1198
<xsl:value-of select="substring-after($fname1, 'erlang:')"/>
1201
<xsl:when test="string-length($fname2) > 0">
1202
<xsl:value-of select="$fname2"/>
1205
<xsl:value-of select="$fname1"/>
1209
<a name="{$fname}-{$arity}"><span class="bold_code"><xsl:value-of select="."/></span></a><br/>
1129
1213
</xsl:template>
1459
1544
</xsl:template>
1461
1547
<xsl:template name="remove-paren">
1462
1548
<xsl:param name="string"/>
1550
<xsl:variable name="str1">
1551
<xsl:call-template name="remove-paren-1">
1552
<xsl:with-param name="string" select="$string"/>
1553
<xsl:with-param name="start">(</xsl:with-param>
1554
<xsl:with-param name="end">)</xsl:with-param>
1555
</xsl:call-template>
1558
<xsl:variable name="str2">
1559
<xsl:call-template name="remove-paren-1">
1560
<xsl:with-param name="string" select="$str1"/>
1561
<xsl:with-param name="start">{</xsl:with-param>
1562
<xsl:with-param name="end">}</xsl:with-param>
1563
</xsl:call-template>
1566
<xsl:variable name="str3">
1567
<xsl:call-template name="remove-paren-1">
1568
<xsl:with-param name="string" select="$str2"/>
1569
<xsl:with-param name="start">[</xsl:with-param>
1570
<xsl:with-param name="end">]</xsl:with-param>
1571
</xsl:call-template>
1574
<xsl:value-of select="$str3"/>
1579
<xsl:template name="remove-paren-1">
1580
<xsl:param name="string"/>
1581
<xsl:param name="start"/>
1582
<xsl:param name="end"/>
1464
<xsl:variable name="bstring">
1465
<xsl:value-of select="substring-before($string, '(')"/>
1584
<xsl:variable name="tmp1">
1585
<xsl:value-of select="substring-before($string, $start)"/>
1466
1586
</xsl:variable>
1469
<xsl:when test="string-length($bstring) > 0">
1470
<xsl:variable name="astring">
1471
<xsl:value-of select="substring-after($string, ')')"/>
1589
<xsl:when test="string-length($tmp1) > 0 or starts-with($string, $start)">
1590
<xsl:variable name="tmp2">
1591
<xsl:value-of select="substring-after($string, $end)"/>
1472
1592
</xsl:variable>
1473
1593
<xsl:variable name="retstring">
1474
1594
<xsl:call-template name="remove-paren">
1475
<xsl:with-param name="string" select="$astring"/>
1595
<xsl:with-param name="string" select="$tmp2"/>
1476
1596
</xsl:call-template>
1477
1597
</xsl:variable>
1478
<xsl:value-of select="concat($bstring, $retstring)"/>
1598
<xsl:value-of select="concat(concat($tmp1, 'x'), $retstring)"/>
1480
1600
<xsl:otherwise>
1481
1601
<xsl:value-of select="$string"/>
1482
1602
</xsl:otherwise>
1484
1605
</xsl:template>
1486
1607
</xsl:stylesheet>