?? generate-html.xsl
字號:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><!-- Copyright (C) 2006 Ferdinand Prantl <prantl@users.sourceforge.net> -->
<!-- All rights reserved. -->
<!-- -->
<!-- This work is licensed under a Creative Commons Attribution 2.5 --><!-- License. See the attached file LICENSE for more information. --><!-- See also http://creativecommons.org/licenses/by/2.5/. --><!-- -->
<!-- See http://domino-javadoc.sourceforge.net for the most recent version -->
<!-- and more information. -->
<xsl:param name="output-directory" select="'output/javadoc'" />
<xsl:param name="external-examples" select="true()" />
<xsl:template match="/">
<xsl:apply-templates select="/documentation/topics/page" />
<xsl:if test="$external-examples">
<xsl:apply-templates select="/documentation/topics/example" />
</xsl:if>
</xsl:template>
<xsl:template match="page">
<xsl:document method="html" encoding="iso8859-1" href="{$output-directory}/lotus/domino/{@name}.html">
<xsl:call-template name="page" />
</xsl:document>
<xsl:if test="@name = 'java_notes_classes'">
<xsl:document method="html" encoding="iso8859-1" href="{$output-directory}/../overview.html">
<xsl:call-template name="overview" />
</xsl:document>
</xsl:if>
</xsl:template>
<xsl:template match="example">
<xsl:variable name="name">
<xsl:choose>
<xsl:when test="@type = 'class'">
<xsl:value-of select="@name" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(@class, '.', @name)" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:document method="html" encoding="iso8859-1" href="{$output-directory}/lotus/domino/{$name}-example.html">
<xsl:call-template name="page" />
</xsl:document>
</xsl:template>
<xsl:template name="page">
<xsl:text disable-output-escaping="yes"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"></xsl:text>
<html>
<head>
<title><xsl:value-of select="@title" /></title>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style" />
</head>
<body>
<xsl:text>
</xsl:text>
<A NAME="navbar_top"></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN="2" BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN="3"><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 PREV 
 NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html?overview-summary.html" target="_top"><B>FRAMES</B></A>  
 <A HREF="../../overview-summary.html" target="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<HR />
<xsl:text>
</xsl:text>
<center><h1><xsl:value-of select="@title" /></h1></center>
<xsl:text>
</xsl:text>
<xsl:apply-templates select="*" />
<xsl:text>
</xsl:text>
<P />
<HR />
<A NAME="navbar_bottom"></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN="2" BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN="3"><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 PREV 
 NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html?overview-summary.html" target="_top"><B>FRAMES</B></A>  
 <A HREF="../../overview-summary.html" target="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<HR />
<xsl:text>
</xsl:text>
</body>
</html>
</xsl:template>
<xsl:template name="overview">
<body>
<xsl:text>
</xsl:text>
<xsl:apply-templates select="*" />
<xsl:text>
</xsl:text>
</body>
</xsl:template>
<xsl:template match="description">
<xsl:apply-templates select="*" />
</xsl:template>
<xsl:template match="text">
<xsl:choose>
<xsl:when test="ancestor::cell">
<xsl:apply-templates />
<xsl:if test="position() != last()">
<xsl:element name="br" /><xsl:text>
</xsl:text>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:element name="p"><xsl:apply-templates /></xsl:element><xsl:text>
</xsl:text>
<xsl:call-template name="separate-paragraph" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="title">
<xsl:element name="h3"><xsl:apply-templates /></xsl:element><xsl:text>
</xsl:text>
<xsl:call-template name="separate-paragraph" />
</xsl:template>
<xsl:template match="list">
<xsl:element name="ul">
<xsl:apply-templates /></xsl:element><xsl:text>
</xsl:text>
<xsl:call-template name="separate-paragraph" />
</xsl:template>
<xsl:template match="item">
<xsl:element name="li"><xsl:apply-templates /></xsl:element>
</xsl:template>
<xsl:template match="code">
<xsl:element name="pre">
<xsl:apply-templates />
</xsl:element><xsl:text>
</xsl:text>
<xsl:call-template name="separate-paragraph" />
</xsl:template>
<xsl:template match="table">
<xsl:element name="table">
<xsl:attribute name="border">1</xsl:attribute>
<xsl:attribute name="cellspacing">0</xsl:attribute>
<xsl:attribute name="cellpadding">3</xsl:attribute>
<xsl:apply-templates select="*" /><xsl:text>
</xsl:text></xsl:element><xsl:text>
</xsl:text>
<xsl:call-template name="separate-paragraph" />
</xsl:template>
<xsl:template match="row">
<xsl:text>
</xsl:text><xsl:element name="tr">
<xsl:apply-templates select="*" /><xsl:text>
</xsl:text>
</xsl:element>
</xsl:template>
<xsl:template match="cell">
<xsl:text>
</xsl:text><xsl:element name="td">
<xsl:apply-templates select="*" />
</xsl:element>
</xsl:template>
<xsl:template match="see">
<xsl:choose>
<xsl:when test="preceding-sibling::see">
<xsl:apply-templates /><xsl:element name="br" />
</xsl:when>
<xsl:otherwise>
<xsl:element name="h3"><xsl:text>See Also</xsl:text></xsl:element><xsl:text disable-output-escaping="yes">
<blockquote>
</xsl:text><xsl:apply-templates /><xsl:element name="br" />
</xsl:otherwise>
</xsl:choose><xsl:text>
</xsl:text>
<xsl:if test="not(following-sibling::see)">
<xsl:text disable-output-escaping="yes"></blockquote>
</xsl:text>
<xsl:call-template name="separate-paragraph" />
</xsl:if>
</xsl:template>
<xsl:template match="link">
<xsl:variable name="id" select="@id" />
<xsl:variable name="reference" select="/documentation/references/reference[@id=$id]" />
<xsl:choose>
<xsl:when test="$reference[@type = 'class']">
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:call-template name="descope-name">
<xsl:with-param name="name" select="$reference/@name" />
</xsl:call-template>
<xsl:text>.html</xsl:text>
</xsl:attribute>
<xsl:apply-templates />
</xsl:element>
</xsl:when>
<xsl:when test="$reference[@type = 'method' or @type = 'property']">
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:call-template name="descope-name">
<xsl:with-param name="name" select="substring-before($reference/@name, '#')" />
</xsl:call-template>
<xsl:text>.html#</xsl:text>
<xsl:value-of select="substring-after($reference/@name, '#')" />
</xsl:attribute>
<xsl:apply-templates />
</xsl:element>
</xsl:when>
<xsl:when test="$reference[@type = 'example']">
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:call-template name="descope-name">
<xsl:with-param name="name" select="$reference/@name" />
</xsl:call-template>
<xsl:text>-example.html</xsl:text>
</xsl:attribute>
<xsl:apply-templates />
</xsl:element>
</xsl:when>
<xsl:when test="$reference[@type = 'page']">
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="$reference/@name" />
<xsl:text>.html</xsl:text>
</xsl:attribute>
<xsl:apply-templates />
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:element name="a">
<xsl:attribute name="href"><xsl:value-of select="'#'" /></xsl:attribute>
<xsl:apply-templates />
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="separate-paragraph">
<xsl:if test="position() != last()">
<xsl:text>
</xsl:text>
</xsl:if>
</xsl:template>
<xsl:template name="descope-name">
<xsl:param name="name" />
<xsl:choose>
<xsl:when test="starts-with($name, 'lotus.domino.')">
<xsl:value-of select="substring-after($name, 'lotus.domino.')" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$name" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -