2004-02-09 14:18:27 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2001-12-05 23:57:48 +00:00
|
|
|
<xsl:stylesheet
|
|
|
|
version="1.0"
|
2004-08-16 17:41:11 +01:00
|
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
|
|
xmlns="http://www.w3.org/1999/xhtml">
|
2001-12-05 23:57:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
<xsl:output
|
|
|
|
method="html"
|
2004-02-09 14:18:27 +00:00
|
|
|
indent="yes"
|
2004-08-19 14:46:40 +01:00
|
|
|
encoding="utf-8"
|
2001-12-05 23:57:48 +00:00
|
|
|
doctype-public="-//W3C//DTD HTML 4.01//EN"
|
|
|
|
doctype-system="http://www.w3.org/TR/html4/strict.dtd"/>
|
|
|
|
|
|
|
|
|
|
|
|
<!--
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
%
|
|
|
|
% Logtalk - Object oriented extension to Prolog
|
2006-03-26 18:31:34 +01:00
|
|
|
% Release 2.27.1
|
2001-12-05 23:57:48 +00:00
|
|
|
%
|
2006-02-10 17:44:05 +00:00
|
|
|
% Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
|
2001-12-05 23:57:48 +00:00
|
|
|
%
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
-->
|
|
|
|
|
|
|
|
|
|
|
|
<xsl:template match="/">
|
|
|
|
<html>
|
|
|
|
<head>
|
2004-02-09 14:18:27 +00:00
|
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
2001-12-05 23:57:48 +00:00
|
|
|
<title><xsl:value-of select="logtalk/entity/name" /></title>
|
|
|
|
<link rel="stylesheet" href="logtalk.css" type="text/css" />
|
|
|
|
</head>
|
|
|
|
<body>
|
2005-04-23 00:57:45 +01:00
|
|
|
<div class="header">
|
|
|
|
<p class="type"><xsl:value-of select="logtalk/entity/type" /></p>
|
|
|
|
<h1 class="code"><xsl:value-of select="logtalk/entity/name" /></h1>
|
|
|
|
<blockquote>
|
|
|
|
<xsl:if test="logtalk/entity/comment">
|
|
|
|
<p class="comment"><xsl:value-of select="logtalk/entity/comment" /></p>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="logtalk/entity/parameters">
|
|
|
|
<ul class="parameters">
|
|
|
|
<xsl:for-each select="logtalk/entity/parameters/parameter">
|
|
|
|
<li><code><xsl:value-of select="name" /></code><xsl:text disable-output-escaping="yes"> &ndash; </xsl:text><span class="comment"><xsl:value-of select="description" /></span></li>
|
|
|
|
</xsl:for-each>
|
|
|
|
</ul>
|
|
|
|
</xsl:if>
|
|
|
|
</blockquote>
|
|
|
|
</div>
|
|
|
|
<div class="entity">
|
|
|
|
<div class="section">
|
|
|
|
<xsl:apply-templates select="logtalk/entity" />
|
|
|
|
<xsl:apply-templates select="logtalk/relations" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="predicates">
|
|
|
|
<xsl:apply-templates select="logtalk/predicates" />
|
|
|
|
</div>
|
|
|
|
<div class="remarks">
|
|
|
|
<xsl:apply-templates select="logtalk/remarks" />
|
|
|
|
</div>
|
2001-12-05 23:57:48 +00:00
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
|
|
|
<xsl:template match="logtalk/entity">
|
2005-04-23 00:57:45 +01:00
|
|
|
<dl class="properties">
|
2003-02-05 00:15:28 +00:00
|
|
|
<xsl:if test="author">
|
2005-04-23 00:57:45 +01:00
|
|
|
<dt class ="key">author:</dt>
|
|
|
|
<dd class="value"><code><xsl:value-of select="author" /></code></dd>
|
2001-12-05 23:57:48 +00:00
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="version">
|
2005-04-23 00:57:45 +01:00
|
|
|
<dt class ="key">version:</dt>
|
|
|
|
<dd class="value"><code><xsl:value-of select="version" /></code></dd>
|
2001-12-05 23:57:48 +00:00
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="date">
|
2005-04-23 00:57:45 +01:00
|
|
|
<dt class ="key">date:</dt>
|
|
|
|
<dd class="value"><code><xsl:value-of select="date" /></code></dd>
|
2001-12-05 23:57:48 +00:00
|
|
|
</xsl:if>
|
|
|
|
</dl>
|
2005-04-23 00:57:45 +01:00
|
|
|
<dl class="properties">
|
|
|
|
<dt class ="key">compilation:</dt>
|
|
|
|
<dd class ="value"><code><xsl:value-of select="compilation" /></code></dd>
|
2001-12-05 23:57:48 +00:00
|
|
|
</dl>
|
2002-08-26 17:45:50 +01:00
|
|
|
<xsl:if test="info">
|
2005-04-23 00:57:45 +01:00
|
|
|
<dl class="properties">
|
2002-08-26 17:45:50 +01:00
|
|
|
<xsl:for-each select="info">
|
2005-04-23 00:57:45 +01:00
|
|
|
<dt class ="key"><xsl:value-of select="key" />:</dt>
|
|
|
|
<dd class ="value"><code><xsl:value-of select="value" /></code></dd>
|
2002-08-26 17:45:50 +01:00
|
|
|
</xsl:for-each>
|
|
|
|
</dl>
|
|
|
|
</xsl:if>
|
2001-12-05 23:57:48 +00:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
|
|
|
<xsl:template match="logtalk/relations">
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="*">
|
2005-04-23 00:57:45 +01:00
|
|
|
<dl class="relations">
|
2001-12-05 23:57:48 +00:00
|
|
|
<xsl:if test="implements">
|
2005-04-23 00:57:45 +01:00
|
|
|
<dt class ="key">implements:</dt>
|
2001-12-05 23:57:48 +00:00
|
|
|
<xsl:apply-templates select="implements" />
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="imports">
|
2005-04-23 00:57:45 +01:00
|
|
|
<dt class ="key">imports:</dt>
|
2001-12-05 23:57:48 +00:00
|
|
|
<xsl:apply-templates select="imports" />
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="extends">
|
2005-04-23 00:57:45 +01:00
|
|
|
<dt class ="key">extends:</dt>
|
2001-12-05 23:57:48 +00:00
|
|
|
<xsl:apply-templates select="extends" />
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="instantiates">
|
2005-04-23 00:57:45 +01:00
|
|
|
<dt class ="key">instantiates:</dt>
|
2001-12-05 23:57:48 +00:00
|
|
|
<xsl:apply-templates select="instantiates" />
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="specializes">
|
2005-04-23 00:57:45 +01:00
|
|
|
<dt class ="key">specializes:</dt>
|
2001-12-05 23:57:48 +00:00
|
|
|
<xsl:apply-templates select="specializes" />
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="uses">
|
2005-04-23 00:57:45 +01:00
|
|
|
<dt class ="key">uses:</dt>
|
2001-12-05 23:57:48 +00:00
|
|
|
<xsl:apply-templates select="uses" />
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="calls">
|
2005-04-23 00:57:45 +01:00
|
|
|
<dt class ="key">calls:</dt>
|
2001-12-05 23:57:48 +00:00
|
|
|
<xsl:apply-templates select="calls" />
|
|
|
|
</xsl:if>
|
2005-04-23 00:57:45 +01:00
|
|
|
</dl>
|
2001-12-05 23:57:48 +00:00
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
2005-04-23 00:57:45 +01:00
|
|
|
<p class="comment">(no dependencies on other files)</p>
|
2001-12-05 23:57:48 +00:00
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
|
|
|
<xsl:template match="logtalk/relations/uses">
|
2005-08-08 13:13:45 +01:00
|
|
|
<dd class ="value"><code><a href="{file}.xml"><xsl:value-of select="name" /></a></code></dd>
|
2001-12-05 23:57:48 +00:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
|
|
|
<xsl:template match="logtalk/relations/calls">
|
2005-08-08 13:13:45 +01:00
|
|
|
<dd class ="value"><code><a href="{file}.xml"><xsl:value-of select="name" /></a></code></dd>
|
2001-12-05 23:57:48 +00:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
|
|
|
<xsl:template match="logtalk/relations/*">
|
2005-08-08 13:13:45 +01:00
|
|
|
<dd class ="value"><code><xsl:value-of select="scope" /><xsl:text> </xsl:text><a href="{file}.xml"><xsl:value-of select="name" /></a></code></dd>
|
2001-12-05 23:57:48 +00:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
|
|
|
<xsl:template match="logtalk/predicates">
|
2005-04-23 00:57:45 +01:00
|
|
|
<div class="public">
|
|
|
|
<h2>Public interface</h2>
|
2001-12-05 23:57:48 +00:00
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="public/predicate">
|
|
|
|
<xsl:apply-templates select="public/predicate" />
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:when test="/logtalk/relations/*">
|
2005-04-23 00:57:45 +01:00
|
|
|
<div class="section">
|
|
|
|
<p class="comment">(see related entities)</p>
|
|
|
|
</div>
|
2001-12-05 23:57:48 +00:00
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
2005-04-23 00:57:45 +01:00
|
|
|
<div class="section">
|
|
|
|
<p class="comment">(none)</p>
|
|
|
|
</div>
|
2001-12-05 23:57:48 +00:00
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
2005-04-23 00:57:45 +01:00
|
|
|
</div>
|
|
|
|
<div class="protected">
|
|
|
|
<h2>Protected interface</h2>
|
2001-12-05 23:57:48 +00:00
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="protected/predicate">
|
|
|
|
<xsl:apply-templates select="protected/predicate" />
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:when test="/logtalk/relations/*">
|
2005-04-23 00:57:45 +01:00
|
|
|
<div class="section">
|
|
|
|
<p class="comment">(see related entities)</p>
|
|
|
|
</div>
|
2001-12-05 23:57:48 +00:00
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
2005-04-23 00:57:45 +01:00
|
|
|
<div class="section">
|
|
|
|
<p class="comment">(none)</p>
|
|
|
|
</div>
|
2001-12-05 23:57:48 +00:00
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
2005-04-23 00:57:45 +01:00
|
|
|
</div>
|
|
|
|
<div class="private">
|
|
|
|
<h2>Private predicates</h2>
|
2001-12-05 23:57:48 +00:00
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="private/predicate">
|
|
|
|
<xsl:apply-templates select="private/predicate" />
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:when test="/logtalk/relations/*">
|
2005-04-23 00:57:45 +01:00
|
|
|
<div class="section">
|
|
|
|
<p class="comment">(see related entities)</p>
|
|
|
|
</div>
|
2001-12-05 23:57:48 +00:00
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
2005-04-23 00:57:45 +01:00
|
|
|
<div class="section">
|
|
|
|
<p class="comment">(none)</p>
|
|
|
|
</div>
|
2001-12-05 23:57:48 +00:00
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
2005-04-23 00:57:45 +01:00
|
|
|
</div>
|
2001-12-05 23:57:48 +00:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
|
|
|
<xsl:template match="*/predicate">
|
2005-04-23 00:57:45 +01:00
|
|
|
<div class="section">
|
|
|
|
<h3 class="code"><xsl:value-of select="name" /></h3>
|
|
|
|
<blockquote>
|
2001-12-05 23:57:48 +00:00
|
|
|
<xsl:if test="comment">
|
2005-04-23 00:57:45 +01:00
|
|
|
<p class="comment"><xsl:value-of select="comment" /></p>
|
2001-12-05 23:57:48 +00:00
|
|
|
</xsl:if>
|
2005-04-23 00:57:45 +01:00
|
|
|
</blockquote>
|
|
|
|
<dl class="properties">
|
|
|
|
<dt class ="key">compilation:</dt>
|
|
|
|
<dd class ="value"><code><xsl:value-of select="compilation" /></code></dd>
|
2001-12-05 23:57:48 +00:00
|
|
|
<xsl:if test="template">
|
2005-04-23 00:57:45 +01:00
|
|
|
<dt class ="key">template:</dt>
|
|
|
|
<dd class ="value"><code><xsl:value-of select="template" /></code></dd>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="arguments">
|
|
|
|
<dd class ="value"><ul class="arguments">
|
|
|
|
<xsl:for-each select="arguments/argument">
|
|
|
|
<li><code><xsl:value-of select="name" /></code><xsl:text disable-output-escaping="yes"> &ndash; </xsl:text><span class="comment"><xsl:value-of select="description" /></span></li>
|
|
|
|
</xsl:for-each></ul></dd>
|
2001-12-05 23:57:48 +00:00
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="meta">
|
2005-04-23 00:57:45 +01:00
|
|
|
<dt class ="key">metapredicate template:</dt>
|
|
|
|
<dd class ="value"><code><xsl:value-of select="meta" /></code></dd>
|
2001-12-05 23:57:48 +00:00
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="mode">
|
2005-04-23 00:57:45 +01:00
|
|
|
<dt class ="key">mode<xsl:text disable-output-escaping="yes"> &ndash; </xsl:text>number of solutions:</dt>
|
2001-12-05 23:57:48 +00:00
|
|
|
<xsl:for-each select="mode">
|
2005-04-23 00:57:45 +01:00
|
|
|
<dd class ="value"><code><xsl:value-of select="template" /><xsl:text disable-output-escaping="yes"> &ndash; </xsl:text><xsl:value-of select="solutions" /></code></dd>
|
2001-12-05 23:57:48 +00:00
|
|
|
</xsl:for-each>
|
|
|
|
</xsl:if>
|
2004-06-06 23:46:45 +01:00
|
|
|
<xsl:if test="exceptions">
|
2005-04-23 00:57:45 +01:00
|
|
|
<dt class ="key">exceptions:</dt>
|
2004-06-06 23:46:45 +01:00
|
|
|
<xsl:for-each select="exceptions/exception">
|
2005-04-23 00:57:45 +01:00
|
|
|
<dd class ="value"><xsl:value-of select="condition" />: <code><xsl:value-of select="term" /></code></dd>
|
2004-06-06 23:46:45 +01:00
|
|
|
</xsl:for-each>
|
|
|
|
</xsl:if>
|
2005-04-23 00:57:45 +01:00
|
|
|
<xsl:if test="examples">
|
|
|
|
<dt class ="key">examples:</dt>
|
|
|
|
<xsl:for-each select="examples/example">
|
|
|
|
<dd class ="value"><dl class="examples">
|
|
|
|
<dt class="comment"><xsl:value-of select="description" /></dt>
|
|
|
|
<dd class="code"><xsl:value-of select="call" /></dd>
|
|
|
|
<dd class="code"><xsl:value-of select="bindings" /></dd>
|
|
|
|
</dl></dd>
|
|
|
|
</xsl:for-each>
|
|
|
|
</xsl:if>
|
2001-12-05 23:57:48 +00:00
|
|
|
</dl>
|
2002-08-26 17:45:50 +01:00
|
|
|
<xsl:if test="info">
|
2005-04-23 00:57:45 +01:00
|
|
|
<dl class="properties">
|
2002-08-26 17:45:50 +01:00
|
|
|
<xsl:for-each select="info">
|
2005-04-23 00:57:45 +01:00
|
|
|
<dt class ="key"><xsl:value-of select="key" />:</dt>
|
|
|
|
<dd class ="value"><code><xsl:value-of select="value" /></code></dd>
|
2002-08-26 17:45:50 +01:00
|
|
|
</xsl:for-each>
|
|
|
|
</dl>
|
|
|
|
</xsl:if>
|
2005-04-23 00:57:45 +01:00
|
|
|
</div>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
|
|
|
<xsl:template match="logtalk/remarks">
|
|
|
|
<h2>Remarks</h2>
|
|
|
|
<div class="section">
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="remark">
|
|
|
|
<xsl:apply-templates select="remark" />
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<h3 class="code">(none)</h3>
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</div>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="logtalk/remarks/remark">
|
|
|
|
<dl class="remarks">
|
|
|
|
<dt class="comment"><xsl:value-of select="topic" /></dt>
|
|
|
|
<dd class="text"><xsl:value-of select="text" /></dd>
|
|
|
|
</dl>
|
2001-12-05 23:57:48 +00:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
|
|
|
</xsl:stylesheet>
|