Logtalk 2.9.3 files.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@350 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
pmoura 2002-02-08 20:03:20 +00:00
parent 89b034ce45
commit a69a8e9a3f
8 changed files with 1302 additions and 0 deletions

View File

@ -0,0 +1,66 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>current_logtalk_flag/2</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#current_logtalk_flag2">current_logtalk_flag/2</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
current_logtalk_flag(Flag, Value)
</pre>
<p>
Enumerates, by backtracking, the current Logtalk flag values.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
current_logtalk_flag(?atom, ?atom)
</pre>
</blockquote>
<h4>Errors</h4>
<blockquote>
<dl>
<dt>Flag is neither a variable nor an atom:</dt>
<dd><code>type_error(atom, Flag)</code></dd>
<dt>Flag is not a valid flag:</dt>
<dd><code>domain_error(valid_flag, Value)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- current_logtalk_flag(xml, Value).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="logtalk_load2.html">Previous</a> | <a href="set_logtalk_flag2.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: February 9, 2002
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,74 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>set_logtalk_flag/2</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#set_logtalk_flag2">set_logtalk_flag/2</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
set_logtalk_flag(Flag, Value)
</pre>
<p>
Sets Logtalk flag values.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
set_logtalk_flag(+atom, +atom)
</pre>
</blockquote>
<h4>Errors</h4>
<blockquote>
<dl>
<dt>Flag is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Value is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Flag is not an atom:</dt>
<dd><code>type_error(atom, Flag)</code></dd>
<dt>Flag is neither a variable nor a valid flag:</dt>
<dd><code>domain_error(valid_flag, Flag)</code></dd>
<dt>Value is not a valid value for flag Flag:</dt>
<dd><code>domain_error(valid_flag_value, Value)</code></dd>
<dt>Flag is a read-only flag:</dt>
<dd><code>domain_error(read_only_flag, Flag)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- set_logtalk_flag(xml, on).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="current_logtalk_flag2.html">Previous</a> | <a href="forall2.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: February 9, 2002
</p>
<hr />
</body>
</html>

21
Logtalk/xml/html.bat Normal file
View File

@ -0,0 +1,21 @@
@ECHO off
SET JAVA_HOME=c:\jdk1.3
SET XT_PATH=c:\xt
SET SAX_PATH=c:\xt
SET XP_PATH=c:\xt
SET XSLT="lgthtml.xsl"
ECHO This script converts all .xml files in the current directory to .html
ECHO files applying the XSLT transformation defined in the $XSLT file
ECHO using the James Clark XT XSLT Java processor
FOR %%f IN (*.xml) DO %JAVA_HOME%\bin\java -cp "%XT_PATH%\xt.jar;%SAX_PATH%\sax.jar;%XP_PATH%\xp.jar" -Dcom.jclark.xsl.sax.parser=com.jclark.xml.sax.CommentDriver com.jclark.xsl.sax.Driver %%f %XSLT% %%f.html
REN *.xml.html *.html
ECHO conversion done
@ECHO on

23
Logtalk/xml/html.sh Normal file
View File

@ -0,0 +1,23 @@
#!/bin/sh
XT_PATH="."
SAX_PATH="."
XP_PATH="."
XSLT="lgthtml.xsl"
echo
echo This script converts all .xml files in the current directory to .html
echo files applying the XSLT transformation defined in the $XSLT file
echo using the James Clark XT XSLT Java processor
echo
foreach file (*.xml)
echo converting $file
name="`expr "$file" : '\(.*\)\.[^./]*$' \| "$file"`"
eval java -cp ${XT_PATH}/xt.jar:${SAX_PATH}/sax.jar:${XP_PATH}/xp.jar -Dcom.jclark.xsl.sax.parser=com.jclark.xml.sax.CommentDriver com.jclark.xsl.sax.Driver $file $XSLT $name.html
end
echo
echo conversion done
echo

540
Logtalk/xml/lgtpdfa4.xsl Normal file
View File

@ -0,0 +1,540 @@
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<!--
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Logtalk - Object oriented extension to Prolog
% Release 2.9.3
%
% Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-->
<xsl:output indent="yes"/>
<xsl:template match ="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master
master-name="simple"
page-height="297mm"
page-width="210mm"
margin-top="15mm"
margin-bottom="15mm"
margin-left="25mm"
margin-right="25mm">
<fo:region-body margin-top="15mm" margin-bottom="15mm"/>
<fo:region-before extent="15mm"/>
<fo:region-after extent="15mm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-name="simple">
<fo:static-content flow-name="xsl-region-before">
<fo:block>
<fo:leader leader-pattern="rule" leader-length="inherit"/>
</fo:block>
<fo:block
text-align="end"
font-size="9pt"
font-family="sans-serif"
font-weight="bold">
<xsl:value-of select="logtalk/entity/type"/>: <xsl:value-of select="logtalk/entity/name"/>
</fo:block>
</fo:static-content>
<fo:static-content flow-name="xsl-region-after">
<fo:block>
<fo:leader leader-pattern="rule" leader-length="inherit"/>
</fo:block>
<fo:block
text-align="end"
font-size="9pt"
font-family="sans-serif"
font-weight="bold">
<fo:page-number/> of <fo:page-number-citation ref-id="end"/>
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block
font-size="18pt"
font-family="sans-serif"
font-weight="bold"
space-after="8pt">
<xsl:value-of select="logtalk/entity/name"/>
</fo:block>
<xsl:apply-templates select="logtalk/entity"/>
<xsl:apply-templates select="logtalk/relations"/>
<xsl:apply-templates select="logtalk/predicates"/>
<fo:block id="end"/>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="logtalk/entity">
<xsl:if test="comment">
<fo:block
margin-left="1cm"
font-size="10pt"
font-family="serif"
font-style="italic"
space-after="8pt">
<xsl:value-of select="comment"/>
</fo:block>
</xsl:if>
<xsl:if test="authors">
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
authors:
</fo:block>
<fo:block
font-size="9pt"
font-family="monospace"
margin-left="1cm">
<xsl:value-of select="authors"/>
</fo:block>
</xsl:if>
<xsl:if test="version">
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
version:
</fo:block>
<fo:block
font-size="9pt"
font-family="monospace"
margin-left="1cm">
<xsl:value-of select="version"/>
</fo:block>
</xsl:if>
<xsl:if test="date">
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
date:
</fo:block>
<fo:block
font-size="9pt"
font-family="monospace"
margin-left="1cm">
<xsl:value-of select="date"/>
</fo:block>
</xsl:if>
<fo:block
font-size="10pt"
font-family="serif"
space-before="8pt"
keep-with-next="always">
compilation:
</fo:block>
<fo:block
font-size="9pt"
font-family="monospace"
margin-left="1cm"
space-after="8pt">
<xsl:value-of select="compilation"/>
</fo:block>
<fo:list-block>
<xsl:for-each select="info">
<fo:list-item>
<fo:list-item-label>
<fo:block></fo:block>
</fo:list-item-label>
<fo:list-item-body>
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
<xsl:value-of select="key"/>:
</fo:block>
<fo:block
font-size="9pt"
font-family="monospace"
margin-left="1cm">
<xsl:value-of select="value"/>
</fo:block>
</fo:list-item-body>
</fo:list-item>
</xsl:for-each>
</fo:list-block>
</xsl:template>
<xsl:template match="logtalk/relations">
<xsl:choose>
<xsl:when test="*">
<xsl:if test="implements">
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
implements:
</fo:block>
<xsl:apply-templates select="implements"/>
</xsl:if>
<xsl:if test="imports">
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
imports:
</fo:block>
<xsl:apply-templates select="imports"/>
</xsl:if>
<xsl:if test="extends">
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
extends:
</fo:block>
<xsl:apply-templates select="extends"/>
</xsl:if>
<xsl:if test="instantiates">
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
instantiates:
</fo:block>
<xsl:apply-templates select="instantiates"/>
</xsl:if>
<xsl:if test="specializes">
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
specializes:
</fo:block>
<xsl:apply-templates select="specializes"/>
</xsl:if>
<xsl:if test="uses">
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
uses:
</fo:block>
<xsl:apply-templates select="uses"/>
</xsl:if>
<xsl:if test="calls">
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
calls:
</fo:block>
<xsl:apply-templates select="calls"/>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
(no dependencies on other files)
</fo:block>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="logtalk/relations/uses">
<fo:block
font-size="9pt"
font-family="monospace"
margin-left="1cm">
<xsl:value-of select="name"/>
</fo:block>
</xsl:template>
<xsl:template match="logtalk/relations/calls">
<fo:block
font-size="9pt"
font-family="monospace"
margin-left="1cm">
<xsl:value-of select="name"/>
</fo:block>
</xsl:template>
<xsl:template match="logtalk/relations/*">
<fo:block
font-size="9pt"
font-family="monospace"
margin-left="1cm">
<xsl:value-of select="scope"/><xsl:text> </xsl:text><xsl:value-of select="name"/>
</fo:block>
</xsl:template>
<xsl:template match="logtalk/predicates">
<fo:block
font-size="14pt"
font-family="sans-serif"
font-weight="bold"
keep-with-next="always"
space-before="18pt">
Public interface
</fo:block>
<xsl:choose>
<xsl:when test="public/predicate">
<xsl:apply-templates select="public/predicate"/>
</xsl:when>
<xsl:when test="/logtalk/relations/*">
<fo:block
font-size="10pt"
font-family="serif"
font-style="italic"
space-before="10pt">
(see related entities)
</fo:block>
</xsl:when>
<xsl:otherwise>
<fo:block
font-size="10pt"
font-family="serif"
font-style="italic"
space-before="10pt">
(none)
</fo:block>
</xsl:otherwise>
</xsl:choose>
<fo:block
font-size="14pt"
font-family="sans-serif"
font-weight="bold"
keep-with-next="always"
space-before="18pt">
Protected interface
</fo:block>
<xsl:choose>
<xsl:when test="protected/predicate">
<xsl:apply-templates select="protected/predicate"/>
</xsl:when>
<xsl:when test="/logtalk/relations/*">
<fo:block
font-size="10pt"
font-family="serif"
font-style="italic"
space-before="10pt">
(see related entities)
</fo:block>
</xsl:when>
<xsl:otherwise>
<fo:block
font-size="10pt"
font-family="serif"
font-style="italic"
space-before="10pt">
(none)
</fo:block>
</xsl:otherwise>
</xsl:choose>
<fo:block
font-size="14pt"
font-family="sans-serif"
font-weight="bold"
keep-with-next="always"
space-before="18pt">
Private predicates
</fo:block>
<xsl:choose>
<xsl:when test="private/predicate">
<xsl:apply-templates select="private/predicate"/>
</xsl:when>
<xsl:when test="/logtalk/relations/*">
<fo:block
font-size="10pt"
font-family="serif"
font-style="italic"
space-before="10pt">
(see related entities)
</fo:block>
</xsl:when>
<xsl:otherwise>
<fo:block
font-size="10pt"
font-family="serif"
font-style="italic"
space-before="10pt">
(none)
</fo:block>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="*/predicate">
<fo:block
font-size="12pt"
font-family="sans-serif"
font-weight="bold"
keep-with-next="always"
space-before="10pt">
<xsl:value-of select="name"/>
</fo:block>
<xsl:if test="comment">
<fo:block
margin-left="1cm"
font-size="10pt"
font-family="serif"
font-style="italic"
space-before="4pt">
<xsl:value-of select="comment"/>
</fo:block>
</xsl:if>
<fo:list-block>
<fo:list-item>
<fo:list-item-label>
<fo:block></fo:block>
</fo:list-item-label>
<fo:list-item-body>
<fo:block
space-before="4pt"
font-size="10pt"
font-family="serif"
keep-with-next="always">
compilation:
</fo:block>
<fo:block
font-size="9pt"
font-family="monospace"
margin-left="1cm">
<xsl:value-of select="compilation"/>
</fo:block>
</fo:list-item-body>
</fo:list-item>
<xsl:if test="template">
<fo:list-item>
<fo:list-item-label>
<fo:block></fo:block>
</fo:list-item-label>
<fo:list-item-body>
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
template:
</fo:block>
<fo:block
font-size="9pt"
font-family="monospace"
margin-left="1cm">
<xsl:value-of select="template"/>
</fo:block>
</fo:list-item-body>
</fo:list-item>
</xsl:if>
<xsl:if test="meta">
<fo:list-item>
<fo:list-item-label>
<fo:block></fo:block>
</fo:list-item-label>
<fo:list-item-body>
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
metapredicate template:
</fo:block>
<fo:block
font-size="9pt"
font-family="monospace"
margin-left="1cm">
<xsl:value-of select="meta"/>
</fo:block>
</fo:list-item-body>
</fo:list-item>
</xsl:if>
<xsl:if test="mode">
<fo:list-item>
<fo:list-item-label>
<fo:block></fo:block>
</fo:list-item-label>
<fo:list-item-body>
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
mode - number of solutions:
</fo:block>
<xsl:for-each select="mode">
<fo:block
font-size="9pt"
font-family="monospace"
margin-left="1cm">
<xsl:value-of select="template"/> - <xsl:value-of select="solutions"/>
</fo:block>
</xsl:for-each>
</fo:list-item-body>
</fo:list-item>
</xsl:if>
</fo:list-block>
<xsl:if test="info">
<fo:list-block>
<xsl:for-each select="info">
<fo:list-item>
<fo:list-item-label>
<fo:block></fo:block>
</fo:list-item-label>
<fo:list-item-body>
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
<xsl:value-of select="key"/>:
</fo:block>
<fo:block
font-size="9pt"
font-family="monospace"
margin-left="1cm">
<xsl:value-of select="value"/>
</fo:block>
</fo:list-item-body>
</fo:list-item>
</xsl:for-each>
</fo:list-block>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

540
Logtalk/xml/lgtpdfus.xsl Normal file
View File

@ -0,0 +1,540 @@
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<!--
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Logtalk - Object oriented extension to Prolog
% Release 2.9.3
%
% Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-->
<xsl:output indent="yes"/>
<xsl:template match ="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master
master-name="simple"
page-height="11.0in"
page-width="8.5in"
margin-top="15mm"
margin-bottom="15mm"
margin-left="25mm"
margin-right="25mm">
<fo:region-body margin-top="15mm" margin-bottom="15mm"/>
<fo:region-before extent="15mm"/>
<fo:region-after extent="15mm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-name="simple">
<fo:static-content flow-name="xsl-region-before">
<fo:block>
<fo:leader leader-pattern="rule" leader-length="inherit"/>
</fo:block>
<fo:block
text-align="end"
font-size="9pt"
font-family="sans-serif"
font-weight="bold">
<xsl:value-of select="logtalk/entity/type"/>: <xsl:value-of select="logtalk/entity/name"/>
</fo:block>
</fo:static-content>
<fo:static-content flow-name="xsl-region-after">
<fo:block>
<fo:leader leader-pattern="rule" leader-length="inherit"/>
</fo:block>
<fo:block
text-align="end"
font-size="9pt"
font-family="sans-serif"
font-weight="bold">
<fo:page-number/> of <fo:page-number-citation ref-id="end"/>
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block
font-size="18pt"
font-family="sans-serif"
font-weight="bold"
space-after="8pt">
<xsl:value-of select="logtalk/entity/name"/>
</fo:block>
<xsl:apply-templates select="logtalk/entity"/>
<xsl:apply-templates select="logtalk/relations"/>
<xsl:apply-templates select="logtalk/predicates"/>
<fo:block id="end"/>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="logtalk/entity">
<xsl:if test="comment">
<fo:block
margin-left="1cm"
font-size="10pt"
font-family="serif"
font-style="italic"
space-after="8pt">
<xsl:value-of select="comment"/>
</fo:block>
</xsl:if>
<xsl:if test="authors">
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
authors:
</fo:block>
<fo:block
font-size="9pt"
font-family="monospace"
margin-left="1cm">
<xsl:value-of select="authors"/>
</fo:block>
</xsl:if>
<xsl:if test="version">
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
version:
</fo:block>
<fo:block
font-size="9pt"
font-family="monospace"
margin-left="1cm">
<xsl:value-of select="version"/>
</fo:block>
</xsl:if>
<xsl:if test="date">
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
date:
</fo:block>
<fo:block
font-size="9pt"
font-family="monospace"
margin-left="1cm">
<xsl:value-of select="date"/>
</fo:block>
</xsl:if>
<fo:block
font-size="10pt"
font-family="serif"
space-before="8pt"
keep-with-next="always">
compilation:
</fo:block>
<fo:block
font-size="9pt"
font-family="monospace"
margin-left="1cm"
space-after="8pt">
<xsl:value-of select="compilation"/>
</fo:block>
<fo:list-block>
<xsl:for-each select="info">
<fo:list-item>
<fo:list-item-label>
<fo:block></fo:block>
</fo:list-item-label>
<fo:list-item-body>
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
<xsl:value-of select="key"/>:
</fo:block>
<fo:block
font-size="9pt"
font-family="monospace"
margin-left="1cm">
<xsl:value-of select="value"/>
</fo:block>
</fo:list-item-body>
</fo:list-item>
</xsl:for-each>
</fo:list-block>
</xsl:template>
<xsl:template match="logtalk/relations">
<xsl:choose>
<xsl:when test="*">
<xsl:if test="implements">
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
implements:
</fo:block>
<xsl:apply-templates select="implements"/>
</xsl:if>
<xsl:if test="imports">
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
imports:
</fo:block>
<xsl:apply-templates select="imports"/>
</xsl:if>
<xsl:if test="extends">
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
extends:
</fo:block>
<xsl:apply-templates select="extends"/>
</xsl:if>
<xsl:if test="instantiates">
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
instantiates:
</fo:block>
<xsl:apply-templates select="instantiates"/>
</xsl:if>
<xsl:if test="specializes">
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
specializes:
</fo:block>
<xsl:apply-templates select="specializes"/>
</xsl:if>
<xsl:if test="uses">
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
uses:
</fo:block>
<xsl:apply-templates select="uses"/>
</xsl:if>
<xsl:if test="calls">
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
calls:
</fo:block>
<xsl:apply-templates select="calls"/>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
(no dependencies on other files)
</fo:block>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="logtalk/relations/uses">
<fo:block
font-size="9pt"
font-family="monospace"
margin-left="1cm">
<xsl:value-of select="name"/>
</fo:block>
</xsl:template>
<xsl:template match="logtalk/relations/calls">
<fo:block
font-size="9pt"
font-family="monospace"
margin-left="1cm">
<xsl:value-of select="name"/>
</fo:block>
</xsl:template>
<xsl:template match="logtalk/relations/*">
<fo:block
font-size="9pt"
font-family="monospace"
margin-left="1cm">
<xsl:value-of select="scope"/><xsl:text> </xsl:text><xsl:value-of select="name"/>
</fo:block>
</xsl:template>
<xsl:template match="logtalk/predicates">
<fo:block
font-size="14pt"
font-family="sans-serif"
font-weight="bold"
keep-with-next="always"
space-before="18pt">
Public interface
</fo:block>
<xsl:choose>
<xsl:when test="public/predicate">
<xsl:apply-templates select="public/predicate"/>
</xsl:when>
<xsl:when test="/logtalk/relations/*">
<fo:block
font-size="10pt"
font-family="serif"
font-style="italic"
space-before="10pt">
(see related entities)
</fo:block>
</xsl:when>
<xsl:otherwise>
<fo:block
font-size="10pt"
font-family="serif"
font-style="italic"
space-before="10pt">
(none)
</fo:block>
</xsl:otherwise>
</xsl:choose>
<fo:block
font-size="14pt"
font-family="sans-serif"
font-weight="bold"
keep-with-next="always"
space-before="18pt">
Protected interface
</fo:block>
<xsl:choose>
<xsl:when test="protected/predicate">
<xsl:apply-templates select="protected/predicate"/>
</xsl:when>
<xsl:when test="/logtalk/relations/*">
<fo:block
font-size="10pt"
font-family="serif"
font-style="italic"
space-before="10pt">
(see related entities)
</fo:block>
</xsl:when>
<xsl:otherwise>
<fo:block
font-size="10pt"
font-family="serif"
font-style="italic"
space-before="10pt">
(none)
</fo:block>
</xsl:otherwise>
</xsl:choose>
<fo:block
font-size="14pt"
font-family="sans-serif"
font-weight="bold"
keep-with-next="always"
space-before="18pt">
Private predicates
</fo:block>
<xsl:choose>
<xsl:when test="private/predicate">
<xsl:apply-templates select="private/predicate"/>
</xsl:when>
<xsl:when test="/logtalk/relations/*">
<fo:block
font-size="10pt"
font-family="serif"
font-style="italic"
space-before="10pt">
(see related entities)
</fo:block>
</xsl:when>
<xsl:otherwise>
<fo:block
font-size="10pt"
font-family="serif"
font-style="italic"
space-before="10pt">
(none)
</fo:block>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="*/predicate">
<fo:block
font-size="12pt"
font-family="sans-serif"
font-weight="bold"
keep-with-next="always"
space-before="10pt">
<xsl:value-of select="name"/>
</fo:block>
<xsl:if test="comment">
<fo:block
margin-left="1cm"
font-size="10pt"
font-family="serif"
font-style="italic"
space-before="4pt">
<xsl:value-of select="comment"/>
</fo:block>
</xsl:if>
<fo:list-block>
<fo:list-item>
<fo:list-item-label>
<fo:block></fo:block>
</fo:list-item-label>
<fo:list-item-body>
<fo:block
space-before="4pt"
font-size="10pt"
font-family="serif"
keep-with-next="always">
compilation:
</fo:block>
<fo:block
font-size="9pt"
font-family="monospace"
margin-left="1cm">
<xsl:value-of select="compilation"/>
</fo:block>
</fo:list-item-body>
</fo:list-item>
<xsl:if test="template">
<fo:list-item>
<fo:list-item-label>
<fo:block></fo:block>
</fo:list-item-label>
<fo:list-item-body>
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
template:
</fo:block>
<fo:block
font-size="9pt"
font-family="monospace"
margin-left="1cm">
<xsl:value-of select="template"/>
</fo:block>
</fo:list-item-body>
</fo:list-item>
</xsl:if>
<xsl:if test="meta">
<fo:list-item>
<fo:list-item-label>
<fo:block></fo:block>
</fo:list-item-label>
<fo:list-item-body>
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
metapredicate template:
</fo:block>
<fo:block
font-size="9pt"
font-family="monospace"
margin-left="1cm">
<xsl:value-of select="meta"/>
</fo:block>
</fo:list-item-body>
</fo:list-item>
</xsl:if>
<xsl:if test="mode">
<fo:list-item>
<fo:list-item-label>
<fo:block></fo:block>
</fo:list-item-label>
<fo:list-item-body>
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
mode - number of solutions:
</fo:block>
<xsl:for-each select="mode">
<fo:block
font-size="9pt"
font-family="monospace"
margin-left="1cm">
<xsl:value-of select="template"/> - <xsl:value-of select="solutions"/>
</fo:block>
</xsl:for-each>
</fo:list-item-body>
</fo:list-item>
</xsl:if>
</fo:list-block>
<xsl:if test="info">
<fo:list-block>
<xsl:for-each select="info">
<fo:list-item>
<fo:list-item-label>
<fo:block></fo:block>
</fo:list-item-label>
<fo:list-item-body>
<fo:block
font-size="10pt"
font-family="serif"
keep-with-next="always">
<xsl:value-of select="key"/>:
</fo:block>
<fo:block
font-size="9pt"
font-family="monospace"
margin-left="1cm">
<xsl:value-of select="value"/>
</fo:block>
</fo:list-item-body>
</fo:list-item>
</xsl:for-each>
</fo:list-block>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

17
Logtalk/xml/pdf.bat Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
SET FOP_PATH=c:\Fop-0.20.2
SET XSLT="lgtpdfa4.xsl"
ECHO This script converts all .xml files in the current directory to .pdf
ECHO files applying the XSLT transformation defined in the $XSLT file
ECHO using the Apache FOP processor
FOR %%f IN (*.xml) DO %FOP_PATH%\fop.bat -xsl %XSLT% -xml %%f -pdf %%f.pdf
REN *.xml.pdf *.pdf
ECHO conversion done
@ECHO on

21
Logtalk/xml/pdf.sh Normal file
View File

@ -0,0 +1,21 @@
#!/bin/sh
FOP_PATH="/Applications/Fop-0.20.2"
XSLT="lgtpdfa4.xsl"
echo
echo This script converts all .xml files in the current directory to .pdf
echo files applying the XSLT transformation defined in the $XSLT file
echo using the Apache FOP processor
echo
foreach file (*.xml)
echo converting $file
name="`expr "$file" : '\(.*\)\.[^./]*$' \| "$file"`"
eval sh $FOP_PATH/fop.sh -xsl $XSLT -xml $file -pdf $name.pdf
end
echo
echo conversion done
echo