home *** CD-ROM | disk | FTP | other *** search
Wrap
<?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- Edugen XSL Stylesheets V1.0 ======================================= File glossary.xsl for GeoD This file is part of the Edugen XSL Stylesheets. Copyright (c) 2002 WWL Corp. - A Subsidiary of John Wiley & Sons, Inc. ========================================================================= --> <xsl:output method="html" indent="no"/> <!-- version --> <xsl:param name="version">1.0</xsl:param> <!-- dynamic param --> <xsl:param name="selector" select="glossary"/> <xsl:variable name="courseHttpPath"></xsl:variable> <xsl:variable name="edugenHttpPath"></xsl:variable> <xsl:variable name="courseFilePath"></xsl:variable> <xsl:variable name="edugenFilePath"></xsl:variable> <xsl:variable name="courseHttpPath"><?11?>?sid=<?1003?>&msg=3&course=<?1008?>&file=</xsl:variable> <xsl:variable name="edugenHttpPath"><?11?>?sid=global&msg=300&file=</xsl:variable> <xsl:variable name="courseFilePath"><?303?></xsl:variable> <xsl:variable name="edugenFilePath"><?301?></xsl:variable> <xsl:variable name="file"><xsl:value-of select="/*/@id"/>.xml</xsl:variable> <xsl:variable name="filebase"><xsl:value-of select="/*/@xml:base"/></xsl:variable> <xsl:attribute-set name="body_attributes"> <!-- <xsl:attribute name="bgcolor">#ffffff</xsl:attribute> --> <xsl:attribute name="text">#000000</xsl:attribute> <xsl:attribute name="leftmargin">5</xsl:attribute> <xsl:attribute name="topmargin">5</xsl:attribute> <xsl:attribute name="marginwidth">5</xsl:attribute> <xsl:attribute name="marginheight">5</xsl:attribute> <xsl:attribute name="onresize">javascript:if(navigator.appName.indexOf('Netscape')!=-1)self.location.reload();</xsl:attribute> <xsl:attribute name="onload">javascript:doOnload();</xsl:attribute> <xsl:attribute name="onunload">javascript:doOnunload();</xsl:attribute> </xsl:attribute-set> <!-- ============= root =============================== --> <xsl:template match="/"> <html> <xsl:comment> Copyright (c) 2002 WWL Corp. - A Subsidiary of John Wiley & Sons, Inc. Thank you for examining our code </xsl:comment> <head> <title> <xsl:choose> <xsl:when test="$selector/title"><xsl:value-of select="$selector/title"/></xsl:when> <xsl:otherwise>Page</xsl:otherwise> </xsl:choose> </title> <meta name="generator" content="Edugen XSL Stylesheets V{$version}"/> <link rel="STYLESHEET" type="text/css" href="{$courseHttpPath}media/content/css/style<?1007?>.css"/> <link rel="STYLESHEET" type="text/css" href="{$courseHttpPath}media/content/css/font<?1006?>.css"/> <script type="text/javascript" language="JavaScript" src="{$edugenHttpPath}media/js/button.js"></script> <!-- <script type="text/javascript" language="JavaScript" src="{$edugenHttpPath}media/js/overlay.js"></script> --> <script type="text/javascript" language="JavaScript" src="{$edugenHttpPath}media/js/misc.js"></script> <script type="text/javascript" language="JavaScript" src="{$edugenHttpPath}media/js/windows.js"></script> <script type="text/javascript" language="JavaScript"><![CDATA[ function doOnload() { } function doOnunload() { closeWindows(); } var cur_href,cur_id,cur_xsl,cur_url; function glossaryReplace(in_base,in_file,in_href,in_role) { top.frames.words.location = "<?11?>?sid=<?1003?>&msg=4" + "&xsl=/media/glossary/glossary.xsl" + "&name=selector" + "&select=letter" + "&xml=/" + in_base + in_href; top.frames.entry.location = "<?11?>?sid=<?1003?>&msg=4" + "&xsl=/media/glossary/glossary.xsl" + "&name=selector" + "&select=letter/entry[1]" + "&xml=/" + in_base + in_href; } function termReplace(in_base,in_file,in_href) { top.frames.entry.location = "<?11?>?sid=<?1003?>&msg=4" + "&xsl=/media/glossary/glossary.xsl" + "&name=selector" + "&select=letter/entry[@id%3D'" + in_href + "']" + "&xml=/" + in_base + in_file; } function viewImage(in_base,in_file,in_href,in_name) { cur_url = "<?11?>?sid=<?1003?>&msg=4" + "&xsl=/media/glossary/glos_ill.xsl" + "&name=selector" + "&select=letter/entry[@id%3D'" + in_href + "']/illustration/image[@name%3D'" + in_name + "']" + "&xml=/" + in_base + in_file; <!-- var win_param = "width=300,height=400,left=100,top=100,resizable=yes,copyhistory=no,directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no";--> var win_param = "left=100,top=100,resizable=yes,copyhistory=no,directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no"; if (arguments[4]!="") { var win_width = "width=" + arguments[4]; } else { var win_width = "width=300"; } if (arguments[5]!="") { var win_height = "height=" + arguments[5]; } else { var win_height = "height=400"; } win_param = win_param + "," + win_width + "," + win_height; createWindow(cur_url,"illustration",win_param) } ]]></script> </head> <body xsl:use-attribute-sets="body_attributes"> <xsl:attribute name="bgcolor"> <xsl:choose> <xsl:when test="name($selector)='glossary'">#FFDEBD</xsl:when> <xsl:otherwise>#ffffff</xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:apply-templates select="$selector"/> </body> </html> </xsl:template> <!-- ====== end of root =============================== --> <!-- ============= glossary =============================== --> <xsl:template match="glossary"> <table align="center" bgcolor="#FFDEBD" cellpadding="0" cellspacing="0" border="0" width="100%" height="100%"> <tr> <xsl:for-each select="letter"> <td><span class="letter"><xsl:apply-templates select="." mode="letter"/></span></td> </xsl:for-each> </tr> </table> <!-- <nobr> <xsl:for-each select="letter"> <xsl:apply-templates select="." mode="letter"/> </xsl:for-each> </nobr> --> </xsl:template> <!-- ====== end of glossary =============================== --> <!-- ============= letter =============================== --> <xsl:template match="letter"> <xsl:for-each select="entry"> <span class="words"><xsl:apply-templates select="term" mode="term_link"/></span> </xsl:for-each> </xsl:template> <xsl:template match="letter" mode="letter"> <xsl:apply-templates/> </xsl:template> <!-- ====== end of letter =============================== --> <!-- ============= entry =============================== --> <xsl:template match="entry"> <table cellspacing="2"> <tr> <td align="left" valign="middle"><xsl:apply-templates select="illustration"/> <xsl:apply-templates select="audio"/> <span class="glterm"><xsl:apply-templates select="term"/></span></td> </tr> <tr> <td align="left"><span class="gldefinition"><xsl:apply-templates select="definition"/></span></td> </tr> </table> <!--<p><xsl:apply-templates select="term"/></p>--> <!--<p><xsl:apply-templates select="definition"/></p>--> </xsl:template> <!-- ====== end of entry =============================== --> <!-- ============= term =============================== --> <xsl:template match="term"> <span style="font-weight:bold;"><xsl:apply-templates/></span> </xsl:template> <xsl:template match="term" mode="term_link"> <xsl:variable name="base"><xsl:value-of select="/*/@xml:base"/></xsl:variable> <a name="{../@id}"></a><a href="javascript:termReplace('{$base}','{$file}','{../@id}');"><xsl:apply-templates/></a><br/> </xsl:template> <!-- ====== end of term =============================== --> <!-- ============= definition =============================== --> <xsl:template match="definition"> <xsl:apply-templates/> </xsl:template> <!-- ====== end of definition =============================== --> <xsl:template match="definition/para"> <p class="gltext"> <xsl:if test="@align!=''"><xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute></xsl:if> <xsl:call-template name="anchorname"/> <xsl:call-template name="anchor"/> </p> </xsl:template> <xsl:template match="definition/title"> <p class="gltitle"> <xsl:if test="@align!=''"><xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute></xsl:if> <xsl:call-template name="anchorname"/> <xsl:call-template name="anchor"/> </p> </xsl:template> <!-- ============= anchor =============================== --> <xsl:template name="anchor"> <xsl:variable name="base"> <xsl:choose> <xsl:when test="@xml:base"><xsl:value-of select="@xml:base"/></xsl:when> <xsl:otherwise><xsl:value-of select="$filebase"/></xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:choose> <xsl:when test="@role"> <xsl:choose> <xsl:when test="@role='glossary'"> <a href="javascript:glossaryReplace('{$base}','{$file}','{@xlink:href}','{@role}');"> <xsl:attribute name="class"> <xsl:choose> <xsl:when test="@class"><xsl:value-of select="@class"/></xsl:when> <xsl:otherwise>letter</xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:apply-templates/> </a> </xsl:when> <xsl:otherwise> <a href="javascript:winOpen('{$base}','{$file}','{@xlink:href}','{@role}');"> <xsl:attribute name="class"> <xsl:choose> <xsl:when test="@class"><xsl:value-of select="@class"/></xsl:when> <xsl:otherwise>link</xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:apply-templates/> </a> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="@xlink:actuate='new'"> <a href="{@xlink:href}" target="_blank" class="link"><xsl:apply-templates/></a> </xsl:when> <xsl:when test="@xlink:actuate='replace'"> <a href="javascript:gotoPage('{$base}','{$file}','{@xlink:href}');" class="link"><xsl:apply-templates/></a> </xsl:when> <xsl:otherwise><xsl:apply-templates/></xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="anchor_attrib"> <xsl:choose> <xsl:when test="@xlink:href"> <xsl:choose> <xsl:when test="@xlink:actuate='new'">javascript:overWinOpen('overlay','<xsl:value-of select="substring-after(@xlink:href,'#')"/>','<xsl:value-of select="$file"/>','overlay.xsl');</xsl:when> <xsl:when test="@xlink:actuate='embed'"></xsl:when> <xsl:when test="@xlink:actuate='replace'"></xsl:when> <xsl:otherwise></xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise></xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="anchorname"> <xsl:param name="process_node" select="."/> <xsl:choose> <xsl:when test="$process_node/@id!=''"> <a name="{@id}"></a> </xsl:when> <xsl:otherwise></xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="parent_anchorname"> <xsl:choose> <xsl:when test="../@id!=''"> <a name="{../@id}"></a> </xsl:when> <xsl:otherwise></xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="a"> <xsl:call-template name="anchor"/> </xsl:template> <!-- ====== end of anchor =============================== --> <!-- ============= illustration =============================== --> <xsl:template match="illustration"> <xsl:variable name="base"> <xsl:choose> <xsl:when test="@xml:base"><xsl:value-of select="@xml:base"/></xsl:when> <xsl:otherwise><xsl:value-of select="$filebase"/></xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="width"><xsl:value-of select="@width"/></xsl:variable> <xsl:variable name="height"><xsl:value-of select="@height"/></xsl:variable> <xsl:choose> <xsl:when test="image/@src!=''"> <xsl:for-each select="image"> <a href="javascript:viewImage('{$base}','{$file}','{../../@id}','{@name}','{$width}','{$height}');"><img src="{$courseFilePath}media/glossary/{@preview}" height="70" width="70" alt="View" border="0" align="absmiddle"/></a> </xsl:for-each> </xsl:when> <xsl:otherwise> <a href="javascript:alert('Not implemented yet!');"><img src="{$courseFilePath}media/glossary/graphics/pict.gif" width="23" height="20" alt="View" border="0" align="middle"/></a> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="illustration/alternative"> </xsl:template> <!-- ====== end of illustration =============================== --> <!-- ============= audio =============================== --> <xsl:template match="audio"> <xsl:apply-templates/> </xsl:template> <xsl:template match="audio/alternative"> </xsl:template> <!-- ====== end of audio =============================== --> <!-- ============== blob =============================== --> <xsl:template match="image"> <img src="{$courseFilePath}media/glossary/{@src}"> <xsl:if test="@width"><xsl:copy-of select="@width"/></xsl:if> <xsl:if test="@height"><xsl:copy-of select="@height"/></xsl:if> <xsl:if test="@border"><xsl:copy-of select="@border"/></xsl:if> <xsl:if test="@align"><xsl:copy-of select="@align"/></xsl:if> <xsl:if test="@vspace"><xsl:copy-of select="@vspace"/></xsl:if> <xsl:if test="@hspace"><xsl:copy-of select="@hspace"/></xsl:if> <xsl:if test="@usemap"><xsl:copy-of select="@usemap"/></xsl:if> <xsl:if test="@alt"><xsl:copy-of select="@alt"/></xsl:if> </img> </xsl:template> <xsl:template match="area"> <area> <xsl:if test="@alt"><xsl:attribute name="alt"><xsl:value-of select="@alt"/></xsl:attribute></xsl:if> <xsl:if test="@shape"><xsl:attribute name="shape"><xsl:value-of select="@shape"/></xsl:attribute></xsl:if> <xsl:if test="@coords"><xsl:attribute name="coords"><xsl:value-of select="@coords"/></xsl:attribute></xsl:if> <xsl:if test="@xlink:href"> <xsl:attribute name="href"> <xsl:call-template name="anchor2"/> </xsl:attribute> </xsl:if> </area> </xsl:template> <xsl:template match="flash"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"> <xsl:if test="@width"><xsl:copy-of select="@width"/></xsl:if> <xsl:if test="@height"><xsl:copy-of select="@height"/></xsl:if> <xsl:if test="@border"><xsl:copy-of select="@border"/></xsl:if> <xsl:element name="param"> <xsl:attribute name="name">movie</xsl:attribute> <xsl:attribute name="value"><xsl:value-of select="$courseFilePath"/>media/glossary/<xsl:value-of select="@src"/></xsl:attribute> </xsl:element> <xsl:if test="@loop!=''"> <xsl:element name="param"> <xsl:attribute name="name">loop</xsl:attribute> <xsl:attribute name="value"><xsl:value-of select="@loop"/></xsl:attribute> </xsl:element> </xsl:if> <xsl:if test="@menu!=''"> <xsl:element name="param"> <xsl:attribute name="name">menu</xsl:attribute> <xsl:attribute name="value"><xsl:value-of select="@menu"/></xsl:attribute> </xsl:element> </xsl:if> <xsl:if test="@quality!=''"> <xsl:element name="param"> <xsl:attribute name="name">quality</xsl:attribute> <xsl:attribute name="value"><xsl:value-of select="@quality"/></xsl:attribute> </xsl:element> </xsl:if> <xsl:if test="@bgcolor!=''"> <xsl:element name="param"> <xsl:attribute name="name">bgcolor</xsl:attribute> <xsl:attribute name="value"><xsl:value-of select="@bgcolor"/></xsl:attribute> </xsl:element> </xsl:if> <embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" swliveconnect="true"> <xsl:attribute name="src"><xsl:value-of select="$courseFilePath"/>media/glossary/<xsl:value-of select="@src"/></xsl:attribute> <xsl:if test="@width"><xsl:copy-of select="@width"/></xsl:if> <xsl:if test="@height"><xsl:copy-of select="@height"/></xsl:if> <xsl:if test="@border"><xsl:copy-of select="@border"/></xsl:if> <xsl:if test="@loop!=''"><xsl:attribute name="loop"><xsl:value-of select="@loop"/></xsl:attribute></xsl:if> <xsl:if test="@menu!=''"><xsl:attribute name="menu"><xsl:value-of select="@menu"/></xsl:attribute></xsl:if> <xsl:if test="@quality!=''"><xsl:attribute name="quality"><xsl:value-of select="@quality"/></xsl:attribute></xsl:if> <xsl:if test="@bgcolor!=''"><xsl:attribute name="bgcolor"><xsl:value-of select="@bgcolor"/></xsl:attribute></xsl:if> </embed> </object> </xsl:template> <!-- ====== end of blob =============================== --> <!-- ============= formatting =============================== --> <!-- italic, bold, underline, monospace --> <xsl:template match="emphasis"> <xsl:choose> <xsl:when test="@role='b'"> <span style="font-weight:600;"><xsl:apply-templates/></span> </xsl:when> <xsl:when test="@role='ib'"> <span style="font-style:italic;font-weight:600;"><xsl:apply-templates/></span> </xsl:when> <xsl:when test="@role='bu'"> <span style="font-weight:600;text-decoration:underline;"><xsl:apply-templates/></span> </xsl:when> <xsl:when test="@role='bm'"> <span style="font-weight:600;font-family:monospace;"><xsl:apply-templates/></span> </xsl:when> <xsl:when test="@role='u'"> <span style="text-decoration:underline;"><xsl:apply-templates/></span> </xsl:when> <xsl:when test="@role='iu'"> <span style="font-style:italic;text-decoration:underline;"><xsl:apply-templates/></span> </xsl:when> <xsl:when test="@role='m'"> <span style="font-family:monospace;"><xsl:apply-templates/></span> </xsl:when> <xsl:when test="@role='im'"> <span style="font-style:italic;font-family:monospace;"><xsl:apply-templates/></span> </xsl:when> <xsl:otherwise> <span style="font-style:italic;"><xsl:apply-templates/></span> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- ====== end of formatting =============================== --> <!-- ========================================================================= Thank you for examining our code. Please direct all questions, bug reports, or suggestions for changes to the info@maris.com ========================================================================== --> </xsl:stylesheet>