Logtalk 2.24.0 files.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1282 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
@@ -1,23 +1,25 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.23.1
|
||||
Release 2.24.0
|
||||
|
||||
Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
This folder contains supporting files for converting XML documentation
|
||||
files (which are created when compiling objects, categories, or protocols)
|
||||
to PDF files or (X)HTML files using XSL style sheets. The documentation
|
||||
files may also be viewed directly in a web browser that supports the W3C
|
||||
standards XML, XSLT, CSS, and HTML 4 or XHTML 1.0.
|
||||
This folder contains supporting files for converting and/or indexing XML
|
||||
documentation files (which are created when compiling objects, categories,
|
||||
or protocols) to PDF files or (X)HTML files using XSL style sheets. The
|
||||
documentation files may also be viewed directly on a web browser that
|
||||
supports the W3C standards XML, XSLT, CSS, and HTML 4 or XHTML 1.0.
|
||||
|
||||
The scripts provided in this folder are just samples, which you should adapt
|
||||
to your working environment. Some scripts expect that all files be in the
|
||||
same directory. Some others should be called from the directory containing
|
||||
the XML documenting files that you wish to convert. See the description of
|
||||
each script below for details. Make sure that the XSL processors you intend
|
||||
to use are properly installed before running the scripts.
|
||||
each script below for details.
|
||||
|
||||
MAKE SURE THAT THE XSL PROCESSORS YOU INTEND TO USE ARE PROPERLY INSTALLED
|
||||
AND WORKING BEFORE RUNNING THE SCRIPTS!
|
||||
|
||||
Regarding conversion to HTML/XHTML, the links to the .xsl files on the
|
||||
.xml files and the links to the .css files in the generated .html files
|
||||
@@ -38,18 +40,25 @@ flag, or by using the doctype/1 compiler flag. Choose the option value
|
||||
that works best with your XSLT tools. To choose between the .dtd or .xsd
|
||||
specifications use the xmlspec/1 compiler flag.
|
||||
|
||||
As Logtalk uses a single namespace for all objects, categories, and protocols,
|
||||
it is advisable that you define an alternate compilation directory to store
|
||||
all the XML documenting files (see the predicate '$lgt_alt_directory'/2 on the
|
||||
config files). This will ensure proper working of links to other entities in
|
||||
the generated (X)HTML files.
|
||||
|
||||
|
||||
Brief description of each file in this folder:
|
||||
|
||||
|
||||
lgtxml.xsl
|
||||
|
||||
XSLT file for viewing .xml files directly in in a browser such as Mozilla
|
||||
(version 0.9.2 or later) or Microsoft Internet Explorer 5.5 for Windows
|
||||
(after installing the latest Microsoft XML Parser Release that is needed
|
||||
for XSL standard compliance). The links in the (internally generated)
|
||||
HTML files point to related XML files. UTF-8 encoding is assumed. Edit
|
||||
the file if you use a different encoding.
|
||||
XSLT file for viewing .xml files directly in in a browser such as Safari
|
||||
(version 1.3 or later), Firefox 1.0.x, Mozilla (version 0.9.2 or later),
|
||||
or Microsoft Internet Explorer 5.5 for Windows (after installing the
|
||||
latest Microsoft XML Parser Release that is needed for XSL standard
|
||||
compliance). The links in the (internally generated) HTML files point to
|
||||
related XML files. UTF-8 encoding is assumed. Edit the file if you use a
|
||||
different encoding.
|
||||
|
||||
|
||||
lgthtml.xsl
|
||||
@@ -128,7 +137,7 @@ lgt2pdf.js
|
||||
you wish to convert. Call the scripts with the help option for a description
|
||||
of the available optional parameters (type "cscript lgt2pdf.js help" or
|
||||
"lgt2pdf.sh -h"; depending on your Logtalk installation, you may simply need
|
||||
to type lgt2pdf in order to run the script).
|
||||
to type "lgt2pdf" in order to run the script).
|
||||
|
||||
|
||||
lgt2html.sh
|
||||
@@ -147,8 +156,8 @@ lgt2html.js
|
||||
http://xml.apache.org/xalan-c/index.html
|
||||
* Sablotron (tested with version 1.0.1)
|
||||
http://www.gingerall.com/charlie/ga/xml/p_sab.xml
|
||||
* Microsoft MSXSL (only for the JScript script)
|
||||
http://msdn.microsoft.com/library/en-us/dnxml/html/msxsl.asp
|
||||
* Microsoft MSXSL (only for the Windows JScript script)
|
||||
http://msdn.microsoft.com/XML/XMLDownloads/default.aspx
|
||||
|
||||
These scripts assumes that the LOGTALKUSER environment variable is defined
|
||||
and that the chosen XSLT processor is available in the path.
|
||||
@@ -156,8 +165,28 @@ lgt2html.js
|
||||
The scripts should be called from the directory containing the .xml files
|
||||
you wish to convert. Call the scripts with the help option for a description
|
||||
of the available optional parameters (type "cscript lgt2html.js help" or
|
||||
"lgt2html.sh -h"; depending on your Logtalk installation, you may simply need
|
||||
to type lgt2html in order to run the script).
|
||||
"lgt2html.sh -h"; depending on your Logtalk installation, you may simply
|
||||
need to type "lgt2html" in order to run the script).
|
||||
|
||||
|
||||
lgt2xml.sh
|
||||
(bash shell script)
|
||||
lgt2xml.js
|
||||
(JScript command-line script for Windows; requires WSH 5.6 or later version)
|
||||
|
||||
Sample scripts for indexing the .xml files in the current directory by
|
||||
generating an index.html file which contains links to all the files. In
|
||||
addition, these scripts also make a copy of the lgtxml.xsl file to the
|
||||
current directory, allowing direct visualization of the .xml files on a
|
||||
supported web browser.
|
||||
|
||||
These scripts assumes that the LOGTALKUSER environment variable is defined.
|
||||
|
||||
The scripts should be called from the directory containing the .xml files
|
||||
you wish to index. Call the scripts with the help option for a description
|
||||
of the available optional parameters (type "cscript lgt2xml.js help" or
|
||||
"lgt2xml.sh -h"; depending on your Logtalk installation, you may simply
|
||||
need to type "lgt2xml" in order to run the script).
|
||||
|
||||
|
||||
html.sh
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## =================================================================
|
||||
## Logtalk - Object oriented extension to Prolog
|
||||
## Release 2.23.1
|
||||
## Release 2.24.0
|
||||
##
|
||||
## Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
|
||||
## =================================================================
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
% Logtalk - Object oriented extension to Prolog
|
||||
% Release 2.23.1
|
||||
% Release 2.24.0
|
||||
%
|
||||
% Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
|
||||
%
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// =================================================================
|
||||
// Logtalk - Object oriented extension to Prolog
|
||||
// Release 2.23.1
|
||||
// Release 2.24.0
|
||||
//
|
||||
// Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
|
||||
// =================================================================
|
||||
@@ -42,10 +42,9 @@ else {
|
||||
WScript.Quit(1);
|
||||
}
|
||||
|
||||
logtalk_home = logtalk_home.replace(/\\/g, "\\\\");
|
||||
|
||||
var html_xslt = logtalk_home + "\\xml\\lgthtml.xsl";
|
||||
var xhtml_xslt = logtalk_home + "\\xml\\lgtxhtml.xsl";
|
||||
|
||||
var xslt;
|
||||
|
||||
var f_arg = "";
|
||||
@@ -119,16 +118,16 @@ for (files.moveFirst(); !files.atEnd(); files.moveNext()) {
|
||||
var html_file = directory + "\\" + FSObject.GetBaseName(file) + ".html";
|
||||
switch (processor) {
|
||||
case "msxsl" :
|
||||
WshShell.Run("msxsl -o " + html_file + " " + file + " " + xslt, true);
|
||||
WshShell.Run("msxsl -o \"" + html_file + "\" \"" + file + "\" \"" + xslt + "\"", true);
|
||||
break;
|
||||
case "xsltproc" :
|
||||
WshShell.Run("xsltproc -o " + html_file + " " + xslt + " " + file, true);
|
||||
WshShell.Run("xsltproc -o \"" + html_file + "\" \"" + xslt + "\" \"" + file + "\"", true);
|
||||
break;
|
||||
case "xalan" :
|
||||
WshShell.Run("xalan -o " + html_file + " " + file + " " + xslt, true);
|
||||
WshShell.Run("xalan -o \"" + html_file + "\" \"" + file + "\" \"" + xslt + "\"", true);
|
||||
break;
|
||||
case "sabcmd" :
|
||||
WshShell.Run("sabcmd " + xslt + " " + file + " " + html_file, true);
|
||||
WshShell.Run("sabcmd \"" + xslt + "\" \"" + file + "\" \"" + html_file + "\"", true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## =================================================================
|
||||
## Logtalk - Object oriented extension to Prolog
|
||||
## Release 2.23.1
|
||||
## Release 2.24.0
|
||||
##
|
||||
## Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
|
||||
## =================================================================
|
||||
@@ -44,47 +44,47 @@ usage_help()
|
||||
|
||||
create_index_file()
|
||||
{
|
||||
echo "" > $index_file
|
||||
echo "" > "$index_file"
|
||||
|
||||
case "$format" in
|
||||
xhtml)
|
||||
echo "<?xml version=\"1.0\"?>" >> $index_file
|
||||
echo "<?xml-stylesheet href=\"logtalk.css\" type=\"text/css\"?>" >> $index_file
|
||||
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">" >> $index_file
|
||||
echo "<html lang=\"en\" xml:lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\">" >> $index_file
|
||||
echo "<?xml version=\"1.0\"?>" >> "$index_file"
|
||||
echo "<?xml-stylesheet href=\"logtalk.css\" type=\"text/css\"?>" >> "$index_file"
|
||||
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">" >> "$index_file"
|
||||
echo "<html lang=\"en\" xml:lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\">" >> "$index_file"
|
||||
;;
|
||||
html)
|
||||
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">" >> $index_file
|
||||
echo "<html>" >> $index_file
|
||||
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">" >> "$index_file"
|
||||
echo "<html>" >> "$index_file"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "<head>" >> $index_file
|
||||
echo " <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"/>" >> $index_file
|
||||
echo " <title>"$index_title"</title>" >> $index_file
|
||||
echo " <link rel=\"stylesheet\" href=\"logtalk.css\" type=\"text/css\"/>" >> $index_file
|
||||
echo "</head>" >> $index_file
|
||||
echo "<body>" >> $index_file
|
||||
echo "<h1>"$index_title"</h1>" >> $index_file
|
||||
echo "<ul>" >> $index_file
|
||||
echo "<head>" >> "$index_file"
|
||||
echo " <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"/>" >> "$index_file"
|
||||
echo " <title>"$index_title"</title>" >> "$index_file"
|
||||
echo " <link rel=\"stylesheet\" href=\"logtalk.css\" type=\"text/css\"/>" >> "$index_file"
|
||||
echo "</head>" >> "$index_file"
|
||||
echo "<body>" >> "$index_file"
|
||||
echo "<h1>"$index_title"</h1>" >> "$index_file"
|
||||
echo "<ul>" >> "$index_file"
|
||||
|
||||
for file in *.xml; do
|
||||
name="`expr "$file" : '\(.*\)\.[^./]*$' \| "$file"`"
|
||||
echo " indexing $name.html"
|
||||
echo " <li><a href=\""$name.html"\">"$name"</a></li>" >> $index_file
|
||||
echo " <li><a href=\""$name.html"\">"$name"</a></li>" >> "$index_file"
|
||||
done
|
||||
|
||||
echo "</ul>" >> $index_file
|
||||
echo "</ul>" >> "$index_file"
|
||||
|
||||
date="`eval date`"
|
||||
|
||||
echo "<p>Generated on "$date"</p>" >> $index_file
|
||||
echo "</body>" >> $index_file
|
||||
echo "</html>" >> $index_file
|
||||
echo "<p>Generated on "$date"</p>" >> "$index_file"
|
||||
echo "</body>" >> "$index_file"
|
||||
echo "</html>" >> "$index_file"
|
||||
}
|
||||
|
||||
|
||||
if ! [ $LOGTALKUSER ]
|
||||
if ! [ "$LOGTALKUSER" ]
|
||||
then
|
||||
echo "Error! The environment variable LOGTALKUSER must be defined first!"
|
||||
exit 1
|
||||
@@ -150,9 +150,9 @@ else
|
||||
xslt=$html_xslt
|
||||
fi
|
||||
|
||||
cp $LOGTALKUSER/xml/logtalk.dtd .
|
||||
cp $LOGTALKUSER/xml/logtalk.xsd .
|
||||
cp $LOGTALKUSER/xml/logtalk.css $directory
|
||||
cp "$LOGTALKUSER"/xml/logtalk.dtd .
|
||||
cp "$LOGTALKUSER"/xml/logtalk.xsd .
|
||||
cp "$LOGTALKUSER"/xml/logtalk.css "$directory"
|
||||
|
||||
echo
|
||||
echo "converting XML files..."
|
||||
@@ -161,9 +161,9 @@ else
|
||||
echo " converting $file"
|
||||
name="`expr "$file" : '\(.*\)\.[^./]*$' \| "$file"`"
|
||||
case "$processor" in
|
||||
xsltproc) eval xsltproc -o $directory/$name.html $xslt $file;;
|
||||
xalan) eval xalan -o $directory/$name.html $file $xslt;;
|
||||
sabcmd) eval sabcmd $xslt $file $directory/$name.html;;
|
||||
xsltproc) eval xsltproc -o \"$directory\"/\"$name.html\" \"$xslt\" \"$file\";;
|
||||
xalan) eval xalan -o \"$directory\"/\"$name.html\" \"$file\" \"$xslt\";;
|
||||
sabcmd) eval sabcmd \"$xslt\" \"$file\" \"$directory\"/\"$name.html\";;
|
||||
esac
|
||||
done
|
||||
|
||||
@@ -171,7 +171,7 @@ else
|
||||
echo
|
||||
echo "generating index file..."
|
||||
|
||||
index_file=$directory/$index_file
|
||||
index_file="$directory/$index_file"
|
||||
create_index_file
|
||||
|
||||
echo "index file generated"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// =================================================================
|
||||
// Logtalk - Object oriented extension to Prolog
|
||||
// Release 2.23.1
|
||||
// Release 2.24.0
|
||||
//
|
||||
// Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
|
||||
// =================================================================
|
||||
@@ -37,8 +37,6 @@ else {
|
||||
WScript.Quit(1);
|
||||
}
|
||||
|
||||
logtalk_home = logtalk_home.replace(/\\/g, "\\\\");
|
||||
|
||||
var a4_xsl = logtalk_home + "\\xml\\lgtpdfa4.xsl";
|
||||
var us_xsl = logtalk_home + "\\xml\\lgtpdfus.xsl";
|
||||
var xsl;
|
||||
@@ -96,8 +94,8 @@ for (files.moveFirst(); !files.atEnd(); files.moveNext()) {
|
||||
var file = files.item().name;
|
||||
if (FSObject.GetExtensionName(file) == "xml") {
|
||||
WScript.Echo(" converting " + file);
|
||||
var pdf_file = directory + "\\" + FSObject.GetBaseName(file)+ ".pdf";
|
||||
WshShell.Run(processor + " -q -xml " + file + " -xsl " + xsl + " -pdf " + pdf_file, true);
|
||||
var pdf_file = directory + "\\" + FSObject.GetBaseName(file) + ".pdf";
|
||||
WshShell.Run(processor + " -q -xml \"" + file + "\" -xsl \"" + xsl + "\" -pdf \"" + pdf_file + "\"", true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## =================================================================
|
||||
## Logtalk - Object oriented extension to Prolog
|
||||
## Release 2.23.1
|
||||
## Release 2.24.0
|
||||
##
|
||||
## Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
|
||||
## =================================================================
|
||||
@@ -37,7 +37,7 @@ usage_help()
|
||||
exit 1
|
||||
}
|
||||
|
||||
if ! [ $LOGTALKUSER ]
|
||||
if ! [ "$LOGTALKUSER" ]
|
||||
then
|
||||
echo "Error! The environment variable LOGTALKUSER must be defined first!"
|
||||
exit 1
|
||||
@@ -91,8 +91,8 @@ else
|
||||
xsl=$us_xsl
|
||||
fi
|
||||
|
||||
cp $LOGTALKUSER/xml/logtalk.dtd .
|
||||
cp $LOGTALKUSER/xml/logtalk.xsd .
|
||||
cp "$LOGTALKUSER"/xml/logtalk.dtd .
|
||||
cp "$LOGTALKUSER"/xml/logtalk.xsd .
|
||||
|
||||
echo
|
||||
echo "converting XML files to PDF..."
|
||||
@@ -100,7 +100,7 @@ else
|
||||
for file in *.xml; do
|
||||
echo " converting $file"
|
||||
name="`expr "$file" : '\(.*\)\.[^./]*$' \| "$file"`"
|
||||
eval $processor -q -xml $file -xsl $xsl -pdf $directory/$name.pdf
|
||||
eval $processor -q -xml \"$file\" -xsl \"$xsl\" -pdf \"$directory\"/\"$name.pdf\"
|
||||
done
|
||||
|
||||
echo "conversion done"
|
||||
|
||||
3
Logtalk/xml/lgt2xml.bat
Normal file
3
Logtalk/xml/lgt2xml.bat
Normal file
@@ -0,0 +1,3 @@
|
||||
@ECHO off
|
||||
cscript "%LOGTALKUSER%\xml\lgt2xml.js" %1 %2 %3
|
||||
@ECHO on
|
||||
167
Logtalk/xml/lgt2xml.js
Normal file
167
Logtalk/xml/lgt2xml.js
Normal file
@@ -0,0 +1,167 @@
|
||||
// =================================================================
|
||||
// Logtalk - Object oriented extension to Prolog
|
||||
// Release 2.24.0
|
||||
//
|
||||
// Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
|
||||
// =================================================================
|
||||
|
||||
var WshShell = new ActiveXObject("WScript.Shell");
|
||||
|
||||
var xslt = "lgtxml.xsl"
|
||||
var spec = "logtalk.dtd"
|
||||
// var spec = "logtalk.xsd"
|
||||
var css = "logtalk.css";
|
||||
|
||||
var format = "xhtml";
|
||||
// var format = "html";
|
||||
|
||||
var directory = WshShell.CurrentDirectory;
|
||||
|
||||
var index_file = "index.html";
|
||||
var index_title = "Entity documentation index";
|
||||
|
||||
if (WScript.Arguments.Unnamed.Length > 0) {
|
||||
usage_help();
|
||||
WScript.Quit(0);
|
||||
}
|
||||
|
||||
var WshProcessEnv = WshShell.Environment("PROCESS");
|
||||
var WshSystemEnv = WshShell.Environment("SYSTEM");
|
||||
var WshUserEnv = WshShell.Environment("USER");
|
||||
var logtalk_home;
|
||||
|
||||
if (WshProcessEnv.Item("LOGTALKUSER"))
|
||||
logtalk_home = WshProcessEnv.Item("LOGTALKUSER");
|
||||
else if (WshSystemEnv.Item("LOGTALKUSER"))
|
||||
logtalk_home = WshSystemEnv.Item("LOGTALKUSER");
|
||||
else if (WshUserEnv.Item("LOGTALKUSER"))
|
||||
logtalk_home = WshUserEnv.Item("LOGTALKUSER")
|
||||
else {
|
||||
WScript.Echo("Error! The environment variable LOGTALKUSER must be defined first!");
|
||||
usage_help();
|
||||
WScript.Quit(1);
|
||||
}
|
||||
|
||||
var f_arg = "";
|
||||
var i_arg = "";
|
||||
var t_arg = "";
|
||||
|
||||
if (WScript.Arguments.Named.Exists("f"))
|
||||
f_arg = WScript.Arguments.Named.Item("f");
|
||||
|
||||
if (WScript.Arguments.Named.Exists("i"))
|
||||
i_arg = WScript.Arguments.Named.Item("i");
|
||||
|
||||
if (WScript.Arguments.Named.Exists("t"))
|
||||
t_arg = WScript.Arguments.Named.Item("t");
|
||||
|
||||
if (f_arg != "" && f_arg != "xhtml" && f_arg != "html") {
|
||||
WScript.Echo("Error! Unsupported output format: " + f_arg);
|
||||
WScript.Echo("");
|
||||
usage_help();
|
||||
} else if (f_arg != "")
|
||||
format = f_arg;
|
||||
|
||||
var FSObject = new ActiveXObject("Scripting.FileSystemObject");
|
||||
|
||||
if (i_arg != "")
|
||||
index_file=i_arg;
|
||||
|
||||
if (t_arg != "")
|
||||
index_title=t_arg;
|
||||
|
||||
FSObject.CopyFile(logtalk_home + "\\xml\\" + spec, directory + "\\" + spec);
|
||||
FSObject.CopyFile(logtalk_home + "\\xml\\" + xslt, directory + "\\" + xslt);
|
||||
FSObject.CopyFile(logtalk_home + "\\xml\\" + css, directory + "\\" + css);
|
||||
|
||||
WScript.Echo("");
|
||||
WScript.Echo("generating index file...");
|
||||
|
||||
create_index_file();
|
||||
|
||||
WScript.Echo("index file generated");
|
||||
WScript.Echo("");
|
||||
|
||||
WScript.Quit(0);
|
||||
|
||||
function usage_help() {
|
||||
WScript.Echo("");
|
||||
WScript.Echo("This script generates an index for all the Logtalk XML files");
|
||||
WScript.Echo("documenting files in the current directory");
|
||||
WScript.Echo("");
|
||||
WScript.Echo("Usage:");
|
||||
WScript.Echo(" " + WScript.ScriptName + " [/f:format] [/i:index] [/t:title]");
|
||||
WScript.Echo(" " + WScript.ScriptName + " help");
|
||||
WScript.Echo("");
|
||||
WScript.Echo("Optional arguments:");
|
||||
WScript.Echo(" f - format of the index file (either xhtml or html; default is " + format + ")");
|
||||
WScript.Echo(" i - name of the index file (default is " + index_file + ")");
|
||||
WScript.Echo(" t - title to be used on the index file (default is " + index_title + ")");
|
||||
WScript.Echo("");
|
||||
WScript.Quit(1);
|
||||
}
|
||||
|
||||
function create_index_file() {
|
||||
|
||||
var f = FSObject.CreateTextFile(index_file, true);
|
||||
|
||||
switch (format) {
|
||||
case "xhtml" :
|
||||
f.WriteLine("<?xml version=\"1.0\"?>");
|
||||
f.WriteLine("<?xml-stylesheet href=\"logtalk.css\" type=\"text/css\"?>");
|
||||
f.WriteLine("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">");
|
||||
f.WriteLine("<html lang=\"en\" xml:lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\">");
|
||||
break;
|
||||
case "html" :
|
||||
f.WriteLine("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">");
|
||||
f.WriteLine("<html>");
|
||||
break;
|
||||
}
|
||||
|
||||
f.WriteLine("<head>");
|
||||
f.WriteLine(" <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"/>");
|
||||
f.WriteLine(" <title>" + index_title + "</title>");
|
||||
f.WriteLine(" <link rel=\"stylesheet\" href=\"logtalk.css\" type=\"text/css\"/>");
|
||||
f.WriteLine("</head>");
|
||||
f.WriteLine("<body>");
|
||||
f.WriteLine("<h1>" + index_title + "</h1>");
|
||||
f.WriteLine("<ul>");
|
||||
|
||||
var files = new Enumerator(FSObject.GetFolder(directory).Files);
|
||||
|
||||
for (files.moveFirst(); !files.atEnd(); files.moveNext()) {
|
||||
var file = files.item().name;
|
||||
if (FSObject.GetExtensionName(file) == "xml") {
|
||||
WScript.Echo(" indexing " + file);
|
||||
f.WriteLine(" <li><a href=\"" + file + "\">" + FSObject.GetBaseName(file) + "</a></li>");
|
||||
}
|
||||
}
|
||||
|
||||
f.WriteLine("</ul>");
|
||||
|
||||
var today = new Date();
|
||||
var year = today.getFullYear();
|
||||
var month = today.getMonth() + 1;
|
||||
if (month < 10)
|
||||
month = "0" + month;
|
||||
day = today.getDate();
|
||||
if (day < 10)
|
||||
day = "0" + day;
|
||||
strToday = year + "/" + month + "/" + day;
|
||||
var hours = today.getHours();
|
||||
if (hours < 10)
|
||||
hours = "0" + hours;
|
||||
var mins = today.getMinutes();
|
||||
if (mins < 10)
|
||||
mins = "0" + mins;
|
||||
var secs = today.getSeconds();
|
||||
if (secs < 10)
|
||||
secs = "0" + secs;
|
||||
strTime = hours + ":" + mins + ":" + secs;
|
||||
f.WriteLine("<p>Generated on " + strToday + " - " + strTime + "</p>");
|
||||
|
||||
f.WriteLine("</body>");
|
||||
f.WriteLine("</html>");
|
||||
|
||||
f.Close();
|
||||
}
|
||||
129
Logtalk/xml/lgt2xml.sh
Executable file
129
Logtalk/xml/lgt2xml.sh
Executable file
@@ -0,0 +1,129 @@
|
||||
#!/bin/bash
|
||||
|
||||
## =================================================================
|
||||
## Logtalk - Object oriented extension to Prolog
|
||||
## Release 2.24.0
|
||||
##
|
||||
## Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
|
||||
## =================================================================
|
||||
|
||||
xslt=lgtxml.xsl
|
||||
spec=logtalk.dtd
|
||||
css=logtalk.css
|
||||
format=xhtml
|
||||
index_file=index.html
|
||||
index_title="Entity documentation index"
|
||||
|
||||
usage_help()
|
||||
{
|
||||
echo
|
||||
echo "This script generates an index for all the Logtalk XML files"
|
||||
echo "documenting files in the current directory"
|
||||
echo
|
||||
echo "Usage:"
|
||||
echo " $0 -f format -i index -t title"
|
||||
echo " $0 -h"
|
||||
echo
|
||||
echo "Optional arguments:"
|
||||
echo " -f format of the index file (either xhtml or html; default is $format)"
|
||||
echo " -i name of the index file (default is $index_file)"
|
||||
echo " -t title to be used on the index file (default is $index_title)"
|
||||
echo " -h help"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
create_index_file()
|
||||
{
|
||||
echo "" > "$index_file"
|
||||
|
||||
case "$format" in
|
||||
xhtml)
|
||||
echo "<?xml version=\"1.0\"?>" >> "$index_file"
|
||||
echo "<?xml-stylesheet href=\"logtalk.css\" type=\"text/css\"?>" >> "$index_file"
|
||||
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">" >> "$index_file"
|
||||
echo "<html lang=\"en\" xml:lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\">" >> "$index_file"
|
||||
;;
|
||||
html)
|
||||
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">" >> "$index_file"
|
||||
echo "<html>" >> "$index_file"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "<head>" >> "$index_file"
|
||||
echo " <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"/>" >> "$index_file"
|
||||
echo " <title>"$index_title"</title>" >> "$index_file"
|
||||
echo " <link rel=\"stylesheet\" href=\"logtalk.css\" type=\"text/css\"/>" >> "$index_file"
|
||||
echo "</head>" >> "$index_file"
|
||||
echo "<body>" >> "$index_file"
|
||||
echo "<h1>"$index_title"</h1>" >> "$index_file"
|
||||
echo "<ul>" >> "$index_file"
|
||||
|
||||
for file in *.xml; do
|
||||
name="`expr "$file" : '\(.*\)\.[^./]*$' \| "$file"`"
|
||||
echo " indexing $file"
|
||||
echo " <li><a href=\""$file"\">"$name"</a></li>" >> "$index_file"
|
||||
done
|
||||
|
||||
echo "</ul>" >> "$index_file"
|
||||
|
||||
date="`eval date`"
|
||||
|
||||
echo "<p>Generated on "$date"</p>" >> "$index_file"
|
||||
echo "</body>" >> "$index_file"
|
||||
echo "</html>" >> "$index_file"
|
||||
}
|
||||
|
||||
|
||||
if ! [ "$LOGTALKUSER" ]
|
||||
then
|
||||
echo "Error! The environment variable LOGTALKUSER must be defined first!"
|
||||
exit 1
|
||||
else
|
||||
|
||||
while getopts "f:i:t:h" Option
|
||||
do
|
||||
case $Option in
|
||||
f) f_arg="$OPTARG";;
|
||||
i) i_arg="$OPTARG";;
|
||||
t) t_arg="$OPTARG";;
|
||||
h) usage_help;;
|
||||
*) usage_help;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ "$f_arg" != "" && "$f_arg" != "xhtml" && "$f_arg" != "html" ]]
|
||||
then
|
||||
echo "Error! Unsupported output format: $f_arg"
|
||||
usage_help
|
||||
exit 1
|
||||
elif [ "$f_arg" != "" ]
|
||||
then
|
||||
format=$f_arg
|
||||
fi
|
||||
|
||||
if [[ "$i_arg" != "" ]]
|
||||
then
|
||||
index_file=$i_arg
|
||||
fi
|
||||
|
||||
if [[ "$t_arg" != "" ]]
|
||||
then
|
||||
index_title=$t_arg
|
||||
fi
|
||||
|
||||
cp "$LOGTALKUSER"/xml/$spec .
|
||||
cp "$LOGTALKUSER"/xml/$css .
|
||||
cp "$LOGTALKUSER"/xml/$xslt .
|
||||
|
||||
echo
|
||||
echo "generating index file..."
|
||||
|
||||
create_index_file
|
||||
|
||||
echo "index file generated"
|
||||
echo
|
||||
|
||||
exit 0
|
||||
|
||||
fi
|
||||
@@ -17,7 +17,7 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
% Logtalk - Object oriented extension to Prolog
|
||||
% Release 2.23.1
|
||||
% Release 2.24.0
|
||||
%
|
||||
% Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
|
||||
%
|
||||
@@ -33,47 +33,63 @@
|
||||
<link rel="stylesheet" href="logtalk.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<hr />
|
||||
<h4 class="type"><xsl:value-of select="logtalk/entity/type" /></h4>
|
||||
<h1 class="code"><xsl:value-of select="logtalk/entity/name" /></h1>
|
||||
<xsl:apply-templates select="logtalk/entity" />
|
||||
<hr />
|
||||
<xsl:apply-templates select="logtalk/relations" />
|
||||
<hr />
|
||||
<xsl:apply-templates select="logtalk/predicates" />
|
||||
<hr />
|
||||
<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>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="logtalk/entity">
|
||||
<xsl:if test="comment">
|
||||
<blockquote><p class="blockquote"><xsl:value-of select="comment" /></p></blockquote>
|
||||
</xsl:if>
|
||||
<dl>
|
||||
<dl class="properties">
|
||||
<xsl:if test="author">
|
||||
<dt>author:</dt>
|
||||
<dd><code><xsl:value-of select="author" /></code></dd>
|
||||
<dt class ="key">author:</dt>
|
||||
<dd class="value"><code><xsl:value-of select="author" /></code></dd>
|
||||
</xsl:if>
|
||||
<xsl:if test="version">
|
||||
<dt>version:</dt>
|
||||
<dd><code><xsl:value-of select="version" /></code></dd>
|
||||
<dt class ="key">version:</dt>
|
||||
<dd class="value"><code><xsl:value-of select="version" /></code></dd>
|
||||
</xsl:if>
|
||||
<xsl:if test="date">
|
||||
<dt>date:</dt>
|
||||
<dd><code><xsl:value-of select="date" /></code></dd>
|
||||
<dt class ="key">date:</dt>
|
||||
<dd class="value"><code><xsl:value-of select="date" /></code></dd>
|
||||
</xsl:if>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>compilation:</dt>
|
||||
<dd><code><xsl:value-of select="compilation" /></code></dd>
|
||||
<dl class="properties">
|
||||
<dt class ="key">compilation:</dt>
|
||||
<dd class ="value"><code><xsl:value-of select="compilation" /></code></dd>
|
||||
</dl>
|
||||
<xsl:if test="info">
|
||||
<dl>
|
||||
<dl class="properties">
|
||||
<xsl:for-each select="info">
|
||||
<dt><xsl:value-of select="key" />:</dt>
|
||||
<dd><code><xsl:value-of select="value" /></code></dd>
|
||||
<dt class ="key"><xsl:value-of select="key" />:</dt>
|
||||
<dd class ="value"><code><xsl:value-of select="value" /></code></dd>
|
||||
</xsl:for-each>
|
||||
</dl>
|
||||
</xsl:if>
|
||||
@@ -83,148 +99,196 @@
|
||||
<xsl:template match="logtalk/relations">
|
||||
<xsl:choose>
|
||||
<xsl:when test="*">
|
||||
<dl class="relations">
|
||||
<xsl:if test="implements">
|
||||
<dl>
|
||||
<dt>implements:</dt>
|
||||
<dt class ="key">implements:</dt>
|
||||
<xsl:apply-templates select="implements" />
|
||||
</dl>
|
||||
</xsl:if>
|
||||
<xsl:if test="imports">
|
||||
<dl>
|
||||
<dt>imports:</dt>
|
||||
<dt class ="key">imports:</dt>
|
||||
<xsl:apply-templates select="imports" />
|
||||
</dl>
|
||||
</xsl:if>
|
||||
<xsl:if test="extends">
|
||||
<dl>
|
||||
<dt>extends:</dt>
|
||||
<dt class ="key">extends:</dt>
|
||||
<xsl:apply-templates select="extends" />
|
||||
</dl>
|
||||
</xsl:if>
|
||||
<xsl:if test="instantiates">
|
||||
<dl>
|
||||
<dt>instantiates:</dt>
|
||||
<dt class ="key">instantiates:</dt>
|
||||
<xsl:apply-templates select="instantiates" />
|
||||
</dl>
|
||||
</xsl:if>
|
||||
<xsl:if test="specializes">
|
||||
<dl>
|
||||
<dt>specializes:</dt>
|
||||
<dt class ="key">specializes:</dt>
|
||||
<xsl:apply-templates select="specializes" />
|
||||
</dl>
|
||||
</xsl:if>
|
||||
<xsl:if test="uses">
|
||||
<dl>
|
||||
<dt>uses:</dt>
|
||||
<dt class ="key">uses:</dt>
|
||||
<xsl:apply-templates select="uses" />
|
||||
</dl>
|
||||
</xsl:if>
|
||||
<xsl:if test="calls">
|
||||
<dl>
|
||||
<dt>calls:</dt>
|
||||
<dt class ="key">calls:</dt>
|
||||
<xsl:apply-templates select="calls" />
|
||||
</dl>
|
||||
</xsl:if>
|
||||
</dl>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<h4 class="code">(no dependencies on other files)</h4>
|
||||
<p class="comment">(no dependencies on other files)</p>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="logtalk/relations/uses">
|
||||
<dd><code><a href="{file}.html"><xsl:value-of select="name" /></a></code></dd>
|
||||
<dd class ="value"><code><a href="{file}.html"><xsl:value-of select="name" /></a></code></dd>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="logtalk/relations/calls">
|
||||
<dd><code><a href="{file}.html"><xsl:value-of select="name" /></a></code></dd>
|
||||
<dd class ="value"><code><a href="{file}.html"><xsl:value-of select="name" /></a></code></dd>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="logtalk/relations/*">
|
||||
<dd><code><xsl:value-of select="scope" /><xsl:text> </xsl:text><a href="{file}.html"><xsl:value-of select="name" /></a></code></dd>
|
||||
<dd class ="value"><code><xsl:value-of select="scope" /><xsl:text> </xsl:text><a href="{file}.html"><xsl:value-of select="name" /></a></code></dd>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="logtalk/predicates">
|
||||
<h1>Public interface</h1>
|
||||
<div class="public">
|
||||
<h2>Public interface</h2>
|
||||
<xsl:choose>
|
||||
<xsl:when test="public/predicate">
|
||||
<xsl:apply-templates select="public/predicate" />
|
||||
</xsl:when>
|
||||
<xsl:when test="/logtalk/relations/*">
|
||||
<h4 class="code">(see related entities)</h4>
|
||||
<div class="section">
|
||||
<p class="comment">(see related entities)</p>
|
||||
</div>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<h4 class="code">(none)</h4>
|
||||
<div class="section">
|
||||
<p class="comment">(none)</p>
|
||||
</div>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<h1>Protected interface</h1>
|
||||
</div>
|
||||
<div class="protected">
|
||||
<h2>Protected interface</h2>
|
||||
<xsl:choose>
|
||||
<xsl:when test="protected/predicate">
|
||||
<xsl:apply-templates select="protected/predicate" />
|
||||
</xsl:when>
|
||||
<xsl:when test="/logtalk/relations/*">
|
||||
<h4 class="code">(see related entities)</h4>
|
||||
<div class="section">
|
||||
<p class="comment">(see related entities)</p>
|
||||
</div>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<h4 class="code">(none)</h4>
|
||||
<div class="section">
|
||||
<p class="comment">(none)</p>
|
||||
</div>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<h1>Private predicates</h1>
|
||||
</div>
|
||||
<div class="private">
|
||||
<h2>Private predicates</h2>
|
||||
<xsl:choose>
|
||||
<xsl:when test="private/predicate">
|
||||
<xsl:apply-templates select="private/predicate" />
|
||||
</xsl:when>
|
||||
<xsl:when test="/logtalk/relations/*">
|
||||
<h4 class="code">(see related entities)</h4>
|
||||
<div class="section">
|
||||
<p class="comment">(see related entities)</p>
|
||||
</div>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<h4 class="code">(none)</h4>
|
||||
<div class="section">
|
||||
<p class="comment">(none)</p>
|
||||
</div>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="*/predicate">
|
||||
<h4 class="code"><xsl:value-of select="name" /></h4>
|
||||
<div class="section">
|
||||
<h3 class="code"><xsl:value-of select="name" /></h3>
|
||||
<blockquote>
|
||||
<xsl:if test="comment">
|
||||
<blockquote><p class="blockquote"><xsl:value-of select="comment" /></p></blockquote>
|
||||
<p class="comment"><xsl:value-of select="comment" /></p>
|
||||
</xsl:if>
|
||||
<dl class="predicate">
|
||||
<dt>compilation:</dt>
|
||||
<dd><code><xsl:value-of select="compilation" /></code></dd>
|
||||
</blockquote>
|
||||
<dl class="properties">
|
||||
<dt class ="key">compilation:</dt>
|
||||
<dd class ="value"><code><xsl:value-of select="compilation" /></code></dd>
|
||||
<xsl:if test="template">
|
||||
<dt>template:</dt>
|
||||
<dd><code><xsl:value-of select="template" /></code></dd>
|
||||
<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>
|
||||
</xsl:if>
|
||||
<xsl:if test="meta">
|
||||
<dt>metapredicate template:</dt>
|
||||
<dd><code><xsl:value-of select="meta" /></code></dd>
|
||||
<dt class ="key">metapredicate template:</dt>
|
||||
<dd class ="value"><code><xsl:value-of select="meta" /></code></dd>
|
||||
</xsl:if>
|
||||
<xsl:if test="mode">
|
||||
<dt>mode - number of solutions:</dt>
|
||||
<dt class ="key">mode<xsl:text disable-output-escaping="yes"> &ndash; </xsl:text>number of solutions:</dt>
|
||||
<xsl:for-each select="mode">
|
||||
<dd><code><xsl:value-of select="template" /><xsl:text> - </xsl:text><xsl:value-of select="solutions" /></code></dd>
|
||||
<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>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
<xsl:if test="exceptions">
|
||||
<dt>exceptions:</dt>
|
||||
<dt class ="key">exceptions:</dt>
|
||||
<xsl:for-each select="exceptions/exception">
|
||||
<dd><xsl:value-of select="condition" />: <code><xsl:value-of select="term" /></code></dd>
|
||||
<dd class ="value"><xsl:value-of select="condition" />: <code><xsl:value-of select="term" /></code></dd>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
<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>
|
||||
</dl>
|
||||
<xsl:if test="info">
|
||||
<dl class="predicate">
|
||||
<dl class="properties">
|
||||
<xsl:for-each select="info">
|
||||
<dt><xsl:value-of select="key" />:</dt>
|
||||
<dd><code><xsl:value-of select="value" /></code></dd>
|
||||
<dt class ="key"><xsl:value-of select="key" />:</dt>
|
||||
<dd class ="value"><code><xsl:value-of select="value" /></code></dd>
|
||||
</xsl:for-each>
|
||||
</dl>
|
||||
</xsl:if>
|
||||
</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>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
% Logtalk - Object oriented extension to Prolog
|
||||
% Release 2.23.1
|
||||
% Release 2.24.0
|
||||
%
|
||||
% Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
|
||||
%
|
||||
@@ -78,6 +78,7 @@
|
||||
<xsl:apply-templates select="logtalk/entity"/>
|
||||
<xsl:apply-templates select="logtalk/relations"/>
|
||||
<xsl:apply-templates select="logtalk/predicates"/>
|
||||
<xsl:apply-templates select="logtalk/remarks"/>
|
||||
<fo:block id="end"/>
|
||||
</fo:flow>
|
||||
|
||||
@@ -95,17 +96,34 @@
|
||||
margin-left="10mm"
|
||||
font-size="10pt"
|
||||
font-family="serif"
|
||||
font-style="italic"
|
||||
space-after="8pt">
|
||||
font-style="italic">
|
||||
<xsl:value-of select="comment"/>
|
||||
</fo:block>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="parameters">
|
||||
<fo:block
|
||||
font-size="9pt"
|
||||
font-family="monospace"
|
||||
margin-left="10mm"
|
||||
space-before="4pt">
|
||||
</fo:block>
|
||||
<xsl:for-each select="parameters/parameter">
|
||||
<fo:block
|
||||
font-size="9pt"
|
||||
font-family="monospace"
|
||||
margin-left="10mm">
|
||||
<xsl:value-of select="name"/> - <xsl:value-of select="description"/>
|
||||
</fo:block>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="author">
|
||||
<fo:block
|
||||
font-size="10pt"
|
||||
font-family="serif"
|
||||
keep-with-next="always">
|
||||
keep-with-next="always"
|
||||
space-before="8pt">
|
||||
author:
|
||||
</fo:block>
|
||||
<fo:block
|
||||
@@ -157,7 +175,7 @@
|
||||
font-size="9pt"
|
||||
font-family="monospace"
|
||||
margin-left="10mm"
|
||||
space-after="8pt">
|
||||
space-after="4pt">
|
||||
<xsl:value-of select="compilation"/>
|
||||
</fo:block>
|
||||
|
||||
@@ -182,6 +200,11 @@
|
||||
|
||||
|
||||
<xsl:template match="logtalk/relations">
|
||||
<fo:block
|
||||
font-size="10pt"
|
||||
font-family="serif"
|
||||
space-before="4pt">
|
||||
</fo:block>
|
||||
<xsl:choose>
|
||||
<xsl:when test="*">
|
||||
<xsl:if test="implements">
|
||||
@@ -250,9 +273,10 @@
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<fo:block
|
||||
font-size="10pt"
|
||||
font-size="10pt"
|
||||
font-family="serif"
|
||||
keep-with-next="always">
|
||||
font-style="italic"
|
||||
space-before="4pt">
|
||||
(no dependencies on other files)
|
||||
</fo:block>
|
||||
</xsl:otherwise>
|
||||
@@ -431,7 +455,8 @@
|
||||
<fo:block
|
||||
font-size="10pt"
|
||||
font-family="serif"
|
||||
keep-with-next="always">
|
||||
keep-with-next="always"
|
||||
space-before="4pt">
|
||||
template:
|
||||
</fo:block>
|
||||
<fo:block
|
||||
@@ -442,12 +467,29 @@
|
||||
</fo:block>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="arguments">
|
||||
<fo:block
|
||||
font-size="9pt"
|
||||
font-family="monospace"
|
||||
margin-left="10mm"
|
||||
space-before="4pt">
|
||||
</fo:block>
|
||||
<xsl:for-each select="arguments/argument">
|
||||
<fo:block
|
||||
margin-left="10mm">
|
||||
<fo:inline font-size="9pt" font-family="monospace"><xsl:value-of select="name"/></fo:inline>
|
||||
<fo:inline font-size="10pt" font-family="serif" font-style="italic"> - <xsl:value-of select="description"/></fo:inline>
|
||||
</fo:block>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="meta">
|
||||
<fo:block
|
||||
font-size="10pt"
|
||||
font-family="serif"
|
||||
keep-with-next="always">
|
||||
metapredicate template:
|
||||
keep-with-next="always"
|
||||
space-before="4pt">
|
||||
meta-predicate template:
|
||||
</fo:block>
|
||||
<fo:block
|
||||
font-size="9pt"
|
||||
@@ -461,7 +503,8 @@
|
||||
<fo:block
|
||||
font-size="10pt"
|
||||
font-family="serif"
|
||||
keep-with-next="always">
|
||||
keep-with-next="always"
|
||||
space-before="4pt">
|
||||
mode - number of solutions:
|
||||
</fo:block>
|
||||
<xsl:for-each select="mode">
|
||||
@@ -478,7 +521,8 @@
|
||||
<fo:block
|
||||
font-size="10pt"
|
||||
font-family="serif"
|
||||
keep-with-next="always">
|
||||
keep-with-next="always"
|
||||
space-before="4pt">
|
||||
exceptions:
|
||||
</fo:block>
|
||||
<xsl:for-each select="exceptions/exception">
|
||||
@@ -498,12 +542,46 @@
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="examples">
|
||||
<fo:block
|
||||
font-size="10pt"
|
||||
font-family="serif"
|
||||
keep-with-next="always"
|
||||
space-before="4pt">
|
||||
examples:
|
||||
</fo:block>
|
||||
<xsl:for-each select="examples/example">
|
||||
<fo:block
|
||||
font-size="10pt"
|
||||
font-family="serif"
|
||||
font-style="italic"
|
||||
keep-with-next="always"
|
||||
margin-left="10mm">
|
||||
<xsl:value-of select="description" />
|
||||
</fo:block>
|
||||
<fo:block
|
||||
font-size="9pt"
|
||||
font-family="monospace"
|
||||
margin-left="20mm">
|
||||
<xsl:value-of select="call" />
|
||||
</fo:block>
|
||||
<fo:block
|
||||
font-size="9pt"
|
||||
font-family="monospace"
|
||||
margin-left="20mm"
|
||||
space-after="4pt">
|
||||
<xsl:value-of select="bindings" />
|
||||
</fo:block>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="info">
|
||||
<xsl:for-each select="info">
|
||||
<fo:block
|
||||
font-size="10pt"
|
||||
font-family="serif"
|
||||
keep-with-next="always">
|
||||
keep-with-next="always"
|
||||
space-before="4pt">
|
||||
<xsl:value-of select="key"/>:
|
||||
</fo:block>
|
||||
<fo:block
|
||||
@@ -518,4 +596,47 @@
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="logtalk/remarks">
|
||||
|
||||
<fo:block
|
||||
font-size="14pt"
|
||||
font-family="sans-serif"
|
||||
font-weight="bold"
|
||||
keep-with-next="always"
|
||||
space-before="18pt">
|
||||
Remarks
|
||||
</fo:block>
|
||||
<xsl:choose>
|
||||
<xsl:when test="*">
|
||||
<xsl:for-each select="remark">
|
||||
<fo:block
|
||||
font-size="10pt"
|
||||
font-family="serif"
|
||||
font-style="italic"
|
||||
keep-with-next="always"
|
||||
space-before="10pt">
|
||||
<xsl:value-of select="topic" />
|
||||
</fo:block>
|
||||
<fo:block
|
||||
font-size="10pt"
|
||||
font-family="serif"
|
||||
margin-left="10mm">
|
||||
<xsl:value-of select="text" />
|
||||
</fo:block>
|
||||
</xsl:for-each>
|
||||
</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:stylesheet>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
% Logtalk - Object oriented extension to Prolog
|
||||
% Release 2.23.1
|
||||
% Release 2.24.0
|
||||
%
|
||||
% Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
|
||||
%
|
||||
@@ -71,13 +71,14 @@
|
||||
<fo:block
|
||||
font-size="18pt"
|
||||
font-family="sans-serif"
|
||||
font-weight="bold"
|
||||
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"/>
|
||||
<xsl:apply-templates select="logtalk/remarks"/>
|
||||
<fo:block id="end"/>
|
||||
</fo:flow>
|
||||
|
||||
@@ -95,17 +96,34 @@
|
||||
margin-left="10mm"
|
||||
font-size="10pt"
|
||||
font-family="serif"
|
||||
font-style="italic"
|
||||
space-after="8pt">
|
||||
font-style="italic">
|
||||
<xsl:value-of select="comment"/>
|
||||
</fo:block>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="parameters">
|
||||
<fo:block
|
||||
font-size="9pt"
|
||||
font-family="monospace"
|
||||
margin-left="10mm"
|
||||
space-before="4pt">
|
||||
</fo:block>
|
||||
<xsl:for-each select="parameters/parameter">
|
||||
<fo:block
|
||||
font-size="9pt"
|
||||
font-family="monospace"
|
||||
margin-left="10mm">
|
||||
<xsl:value-of select="name"/> - <xsl:value-of select="description"/>
|
||||
</fo:block>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="author">
|
||||
<fo:block
|
||||
font-size="10pt"
|
||||
font-family="serif"
|
||||
keep-with-next="always">
|
||||
keep-with-next="always"
|
||||
space-before="8pt">
|
||||
author:
|
||||
</fo:block>
|
||||
<fo:block
|
||||
@@ -157,7 +175,7 @@
|
||||
font-size="9pt"
|
||||
font-family="monospace"
|
||||
margin-left="10mm"
|
||||
space-after="8pt">
|
||||
space-after="4pt">
|
||||
<xsl:value-of select="compilation"/>
|
||||
</fo:block>
|
||||
|
||||
@@ -182,6 +200,11 @@
|
||||
|
||||
|
||||
<xsl:template match="logtalk/relations">
|
||||
<fo:block
|
||||
font-size="10pt"
|
||||
font-family="serif"
|
||||
space-before="4pt">
|
||||
</fo:block>
|
||||
<xsl:choose>
|
||||
<xsl:when test="*">
|
||||
<xsl:if test="implements">
|
||||
@@ -250,9 +273,10 @@
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<fo:block
|
||||
font-size="10pt"
|
||||
font-size="10pt"
|
||||
font-family="serif"
|
||||
keep-with-next="always">
|
||||
font-style="italic"
|
||||
space-before="4pt">
|
||||
(no dependencies on other files)
|
||||
</fo:block>
|
||||
</xsl:otherwise>
|
||||
@@ -431,7 +455,8 @@
|
||||
<fo:block
|
||||
font-size="10pt"
|
||||
font-family="serif"
|
||||
keep-with-next="always">
|
||||
keep-with-next="always"
|
||||
space-before="4pt">
|
||||
template:
|
||||
</fo:block>
|
||||
<fo:block
|
||||
@@ -442,12 +467,29 @@
|
||||
</fo:block>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="arguments">
|
||||
<fo:block
|
||||
font-size="9pt"
|
||||
font-family="monospace"
|
||||
margin-left="10mm"
|
||||
space-before="4pt">
|
||||
</fo:block>
|
||||
<xsl:for-each select="arguments/argument">
|
||||
<fo:block
|
||||
margin-left="10mm">
|
||||
<fo:inline font-size="9pt" font-family="monospace"><xsl:value-of select="name"/></fo:inline>
|
||||
<fo:inline font-size="10pt" font-family="serif" font-style="italic"> - <xsl:value-of select="description"/></fo:inline>
|
||||
</fo:block>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="meta">
|
||||
<fo:block
|
||||
font-size="10pt"
|
||||
font-family="serif"
|
||||
keep-with-next="always">
|
||||
metapredicate template:
|
||||
keep-with-next="always"
|
||||
space-before="4pt">
|
||||
meta-predicate template:
|
||||
</fo:block>
|
||||
<fo:block
|
||||
font-size="9pt"
|
||||
@@ -461,7 +503,8 @@
|
||||
<fo:block
|
||||
font-size="10pt"
|
||||
font-family="serif"
|
||||
keep-with-next="always">
|
||||
keep-with-next="always"
|
||||
space-before="4pt">
|
||||
mode - number of solutions:
|
||||
</fo:block>
|
||||
<xsl:for-each select="mode">
|
||||
@@ -478,7 +521,8 @@
|
||||
<fo:block
|
||||
font-size="10pt"
|
||||
font-family="serif"
|
||||
keep-with-next="always">
|
||||
keep-with-next="always"
|
||||
space-before="4pt">
|
||||
exceptions:
|
||||
</fo:block>
|
||||
<xsl:for-each select="exceptions/exception">
|
||||
@@ -498,14 +542,48 @@
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="examples">
|
||||
<fo:block
|
||||
font-size="10pt"
|
||||
font-family="serif"
|
||||
keep-with-next="always"
|
||||
space-before="4pt">
|
||||
examples:
|
||||
</fo:block>
|
||||
<xsl:for-each select="examples/example">
|
||||
<fo:block
|
||||
font-size="10pt"
|
||||
font-family="serif"
|
||||
font-style="italic"
|
||||
keep-with-next="always"
|
||||
margin-left="10mm">
|
||||
<xsl:value-of select="description" />
|
||||
</fo:block>
|
||||
<fo:block
|
||||
font-size="9pt"
|
||||
font-family="monospace"
|
||||
margin-left="20mm">
|
||||
<xsl:value-of select="call" />
|
||||
</fo:block>
|
||||
<fo:block
|
||||
font-size="9pt"
|
||||
font-family="monospace"
|
||||
margin-left="20mm"
|
||||
space-after="4pt">
|
||||
<xsl:value-of select="bindings" />
|
||||
</fo:block>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="info">
|
||||
<xsl:for-each select="info">
|
||||
<fo:block
|
||||
font-size="10pt"
|
||||
font-family="serif"
|
||||
keep-with-next="always">
|
||||
<xsl:value-of select="key"/>:
|
||||
</fo:block>
|
||||
keep-with-next="always"
|
||||
space-before="4pt">
|
||||
<xsl:value-of select="key"/>:
|
||||
</fo:block>
|
||||
<fo:block
|
||||
font-size="9pt"
|
||||
font-family="monospace"
|
||||
@@ -518,4 +596,47 @@
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="logtalk/remarks">
|
||||
|
||||
<fo:block
|
||||
font-size="14pt"
|
||||
font-family="sans-serif"
|
||||
font-weight="bold"
|
||||
keep-with-next="always"
|
||||
space-before="18pt">
|
||||
Remarks
|
||||
</fo:block>
|
||||
<xsl:choose>
|
||||
<xsl:when test="*">
|
||||
<xsl:for-each select="remark">
|
||||
<fo:block
|
||||
font-size="10pt"
|
||||
font-family="serif"
|
||||
font-style="italic"
|
||||
keep-with-next="always"
|
||||
space-before="10pt">
|
||||
<xsl:value-of select="topic" />
|
||||
</fo:block>
|
||||
<fo:block
|
||||
font-size="10pt"
|
||||
font-family="serif"
|
||||
margin-left="10mm">
|
||||
<xsl:value-of select="text" />
|
||||
</fo:block>
|
||||
</xsl:for-each>
|
||||
</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:stylesheet>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
% Logtalk - Object oriented extension to Prolog
|
||||
% Release 2.23.1
|
||||
% Release 2.24.0
|
||||
%
|
||||
% Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
|
||||
%
|
||||
@@ -35,47 +35,63 @@
|
||||
<link rel="stylesheet" href="logtalk.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<hr />
|
||||
<h4 class="type"><xsl:value-of select="logtalk/entity/type" /></h4>
|
||||
<h1 class="code"><xsl:value-of select="logtalk/entity/name" /></h1>
|
||||
<xsl:apply-templates select="logtalk/entity" />
|
||||
<hr />
|
||||
<xsl:apply-templates select="logtalk/relations" />
|
||||
<hr />
|
||||
<xsl:apply-templates select="logtalk/predicates" />
|
||||
<hr />
|
||||
<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>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="logtalk/entity">
|
||||
<xsl:if test="comment">
|
||||
<blockquote><p class="blockquote"><xsl:value-of select="comment" /></p></blockquote>
|
||||
</xsl:if>
|
||||
<dl>
|
||||
<dl class="properties">
|
||||
<xsl:if test="author">
|
||||
<dt>author:</dt>
|
||||
<dd><code><xsl:value-of select="author" /></code></dd>
|
||||
<dt class ="key">author:</dt>
|
||||
<dd class="value"><code><xsl:value-of select="author" /></code></dd>
|
||||
</xsl:if>
|
||||
<xsl:if test="version">
|
||||
<dt>version:</dt>
|
||||
<dd><code><xsl:value-of select="version" /></code></dd>
|
||||
<dt class ="key">version:</dt>
|
||||
<dd class="value"><code><xsl:value-of select="version" /></code></dd>
|
||||
</xsl:if>
|
||||
<xsl:if test="date">
|
||||
<dt>date:</dt>
|
||||
<dd><code><xsl:value-of select="date" /></code></dd>
|
||||
<dt class ="key">date:</dt>
|
||||
<dd class="value"><code><xsl:value-of select="date" /></code></dd>
|
||||
</xsl:if>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>compilation:</dt>
|
||||
<dd><code><xsl:value-of select="compilation" /></code></dd>
|
||||
<dl class="properties">
|
||||
<dt class ="key">compilation:</dt>
|
||||
<dd class ="value"><code><xsl:value-of select="compilation" /></code></dd>
|
||||
</dl>
|
||||
<xsl:if test="info">
|
||||
<dl>
|
||||
<dl class="properties">
|
||||
<xsl:for-each select="info">
|
||||
<dt><xsl:value-of select="key" />:</dt>
|
||||
<dd><code><xsl:value-of select="value" /></code></dd>
|
||||
<dt class ="key"><xsl:value-of select="key" />:</dt>
|
||||
<dd class ="value"><code><xsl:value-of select="value" /></code></dd>
|
||||
</xsl:for-each>
|
||||
</dl>
|
||||
</xsl:if>
|
||||
@@ -85,148 +101,196 @@
|
||||
<xsl:template match="logtalk/relations">
|
||||
<xsl:choose>
|
||||
<xsl:when test="*">
|
||||
<dl class="relations">
|
||||
<xsl:if test="implements">
|
||||
<dl>
|
||||
<dt>implements:</dt>
|
||||
<dt class ="key">implements:</dt>
|
||||
<xsl:apply-templates select="implements" />
|
||||
</dl>
|
||||
</xsl:if>
|
||||
<xsl:if test="imports">
|
||||
<dl>
|
||||
<dt>imports:</dt>
|
||||
<dt class ="key">imports:</dt>
|
||||
<xsl:apply-templates select="imports" />
|
||||
</dl>
|
||||
</xsl:if>
|
||||
<xsl:if test="extends">
|
||||
<dl>
|
||||
<dt>extends:</dt>
|
||||
<dt class ="key">extends:</dt>
|
||||
<xsl:apply-templates select="extends" />
|
||||
</dl>
|
||||
</xsl:if>
|
||||
<xsl:if test="instantiates">
|
||||
<dl>
|
||||
<dt>instantiates:</dt>
|
||||
<dt class ="key">instantiates:</dt>
|
||||
<xsl:apply-templates select="instantiates" />
|
||||
</dl>
|
||||
</xsl:if>
|
||||
<xsl:if test="specializes">
|
||||
<dl>
|
||||
<dt>specializes:</dt>
|
||||
<dt class ="key">specializes:</dt>
|
||||
<xsl:apply-templates select="specializes" />
|
||||
</dl>
|
||||
</xsl:if>
|
||||
<xsl:if test="uses">
|
||||
<dl>
|
||||
<dt>uses:</dt>
|
||||
<dt class ="key">uses:</dt>
|
||||
<xsl:apply-templates select="uses" />
|
||||
</dl>
|
||||
</xsl:if>
|
||||
<xsl:if test="calls">
|
||||
<dl>
|
||||
<dt>calls:</dt>
|
||||
<dt class ="key">calls:</dt>
|
||||
<xsl:apply-templates select="calls" />
|
||||
</dl>
|
||||
</xsl:if>
|
||||
</dl>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<h4 class="code">(no dependencies on other files)</h4>
|
||||
<p class="comment">(no dependencies on other files)</p>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="logtalk/relations/uses">
|
||||
<dd><code><a href="{file}.html"><xsl:value-of select="name" /></a></code></dd>
|
||||
<dd class ="value"><code><a href="{file}.html"><xsl:value-of select="name" /></a></code></dd>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="logtalk/relations/calls">
|
||||
<dd><code><a href="{file}.html"><xsl:value-of select="name" /></a></code></dd>
|
||||
<dd class ="value"><code><a href="{file}.html"><xsl:value-of select="name" /></a></code></dd>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="logtalk/relations/*">
|
||||
<dd><code><xsl:value-of select="scope" /><xsl:text> </xsl:text><a href="{file}.html"><xsl:value-of select="name" /></a></code></dd>
|
||||
<dd class ="value"><code><xsl:value-of select="scope" /><xsl:text> </xsl:text><a href="{file}.html"><xsl:value-of select="name" /></a></code></dd>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="logtalk/predicates">
|
||||
<h1>Public interface</h1>
|
||||
<div class="public">
|
||||
<h2>Public interface</h2>
|
||||
<xsl:choose>
|
||||
<xsl:when test="public/predicate">
|
||||
<xsl:apply-templates select="public/predicate" />
|
||||
</xsl:when>
|
||||
<xsl:when test="/logtalk/relations/*">
|
||||
<h4 class="code">(see related entities)</h4>
|
||||
<div class="section">
|
||||
<p class="comment">(see related entities)</p>
|
||||
</div>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<h4 class="code">(none)</h4>
|
||||
<div class="section">
|
||||
<p class="comment">(none)</p>
|
||||
</div>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<h1>Protected interface</h1>
|
||||
</div>
|
||||
<div class="protected">
|
||||
<h2>Protected interface</h2>
|
||||
<xsl:choose>
|
||||
<xsl:when test="protected/predicate">
|
||||
<xsl:apply-templates select="protected/predicate" />
|
||||
</xsl:when>
|
||||
<xsl:when test="/logtalk/relations/*">
|
||||
<h4 class="code">(see related entities)</h4>
|
||||
<div class="section">
|
||||
<p class="comment">(see related entities)</p>
|
||||
</div>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<h4 class="code">(none)</h4>
|
||||
<div class="section">
|
||||
<p class="comment">(none)</p>
|
||||
</div>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<h1>Private predicates</h1>
|
||||
</div>
|
||||
<div class="private">
|
||||
<h2>Private predicates</h2>
|
||||
<xsl:choose>
|
||||
<xsl:when test="private/predicate">
|
||||
<xsl:apply-templates select="private/predicate" />
|
||||
</xsl:when>
|
||||
<xsl:when test="/logtalk/relations/*">
|
||||
<h4 class="code">(see related entities)</h4>
|
||||
<div class="section">
|
||||
<p class="comment">(see related entities)</p>
|
||||
</div>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<h4 class="code">(none)</h4>
|
||||
<div class="section">
|
||||
<p class="comment">(none)</p>
|
||||
</div>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="*/predicate">
|
||||
<h4 class="code"><xsl:value-of select="name" /></h4>
|
||||
<div class="section">
|
||||
<h3 class="code"><xsl:value-of select="name" /></h3>
|
||||
<blockquote>
|
||||
<xsl:if test="comment">
|
||||
<blockquote><p class="blockquote"><xsl:value-of select="comment" /></p></blockquote>
|
||||
<p class="comment"><xsl:value-of select="comment" /></p>
|
||||
</xsl:if>
|
||||
<dl class="predicate">
|
||||
<dt>compilation:</dt>
|
||||
<dd><code><xsl:value-of select="compilation" /></code></dd>
|
||||
</blockquote>
|
||||
<dl class="properties">
|
||||
<dt class ="key">compilation:</dt>
|
||||
<dd class ="value"><code><xsl:value-of select="compilation" /></code></dd>
|
||||
<xsl:if test="template">
|
||||
<dt>template:</dt>
|
||||
<dd><code><xsl:value-of select="template" /></code></dd>
|
||||
<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>
|
||||
</xsl:if>
|
||||
<xsl:if test="meta">
|
||||
<dt>metapredicate template:</dt>
|
||||
<dd><code><xsl:value-of select="meta" /></code></dd>
|
||||
<dt class ="key">metapredicate template:</dt>
|
||||
<dd class ="value"><code><xsl:value-of select="meta" /></code></dd>
|
||||
</xsl:if>
|
||||
<xsl:if test="mode">
|
||||
<dt>mode - number of solutions:</dt>
|
||||
<dt class ="key">mode<xsl:text disable-output-escaping="yes"> &ndash; </xsl:text>number of solutions:</dt>
|
||||
<xsl:for-each select="mode">
|
||||
<dd><code><xsl:value-of select="template" /><xsl:text> - </xsl:text><xsl:value-of select="solutions" /></code></dd>
|
||||
<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>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
<xsl:if test="exceptions">
|
||||
<dt>exceptions:</dt>
|
||||
<dt class ="key">exceptions:</dt>
|
||||
<xsl:for-each select="exceptions/exception">
|
||||
<dd><xsl:value-of select="condition" />: <code><xsl:value-of select="term" /></code></dd>
|
||||
<dd class ="value"><xsl:value-of select="condition" />: <code><xsl:value-of select="term" /></code></dd>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
<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>
|
||||
</dl>
|
||||
<xsl:if test="info">
|
||||
<dl class="predicate">
|
||||
<dl class="properties">
|
||||
<xsl:for-each select="info">
|
||||
<dt><xsl:value-of select="key" />:</dt>
|
||||
<dd><code><xsl:value-of select="value" /></code></dd>
|
||||
<dt class ="key"><xsl:value-of select="key" />:</dt>
|
||||
<dd class ="value"><code><xsl:value-of select="value" /></code></dd>
|
||||
</xsl:for-each>
|
||||
</dl>
|
||||
</xsl:if>
|
||||
</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>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
% Logtalk - Object oriented extension to Prolog
|
||||
% Release 2.23.1
|
||||
% Release 2.24.0
|
||||
%
|
||||
% Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
|
||||
%
|
||||
@@ -33,47 +33,63 @@
|
||||
<link rel="stylesheet" href="logtalk.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<hr />
|
||||
<h4 class="type"><xsl:value-of select="logtalk/entity/type" /></h4>
|
||||
<h1 class="code"><xsl:value-of select="logtalk/entity/name" /></h1>
|
||||
<xsl:apply-templates select="logtalk/entity" />
|
||||
<hr />
|
||||
<xsl:apply-templates select="logtalk/relations" />
|
||||
<hr />
|
||||
<xsl:apply-templates select="logtalk/predicates" />
|
||||
<hr />
|
||||
<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>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="logtalk/entity">
|
||||
<xsl:if test="comment">
|
||||
<blockquote><p class="blockquote"><xsl:value-of select="comment" /></p></blockquote>
|
||||
</xsl:if>
|
||||
<dl>
|
||||
<dl class="properties">
|
||||
<xsl:if test="author">
|
||||
<dt>author:</dt>
|
||||
<dd><code><xsl:value-of select="author" /></code></dd>
|
||||
<dt class ="key">author:</dt>
|
||||
<dd class="value"><code><xsl:value-of select="author" /></code></dd>
|
||||
</xsl:if>
|
||||
<xsl:if test="version">
|
||||
<dt>version:</dt>
|
||||
<dd><code><xsl:value-of select="version" /></code></dd>
|
||||
<dt class ="key">version:</dt>
|
||||
<dd class="value"><code><xsl:value-of select="version" /></code></dd>
|
||||
</xsl:if>
|
||||
<xsl:if test="date">
|
||||
<dt>date:</dt>
|
||||
<dd><code><xsl:value-of select="date" /></code></dd>
|
||||
<dt class ="key">date:</dt>
|
||||
<dd class="value"><code><xsl:value-of select="date" /></code></dd>
|
||||
</xsl:if>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>compilation:</dt>
|
||||
<dd><code><xsl:value-of select="compilation" /></code></dd>
|
||||
<dl class="properties">
|
||||
<dt class ="key">compilation:</dt>
|
||||
<dd class ="value"><code><xsl:value-of select="compilation" /></code></dd>
|
||||
</dl>
|
||||
<xsl:if test="info">
|
||||
<dl>
|
||||
<dl class="properties">
|
||||
<xsl:for-each select="info">
|
||||
<dt><xsl:value-of select="key" />:</dt>
|
||||
<dd><code><xsl:value-of select="value" /></code></dd>
|
||||
<dt class ="key"><xsl:value-of select="key" />:</dt>
|
||||
<dd class ="value"><code><xsl:value-of select="value" /></code></dd>
|
||||
</xsl:for-each>
|
||||
</dl>
|
||||
</xsl:if>
|
||||
@@ -83,148 +99,196 @@
|
||||
<xsl:template match="logtalk/relations">
|
||||
<xsl:choose>
|
||||
<xsl:when test="*">
|
||||
<dl class="relations">
|
||||
<xsl:if test="implements">
|
||||
<dl>
|
||||
<dt>implements:</dt>
|
||||
<dt class ="key">implements:</dt>
|
||||
<xsl:apply-templates select="implements" />
|
||||
</dl>
|
||||
</xsl:if>
|
||||
<xsl:if test="imports">
|
||||
<dl>
|
||||
<dt>imports:</dt>
|
||||
<dt class ="key">imports:</dt>
|
||||
<xsl:apply-templates select="imports" />
|
||||
</dl>
|
||||
</xsl:if>
|
||||
<xsl:if test="extends">
|
||||
<dl>
|
||||
<dt>extends:</dt>
|
||||
<dt class ="key">extends:</dt>
|
||||
<xsl:apply-templates select="extends" />
|
||||
</dl>
|
||||
</xsl:if>
|
||||
<xsl:if test="instantiates">
|
||||
<dl>
|
||||
<dt>instantiates:</dt>
|
||||
<dt class ="key">instantiates:</dt>
|
||||
<xsl:apply-templates select="instantiates" />
|
||||
</dl>
|
||||
</xsl:if>
|
||||
<xsl:if test="specializes">
|
||||
<dl>
|
||||
<dt>specializes:</dt>
|
||||
<dt class ="key">specializes:</dt>
|
||||
<xsl:apply-templates select="specializes" />
|
||||
</dl>
|
||||
</xsl:if>
|
||||
<xsl:if test="uses">
|
||||
<dl>
|
||||
<dt>uses:</dt>
|
||||
<dt class ="key">uses:</dt>
|
||||
<xsl:apply-templates select="uses" />
|
||||
</dl>
|
||||
</xsl:if>
|
||||
<xsl:if test="calls">
|
||||
<dl>
|
||||
<dt>calls:</dt>
|
||||
<dt class ="key">calls:</dt>
|
||||
<xsl:apply-templates select="calls" />
|
||||
</dl>
|
||||
</xsl:if>
|
||||
</dl>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<h4 class="code">(no dependencies on other files)</h4>
|
||||
<p class="comment">(no dependencies on other files)</p>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="logtalk/relations/uses">
|
||||
<dd><code><a href="{file}.xml"><xsl:value-of select="name" /></a></code></dd>
|
||||
<dd class ="value"><code><a href="{file}.html"><xsl:value-of select="name" /></a></code></dd>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="logtalk/relations/calls">
|
||||
<dd><code><a href="{file}.xml"><xsl:value-of select="name" /></a></code></dd>
|
||||
<dd class ="value"><code><a href="{file}.html"><xsl:value-of select="name" /></a></code></dd>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="logtalk/relations/*">
|
||||
<dd><code><xsl:value-of select="scope" /><xsl:text> </xsl:text><a href="{file}.xml"><xsl:value-of select="name" /></a></code></dd>
|
||||
<dd class ="value"><code><xsl:value-of select="scope" /><xsl:text> </xsl:text><a href="{file}.html"><xsl:value-of select="name" /></a></code></dd>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="logtalk/predicates">
|
||||
<h1>Public interface</h1>
|
||||
<div class="public">
|
||||
<h2>Public interface</h2>
|
||||
<xsl:choose>
|
||||
<xsl:when test="public/predicate">
|
||||
<xsl:apply-templates select="public/predicate" />
|
||||
</xsl:when>
|
||||
<xsl:when test="/logtalk/relations/*">
|
||||
<h4 class="code">(see related entities)</h4>
|
||||
<div class="section">
|
||||
<p class="comment">(see related entities)</p>
|
||||
</div>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<h4 class="code">(none)</h4>
|
||||
<div class="section">
|
||||
<p class="comment">(none)</p>
|
||||
</div>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<h1>Protected interface</h1>
|
||||
</div>
|
||||
<div class="protected">
|
||||
<h2>Protected interface</h2>
|
||||
<xsl:choose>
|
||||
<xsl:when test="protected/predicate">
|
||||
<xsl:apply-templates select="protected/predicate" />
|
||||
</xsl:when>
|
||||
<xsl:when test="/logtalk/relations/*">
|
||||
<h4 class="code">(see related entities)</h4>
|
||||
<div class="section">
|
||||
<p class="comment">(see related entities)</p>
|
||||
</div>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<h4 class="code">(none)</h4>
|
||||
<div class="section">
|
||||
<p class="comment">(none)</p>
|
||||
</div>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<h1>Private predicates</h1>
|
||||
</div>
|
||||
<div class="private">
|
||||
<h2>Private predicates</h2>
|
||||
<xsl:choose>
|
||||
<xsl:when test="private/predicate">
|
||||
<xsl:apply-templates select="private/predicate" />
|
||||
</xsl:when>
|
||||
<xsl:when test="/logtalk/relations/*">
|
||||
<h4 class="code">(see related entities)</h4>
|
||||
<div class="section">
|
||||
<p class="comment">(see related entities)</p>
|
||||
</div>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<h4 class="code">(none)</h4>
|
||||
<div class="section">
|
||||
<p class="comment">(none)</p>
|
||||
</div>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="*/predicate">
|
||||
<h4 class="code"><xsl:value-of select="name" /></h4>
|
||||
<div class="section">
|
||||
<h3 class="code"><xsl:value-of select="name" /></h3>
|
||||
<blockquote>
|
||||
<xsl:if test="comment">
|
||||
<blockquote><p class="blockquote"><xsl:value-of select="comment" /></p></blockquote>
|
||||
<p class="comment"><xsl:value-of select="comment" /></p>
|
||||
</xsl:if>
|
||||
<dl class="predicate">
|
||||
<dt>compilation:</dt>
|
||||
<dd><code><xsl:value-of select="compilation" /></code></dd>
|
||||
</blockquote>
|
||||
<dl class="properties">
|
||||
<dt class ="key">compilation:</dt>
|
||||
<dd class ="value"><code><xsl:value-of select="compilation" /></code></dd>
|
||||
<xsl:if test="template">
|
||||
<dt>template:</dt>
|
||||
<dd><code><xsl:value-of select="template" /></code></dd>
|
||||
<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>
|
||||
</xsl:if>
|
||||
<xsl:if test="meta">
|
||||
<dt>metapredicate template:</dt>
|
||||
<dd><code><xsl:value-of select="meta" /></code></dd>
|
||||
<dt class ="key">metapredicate template:</dt>
|
||||
<dd class ="value"><code><xsl:value-of select="meta" /></code></dd>
|
||||
</xsl:if>
|
||||
<xsl:if test="mode">
|
||||
<dt>mode - number of solutions:</dt>
|
||||
<dt class ="key">mode<xsl:text disable-output-escaping="yes"> &ndash; </xsl:text>number of solutions:</dt>
|
||||
<xsl:for-each select="mode">
|
||||
<dd><code><xsl:value-of select="template" /><xsl:text> - </xsl:text><xsl:value-of select="solutions" /></code></dd>
|
||||
<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>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
<xsl:if test="exceptions">
|
||||
<dt>exceptions:</dt>
|
||||
<dt class ="key">exceptions:</dt>
|
||||
<xsl:for-each select="exceptions/exception">
|
||||
<dd><xsl:value-of select="condition" />: <code><xsl:value-of select="term" /></code></dd>
|
||||
<dd class ="value"><xsl:value-of select="condition" />: <code><xsl:value-of select="term" /></code></dd>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
<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>
|
||||
</dl>
|
||||
<xsl:if test="info">
|
||||
<dl class="predicate">
|
||||
<dl class="properties">
|
||||
<xsl:for-each select="info">
|
||||
<dt><xsl:value-of select="key" />:</dt>
|
||||
<dd><code><xsl:value-of select="value" /></code></dd>
|
||||
<dt class ="key"><xsl:value-of select="key" />:</dt>
|
||||
<dd class ="value"><code><xsl:value-of select="value" /></code></dd>
|
||||
</xsl:for-each>
|
||||
</dl>
|
||||
</xsl:if>
|
||||
</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>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,26 @@
|
||||
|
||||
body {
|
||||
color: black;
|
||||
background-color: #e6e6e6;
|
||||
font-family: sans-serif;
|
||||
margin: 1.5em;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin-left: 2em;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
color: teal;
|
||||
}
|
||||
|
||||
a:link {
|
||||
color: blue;
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: blue;
|
||||
color: navy;
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
@@ -19,64 +34,127 @@ a:active {
|
||||
text-decoration: underline
|
||||
}
|
||||
|
||||
.header {
|
||||
background-color: #dfdfdf;
|
||||
margin-left: 0em;
|
||||
margin-right: 0em;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
.header p {
|
||||
margin: 0em;
|
||||
padding: 0em;
|
||||
}
|
||||
|
||||
.header h1 {
|
||||
margin-top: 0em;
|
||||
padding: 0em;
|
||||
}
|
||||
|
||||
.header blockquote {
|
||||
margin-bottom: 0em;
|
||||
padding: 0em;
|
||||
}
|
||||
|
||||
.section {
|
||||
background-color: #f3f3f3;
|
||||
margin-left: 0em;
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
padding-top: 0.5em;
|
||||
padding-left: 1em;
|
||||
padding-bottom: 0.5em;
|
||||
padding-right: 1em;
|
||||
}
|
||||
|
||||
.section h3 {
|
||||
margin-top: 0.5em;
|
||||
padding: 0em;
|
||||
}
|
||||
|
||||
.predicates {
|
||||
}
|
||||
|
||||
.public {
|
||||
}
|
||||
|
||||
.protected {
|
||||
}
|
||||
|
||||
.private {
|
||||
}
|
||||
|
||||
.examples {
|
||||
}
|
||||
|
||||
.example {
|
||||
padding: 0.25em;
|
||||
}
|
||||
|
||||
.comment {
|
||||
color: navy;
|
||||
font-family: sans-serif;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.code, code, pre {
|
||||
color: navy;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
|
||||
.type {
|
||||
color: maroon;
|
||||
text-align: right;
|
||||
padding-top: 0em;
|
||||
border-top: 0em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
dl.relations {
|
||||
padding-left: 0em;
|
||||
}
|
||||
|
||||
dl.properties {
|
||||
padding-left: 0em;
|
||||
}
|
||||
|
||||
.key {
|
||||
color: teal;
|
||||
padding-top: 0.5em;
|
||||
}
|
||||
|
||||
.value {
|
||||
color: navy;
|
||||
padding-left: 0em;
|
||||
}
|
||||
|
||||
ul.parameters {
|
||||
list-style-type: none;
|
||||
padding-left: 0em;
|
||||
}
|
||||
|
||||
ul.arguments {
|
||||
list-style-type: none;
|
||||
padding-left: 0em;
|
||||
padding-top: 0.5em;
|
||||
margin-top: 0em;
|
||||
margin-bottom: 0em;
|
||||
}
|
||||
|
||||
|
||||
p {
|
||||
line-height: normal;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
dl.examples {
|
||||
list-style-type: none;
|
||||
padding-left: 0em;
|
||||
padding-top: 0.25em;
|
||||
margin-top: 0em;
|
||||
margin-bottom: 0em;
|
||||
}
|
||||
|
||||
p.blockquote {
|
||||
color: navy;
|
||||
font-family: sans-serif;
|
||||
font-style: italic;
|
||||
dl.examples .code {
|
||||
color: maroon;
|
||||
}
|
||||
|
||||
body {
|
||||
color: black;
|
||||
background-color: white;
|
||||
font-family: sans-serif;
|
||||
margin-left: 2em;
|
||||
margin-right: 2em;
|
||||
dl.remarks {
|
||||
}
|
||||
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
color: teal;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
|
||||
dt {
|
||||
color: teal;
|
||||
}
|
||||
|
||||
|
||||
dd {
|
||||
color: navy;
|
||||
}
|
||||
|
||||
|
||||
dl.predicate {
|
||||
margin-left: 2em;
|
||||
}
|
||||
|
||||
|
||||
blockquote {
|
||||
margin-left: 2em;
|
||||
.text {
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
% Logtalk - Object oriented extension to Prolog
|
||||
% Release 2.23.1
|
||||
% Release 2.24.0
|
||||
%
|
||||
% Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
|
||||
%
|
||||
@@ -11,10 +11,10 @@
|
||||
-->
|
||||
|
||||
|
||||
<!ELEMENT logtalk (entity, relations, predicates)>
|
||||
<!ELEMENT logtalk (entity, relations, predicates, remarks)>
|
||||
|
||||
|
||||
<!ELEMENT entity (name, type, compilation, comment?, author?, version?, date?, info*)>
|
||||
<!ELEMENT entity (name, type, compilation, comment?, (parnames|parameters)?, author?, version?, date?, info*)>
|
||||
|
||||
<!ELEMENT name (#PCDATA)>
|
||||
|
||||
@@ -24,6 +24,14 @@
|
||||
|
||||
<!ELEMENT comment (#PCDATA)>
|
||||
|
||||
<!ELEMENT parnames (#PCDATA)>
|
||||
|
||||
<!ELEMENT parameters (parameter*)>
|
||||
|
||||
<!ELEMENT parameter (name, description)>
|
||||
|
||||
<!ELEMENT description (#PCDATA)>
|
||||
|
||||
<!ELEMENT author (#PCDATA)>
|
||||
|
||||
<!ELEMENT version (#PCDATA)>
|
||||
@@ -70,7 +78,7 @@
|
||||
<!ELEMENT private (predicate*)>
|
||||
|
||||
|
||||
<!ELEMENT predicate (name, scope, compilation, meta?, mode*, comment?, template?, exceptions?, info*)>
|
||||
<!ELEMENT predicate (name, scope, compilation, meta?, mode*, comment?, template?, (argnames|arguments)?, exceptions?, info*, examples?)>
|
||||
|
||||
<!ELEMENT meta (#PCDATA)>
|
||||
|
||||
@@ -80,6 +88,12 @@
|
||||
|
||||
<!ELEMENT solutions (#PCDATA)>
|
||||
|
||||
<!ELEMENT argnames (#PCDATA)>
|
||||
|
||||
<!ELEMENT arguments (argument*)>
|
||||
|
||||
<!ELEMENT argument (name, description)>
|
||||
|
||||
<!ELEMENT exceptions (exception*)>
|
||||
|
||||
<!ELEMENT exception (condition, term)>
|
||||
@@ -87,3 +101,21 @@
|
||||
<!ELEMENT condition (#PCDATA)>
|
||||
|
||||
<!ELEMENT term (#PCDATA)>
|
||||
|
||||
<!ELEMENT examples (example*)>
|
||||
|
||||
<!ELEMENT example (description, call, bindings)>
|
||||
|
||||
<!ELEMENT call (#PCDATA)>
|
||||
|
||||
<!ELEMENT bindings (#PCDATA)>
|
||||
|
||||
<!ELEMENT remarks (remark*)>
|
||||
|
||||
<!ELEMENT remark (topic, text)>
|
||||
|
||||
<!ELEMENT topic (#PCDATA)>
|
||||
|
||||
<!ELEMENT text (#PCDATA)>
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
|
||||
<xsd:annotation>
|
||||
@@ -11,7 +11,7 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
% Logtalk - Object oriented extension to Prolog
|
||||
% Release 2.23.1
|
||||
% Release 2.24.0
|
||||
%
|
||||
% Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
|
||||
%
|
||||
@@ -27,6 +27,7 @@
|
||||
<xsd:element name="entity" type="entity"/>
|
||||
<xsd:element name="relations" type="relations"/>
|
||||
<xsd:element name="predicates" type="predicates"/>
|
||||
<xsd:element name="remarks" type="remarks"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
@@ -37,6 +38,10 @@
|
||||
<xsd:element name="type" type="type"/>
|
||||
<xsd:element name="compilation" type="compilation"/>
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0"/>
|
||||
<xsd:choice minOccurs="0">
|
||||
<xsd:element name="parnames" type="xsd:string"/>
|
||||
<xsd:element name="parameters" type="parameters"/>
|
||||
</xsd:choice>
|
||||
<xsd:element name="author" type="xsd:string" minOccurs="0"/>
|
||||
<xsd:element name="version" type="xsd:string" minOccurs="0"/>
|
||||
<xsd:element name="date" type="xsd:string" minOccurs="0"/>
|
||||
@@ -62,9 +67,24 @@
|
||||
</xsd:simpleType>
|
||||
|
||||
|
||||
<xsd:complexType name="parameters">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="parameter" type="parameter" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
<xsd:complexType name="parameter">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="name" type="xsd:string"/>
|
||||
<xsd:element name="description" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
<xsd:complexType name="info">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="key" type="xsd:string"/>
|
||||
<xsd:element name="key" type="xsd:string"/>
|
||||
<xsd:element name="value" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
@@ -148,8 +168,13 @@
|
||||
<xsd:element name="mode" type="mode" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0"/>
|
||||
<xsd:element name="template" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="exceptions" type="exceptions" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="info" type="info" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:choice minOccurs="0">
|
||||
<xsd:element name="argnames" type="xsd:string"/>
|
||||
<xsd:element name="arguments" type="arguments"/>
|
||||
</xsd:choice>
|
||||
<xsd:element name="exceptions" type="exceptions" minOccurs="0"/>
|
||||
<xsd:element name="info" type="info" minOccurs="0"/>
|
||||
<xsd:element name="examples" type="examples" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
@@ -174,9 +199,24 @@
|
||||
</xsd:simpleType>
|
||||
|
||||
|
||||
<xsd:complexType name="arguments">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="argument" type="argument" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
<xsd:complexType name="argument">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="name" type="xsd:string"/>
|
||||
<xsd:element name="description" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
<xsd:complexType name="exceptions">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="exception" type="exception" minOccurs="1" maxOccurs="unbounded"/>
|
||||
<xsd:element name="exception" type="exception" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
@@ -188,4 +228,36 @@
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
<xsd:complexType name="examples">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="example" type="example" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
<xsd:complexType name="example">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="description" type="xsd:string"/>
|
||||
<xsd:element name="call" type="xsd:string"/>
|
||||
<xsd:element name="bindings" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
<xsd:complexType name="remarks">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="remark" type="remark" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
<xsd:complexType name="remark">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="topic" type="xsd:string"/>
|
||||
<xsd:element name="text" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
</xsd:schema>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## =================================================================
|
||||
## Logtalk - Object oriented extension to Prolog
|
||||
## Release 2.23.1
|
||||
## Release 2.24.0
|
||||
##
|
||||
## Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
|
||||
## =================================================================
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## =================================================================
|
||||
## Logtalk - Object oriented extension to Prolog
|
||||
## Release 2.23.1
|
||||
## Release 2.24.0
|
||||
##
|
||||
## Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
|
||||
## =================================================================
|
||||
|
||||
Reference in New Issue
Block a user