restored reference docs from assaultcube.github.io/htdocs/docs/xml to this repo so that code changes can be correlated with documentation changes
This commit is contained in:
@@ -1,8 +0,0 @@
|
|||||||
$files = dir ..\* -include *.html
|
|
||||||
|
|
||||||
foreach($f in $files)
|
|
||||||
{
|
|
||||||
$in = $f.FullName
|
|
||||||
$out = [system.io.path]::ChangeExtension($f.FullName, "html")
|
|
||||||
msxsl.exe -o "$out" -v "$in" ..\transformations\cubedoc2xhtml.xslt
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
@echo off
|
|
||||||
rem windows only.
|
|
||||||
rem automatically transforms the reference to a cubescript.
|
|
||||||
rem requires MSXSL, available at
|
|
||||||
rem http://www.microsoft.com/downloads/details.aspx?familyid=2fb55371-c94e-4373-b0e9-db4816552e41&displaylang=en
|
|
||||||
@echo on
|
|
||||||
|
|
||||||
msxsl.exe -o ..\..\config\docs.cfg -v ..\reference.html ..\transformations\cuberef2cubescript.xslt
|
|
||||||
pause
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
msxsl.exe -o ..\out.html -v ..\reference.html ..\transformations\cuberef2xhtml.xslt
|
|
||||||
pause
|
|
||||||
@@ -1,234 +0,0 @@
|
|||||||
/* ZLIB licensed, (C) 2007 Adrian 'driAn' Henke, http://www.sprintf.org */
|
|
||||||
|
|
||||||
/*
|
|
||||||
styles for the reference - the old one, HACKED TO PIECES!!
|
|
||||||
|
|
||||||
|
|
||||||
this file can be as messy as whatever, it's gonna be deleted eventually :)
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/* fix positioned menu */
|
|
||||||
|
|
||||||
div#fixedmenu a
|
|
||||||
{
|
|
||||||
visibility: visible;
|
|
||||||
position: fixed;
|
|
||||||
padding: 5px;
|
|
||||||
left: 10px;
|
|
||||||
bottom: 10px;
|
|
||||||
font-size: 16px;
|
|
||||||
font-family: Courier New, Sans-Serif;
|
|
||||||
font-weight: bold;
|
|
||||||
text-decoration: none;
|
|
||||||
border: solid 2px black;
|
|
||||||
background-color: #444444;
|
|
||||||
color: Black;
|
|
||||||
}
|
|
||||||
|
|
||||||
body > div#fixedmenu a /* broken browsers will ignore this and therefore keep the menu hidden */
|
|
||||||
{
|
|
||||||
visibility: visible;
|
|
||||||
}
|
|
||||||
|
|
||||||
div#fixedmenu a:hover
|
|
||||||
{
|
|
||||||
background-color: #555555;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* contents */
|
|
||||||
|
|
||||||
div#contents
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* identifier */
|
|
||||||
|
|
||||||
div.section div.identifier
|
|
||||||
{
|
|
||||||
padding: 0 0 10px 0;
|
|
||||||
margin: 0 0 0 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* display name */
|
|
||||||
|
|
||||||
div.section div.identifier div.displayname
|
|
||||||
{
|
|
||||||
font-family: Courier New, Sans-Serif;
|
|
||||||
margin: 1em 0 1em -20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.section div.identifier div.displayname a
|
|
||||||
{
|
|
||||||
color: #007190;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* command arguments */
|
|
||||||
|
|
||||||
div.section div.identifier div.argumentDescriptions
|
|
||||||
{
|
|
||||||
margin: 10px 0 0 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.section div.identifier div.argumentDescriptions table
|
|
||||||
{
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
border-collapse: collapse;
|
|
||||||
width : 100%;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
div.section div.identifier div.argumentDescriptions table td
|
|
||||||
{
|
|
||||||
border: solid 1px #777777;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.section div.identifier div.argumentDescriptions table th
|
|
||||||
{
|
|
||||||
font-weight: normal;
|
|
||||||
color: #333333;
|
|
||||||
background-color: #777777;
|
|
||||||
border: solid 1px #777777;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.section div.identifier div.argumentDescriptions table tr td.token
|
|
||||||
{
|
|
||||||
font-style: italic;
|
|
||||||
width: 65px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.section div.identifier div.argumentDescriptions table tr td.description
|
|
||||||
{
|
|
||||||
width: 300px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.section div.identifier div.argumentDescriptions table tr td.values
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* variable value */
|
|
||||||
|
|
||||||
div.section div.identifier div.valueDescription
|
|
||||||
{
|
|
||||||
margin: 10px 0 0 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.section div.identifier div.valueDescription table
|
|
||||||
{
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
border-collapse: collapse;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.section div.identifier div.valueDescription table td
|
|
||||||
{
|
|
||||||
border: solid 1px #777777;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.section div.identifier div.valueDescription table th
|
|
||||||
{
|
|
||||||
font-weight: normal;
|
|
||||||
color: #333333;
|
|
||||||
background-color: #777777;
|
|
||||||
border: solid 1px #777777;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.section div.identifier div.valueDescription table tr td.token
|
|
||||||
{
|
|
||||||
font-style: italic;
|
|
||||||
width: 65px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.section div.identifier div.valueDescription table tr td.description
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
div.section div.identifier div.valueDescription table tr td.values
|
|
||||||
{
|
|
||||||
width: 200px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.section div.identifier div.valueDescription table tr td.range
|
|
||||||
{
|
|
||||||
width: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.section div.identifier div.valueDescription table tr td.defaultValue
|
|
||||||
{
|
|
||||||
text-align: right;
|
|
||||||
width: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* remarks */
|
|
||||||
|
|
||||||
div.section div.identifier div.remarks
|
|
||||||
{
|
|
||||||
margin: 10px 0 0 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.section div.identifier div.remarks div.remark
|
|
||||||
{
|
|
||||||
margin: 10px 0 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* references */
|
|
||||||
|
|
||||||
div.section div.identifier div.references
|
|
||||||
{
|
|
||||||
margin: 10px 0 0 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
div.section div.identifier div.references a.internal
|
|
||||||
{
|
|
||||||
font-family: Courier New, Sans-Serif;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.section div.identifier div.references a.external
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
div.section div.identifier div.references span.none
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* examples */
|
|
||||||
|
|
||||||
div.section div.identifier div.examples
|
|
||||||
{
|
|
||||||
margin: 0;
|
|
||||||
padding : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.section div.identifier div.examples div.code
|
|
||||||
{
|
|
||||||
margin: 10px 0 10px 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.section div.identifier div.examples div.exampleExplanation
|
|
||||||
{
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* return value */
|
|
||||||
|
|
||||||
div.section div.identifier div.return
|
|
||||||
{
|
|
||||||
}
|
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
/* side contentspanel */
|
|
||||||
|
|
||||||
.docsmain {
|
|
||||||
clear : none;
|
|
||||||
float : left;
|
|
||||||
width : 720px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#gohome {
|
|
||||||
width : 720px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.commandlist {
|
|
||||||
margin-top : 15px;
|
|
||||||
font-size : 17px;
|
|
||||||
text-align : center;
|
|
||||||
padding : 5px 0px;
|
|
||||||
font-family : "Trebuchet MS", Arial, Helvetica, sans-serif;
|
|
||||||
color: #FFFFFF;
|
|
||||||
border : solid 2px #00303D;
|
|
||||||
background-color: #101010;
|
|
||||||
float: right;
|
|
||||||
clear : right;
|
|
||||||
width : 136px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div#contentspanel
|
|
||||||
{
|
|
||||||
margin-top : 10px;
|
|
||||||
float: right;
|
|
||||||
clear : right;
|
|
||||||
width: 140px;
|
|
||||||
word-wrap: break-word;
|
|
||||||
margin-left : 10px;
|
|
||||||
font-family : "Trebuchet MS", Arial, Helvetica, sans-serif;
|
|
||||||
font-size: 10px;
|
|
||||||
text-align: left;
|
|
||||||
background-color: #101010;
|
|
||||||
}
|
|
||||||
|
|
||||||
div#contentspanel div.sectiontitle
|
|
||||||
{
|
|
||||||
padding-left: 10px;
|
|
||||||
height: 20px;
|
|
||||||
background-color: #252525;
|
|
||||||
border-top : solid 1px #000000;
|
|
||||||
border-bottom : solid 1px #000000;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: bold;
|
|
||||||
margin: 0px;
|
|
||||||
line-height : 20px;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
div#contentspanel ul
|
|
||||||
{
|
|
||||||
list-style-type: none;
|
|
||||||
padding: 0px;
|
|
||||||
margin: 0px;
|
|
||||||
padding : 5px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
div#contentspanel a
|
|
||||||
{
|
|
||||||
text-decoration: none;
|
|
||||||
color: #E0E0E0;
|
|
||||||
}
|
|
||||||
|
|
||||||
div#contentspanel div.identifiers a
|
|
||||||
{
|
|
||||||
display: block;
|
|
||||||
position: relative;
|
|
||||||
width: 121px;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
div#contentspanel div.identifiers a:hover
|
|
||||||
{
|
|
||||||
width: 128px;
|
|
||||||
color: black;
|
|
||||||
font-size: 12px;
|
|
||||||
border: solid 1px #000000;
|
|
||||||
padding : 0px;
|
|
||||||
text-align : center;
|
|
||||||
background-color: #666666;
|
|
||||||
|
|
||||||
}
|
|
||||||
+11269
-6698
File diff suppressed because it is too large
Load Diff
@@ -1,10 +1,16 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
XML Schema for types in a CubeScript reference document, v0.1
|
XML schema for types in the ../reference.xml document.
|
||||||
|
|
||||||
|
Written by: Adrian 'driAn' Henke (of Rabid Viper Productions).
|
||||||
|
|
||||||
|
You may be able to redistribute this content under specific
|
||||||
|
conditions. Please read the licensing information, available
|
||||||
|
at https://assault.cubers.net/docs/license.html for the
|
||||||
|
conditions that would apply to what you may be redistributing.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://cubers.net/Schemas/CubeRef" xmlns="http://cubers.net/Schemas/CubeRef">
|
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="https://assault.cubers.net/docs/xml" xmlns="https://assault.cubers.net/docs/xml">
|
||||||
|
|
||||||
<!-- simple types -->
|
<!-- simple types -->
|
||||||
|
|
||||||
@@ -1,11 +1,16 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- ZLIB licensed, (C) 2007 Adrian 'driAn' Henke, http://www.sprintf.org -->
|
<!--
|
||||||
|
Transforms the ../reference.xml document into a CubeScript document.
|
||||||
|
|
||||||
<!--
|
Written by: Adrian 'driAn' Henke (of Rabid Viper Productions).
|
||||||
transforms a cuberef document to a cubescript document
|
|
||||||
|
You may be able to redistribute this content under specific
|
||||||
|
conditions. Please read the licensing information, available
|
||||||
|
at https://assault.cubers.net/docs/license.html for the
|
||||||
|
conditions that would apply to what you may be redistributing.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:t="http://cubers.net/Schemas/CubeRef">
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:t="https://assault.cubers.net/docs/xml">
|
||||||
|
|
||||||
<xsl:output method="text" encoding="ASCII"/>
|
<xsl:output method="text" encoding="ASCII"/>
|
||||||
|
|
||||||
@@ -20,9 +25,11 @@
|
|||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
|
||||||
<xsl:template match="/t:cuberef">
|
<xsl:template match="/t:cuberef">
|
||||||
<xsl:text>// This CubeScript has been automatically generated from AssaultCubes reference.xml file.</xsl:text>
|
<xsl:text>// This CubeScript file has been automatically generated from AssaultCube's ./docs/reference.xml</xsl:text>
|
||||||
<xsl:value-of select="$newline"/>
|
<xsl:value-of select="$newline"/>
|
||||||
<xsl:text>// To auto-generate this file yourself, please carefully read the comment at the top of reference.xml</xsl:text>
|
<xsl:text>// DO NOT MODIFY THIS FILE - Instead, modify ./docs/reference.xml and generate this file automatically.</xsl:text>
|
||||||
|
<xsl:value-of select="$newline"/>
|
||||||
|
<xsl:text>// To generate this file automatically, please carefully read the comment at the top of reference.xml</xsl:text>
|
||||||
<xsl:value-of select="$newline"/>
|
<xsl:value-of select="$newline"/>
|
||||||
<xsl:value-of select="$newline"/>
|
<xsl:value-of select="$newline"/>
|
||||||
|
|
||||||
@@ -130,14 +137,10 @@
|
|||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
|
|
||||||
<!-- references -->
|
<!-- references -->
|
||||||
<xsl:for-each select="t:references/t:reference">
|
<xsl:for-each select="t:references/t:identifierReference">
|
||||||
<xsl:text>docref </xsl:text>
|
<xsl:text>docref </xsl:text>
|
||||||
<xsl:text>[</xsl:text>
|
<xsl:text>[</xsl:text>
|
||||||
<xsl:value-of select="@name"/>
|
|
||||||
<xsl:text>] [</xsl:text>
|
|
||||||
<xsl:value-of select="@identifier"/>
|
<xsl:value-of select="@identifier"/>
|
||||||
<xsl:text>] [</xsl:text>
|
|
||||||
<xsl:value-of select="@url"/>
|
|
||||||
<xsl:text>];</xsl:text>
|
<xsl:text>];</xsl:text>
|
||||||
<xsl:value-of select="$newline"/>
|
<xsl:value-of select="$newline"/>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
@@ -1,10 +1,20 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:t="http://cubers.net/Schemas/CubeRef">
|
<xsl:transform version="1.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:t="https://assault.cubers.net/docs/xml">
|
||||||
<!-- ZLIB licensed, (C) 2007 Adrian 'driAn' Henke, http://www.sprintf.org -->
|
<!--
|
||||||
<!-- This file transforms reference.xml into an XHTML webpage. -->
|
This file transforms the ../reference.xml document into an XHTML webpage.
|
||||||
<xsl:output method="html" omit-xml-declaration="yes" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>
|
|
||||||
|
Written by: Rabid Viper Productions.
|
||||||
|
Special thanks to Adrian 'driAn' Henke for the original document
|
||||||
|
that all these XML-related files are based upon.
|
||||||
|
|
||||||
|
You may be able to redistribute this content under specific
|
||||||
|
conditions. Please read the licensing information, available
|
||||||
|
at https://assault.cubers.net/docs/license.html for the
|
||||||
|
conditions that would apply to what you may be redistributing.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<xsl:output method="html" omit-xml-declaration="yes" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
|
||||||
|
|
||||||
|
|
||||||
<xsl:template match="t:key">
|
<xsl:template match="t:key">
|
||||||
<i>
|
<i>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
@@ -42,17 +52,13 @@
|
|||||||
<meta name="robots" content="NOODP" />
|
<meta name="robots" content="NOODP" />
|
||||||
<meta name="author" content="Rabid Viper Productions" />
|
<meta name="author" content="Rabid Viper Productions" />
|
||||||
<meta name="copyright" content="You may be able to redistribute this content under specific conditions.
|
<meta name="copyright" content="You may be able to redistribute this content under specific conditions.
|
||||||
Please read the licensing information, available @ http://assault.cubers.net/docs/license.html for the
|
Please read the licensing information, available @ https://assault.cubers.net/docs/license.html for the
|
||||||
conditions that would apply to what you may be redistributing." />
|
conditions that would apply to what you may be redistributing." />
|
||||||
<title>AssaultCube Documentation :: CubeScript command reference</title>
|
<title>AssaultCube Documentation :: CubeScript</title>
|
||||||
<!-- TEMP -->
|
|
||||||
<link rel="stylesheet" href="css/oldrefcss.css" />
|
|
||||||
<!-- /TEMP -->
|
|
||||||
<link rel="stylesheet" href="css/main.css" />
|
<link rel="stylesheet" href="css/main.css" />
|
||||||
<link rel="stylesheet" href="css/docs.css" />
|
<link rel="stylesheet" href="css/docs.css" />
|
||||||
<link rel="stylesheet" href="css/referencexml.css" />
|
<link rel="stylesheet" href="css/referencexml.css" />
|
||||||
<!--#include virtual="/SSI-HTML/docs/invisibility.html" -->
|
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico" />
|
||||||
<link rel="shortcut icon" href="images/favicon.ico" />
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="container">
|
<div id="container">
|
||||||
@@ -64,45 +70,91 @@
|
|||||||
alt="AssaultCube" width="193px" height="81px" /></a>
|
alt="AssaultCube" width="193px" height="81px" /></a>
|
||||||
</div>
|
</div>
|
||||||
<div id="menubar">
|
<div id="menubar">
|
||||||
<!--#include virtual="/SSI-HTML/docs/navigation_box_docs.html" -->  
|
 
|
||||||
</div>
|
</div>
|
||||||
<!--#include virtual="/SSI-HTML/docs/docswarn.html" -->
|
|
||||||
<div class="docsmain">
|
<div class="docsmain">
|
||||||
<div id="gohome">
|
<div id="gohome">
|
||||||
<a href="index.html">Go to documentation index ↵</a>
|
<a href="index.html">Go to documentation index ↵</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="fixedmenu">
|
<div id="topbutton">
|
||||||
<a href="#">TOP</a>
|
<a href="#">↑ Top of the page?</a>
|
||||||
</div>
|
</div>
|
||||||
<h2>
|
<h2>
|
||||||
CubeScript command reference
|
CubeScript
|
||||||
</h2>
|
</h2>
|
||||||
|
<p>
|
||||||
|
CubeScript is the scripting language of AssaultCube and it is similar to scripting languages of other games, except
|
||||||
|
that its a bit more powerful because it is almost a full programming language.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
<div id="content">
|
CubeScript consists of the command itself, followed by any number of arguments separated by whitespace. You can:
|
||||||
|
</p>
|
||||||
|
<!-- Try to keep these examples very, very simple... -->
|
||||||
|
<ul style="list-style-type : square;">
|
||||||
|
<li>
|
||||||
|
Use <span class="code">""</span> to quote strings that have whitespace within them.
|
||||||
|
<ul><li>Input example: <span class="code">alias grass "is greener"</span></li></ul>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
Use <span class="code">$</span> to capture the value of a variable/alias/bracketed-string as an argument for a command.
|
||||||
|
<ul>
|
||||||
|
<li>Input example: <span class="code">echo "The grass" $grass</span></li>
|
||||||
|
<li>Output: <span class="code">The grass is greener</span></li>
|
||||||
|
<li>Input example: <span class="code">echo "Your FOV is" $fov</span></li>
|
||||||
|
<li>Output: <span class="code">Your FOV is 90.0</span></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
Use <span class="code">;</span> to sequence multiple commands into one.
|
||||||
|
<ul>
|
||||||
|
<li>Input example: <span class="code">alias grass "is yellow"; echo "The grass" $grass</span></li>
|
||||||
|
<li>Output: <span class="code">The grass is yellow</span></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
You can also use <span class="code">()</span> or <span class="code">[]</span> to quote strings (i.e. instead of "").
|
||||||
|
These can be nested infinitely and may contain linefeeds.
|
||||||
|
The normal brackets <span class="code">()</span> are special, as they evaluate commands contained within them,
|
||||||
|
before evaluating the surrounding command.
|
||||||
|
<ul>
|
||||||
|
<li>Input example: <span class="code">alias 4x2 (* 2 (+ 1 3))</span></li>
|
||||||
|
<li>Input command: <span class="code">echo $4x2</span></li>
|
||||||
|
<li>Output: <span class="code">8</span></li>
|
||||||
|
<li>Input example: <span class="code">alias grass [ is greener ]</span></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
Lastly, you can use the automatically-set aliases of <span class="code">$arg1</span>
|
||||||
|
(.. and <span class="code">$arg2</span>, <span class="code">$arg3</span>, etc) in your scripts.
|
||||||
|
<ul>
|
||||||
|
<li>Input example: <span class="code">alias grass [ if (= $arg1 1) [ echo "The grass is green" ] [ if (= $arg1 2) [ echo "The grass is yellow" ] ] ]</span></li>
|
||||||
|
<li>Input command: <span class="code">grass 1</span></li>
|
||||||
|
<li>Output: <span class="code">The grass is green</span></li>
|
||||||
|
<li>Input command: <span class="code">grass 2</span></li>
|
||||||
|
<li>Output: <span class="code">The grass is brown</span></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<p>
|
||||||
|
It is recommended to read examples of this in your ./config/ folder to understand them better. The documentation below
|
||||||
|
contains a reference of ALL of the CubeScript commands at your disposal. Have fun!
|
||||||
|
</p>
|
||||||
|
<div id="content">
|
||||||
<!-- contents -->
|
<!-- contents -->
|
||||||
<div id="contents">
|
<div id="contents">
|
||||||
<h4>
|
|
||||||
Contents
|
|
||||||
</h4>
|
|
||||||
<p>
|
<p>
|
||||||
<xsl:value-of select="t:description"/>
|
<xsl:value-of select="t:description"/>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<div class="dottedline"></div>
|
||||||
The following sections are available:
|
<h3>CATEGORIES:</h3>
|
||||||
</p>
|
<ul id="categorylist">
|
||||||
<ul>
|
|
||||||
<xsl:for-each select="t:sections/t:section">
|
<xsl:for-each select="t:sections/t:section">
|
||||||
<xsl:sort select="@sortindex[not(../../@sort) or ../../@sort = 'true' or ../../@sort = '1']"/>
|
<xsl:sort select="@sortindex[not(../../@sort) or ../../@sort = 'true' or ../../@sort = '1']" />
|
||||||
<li>
|
<li>
|
||||||
<a>
|
<a>
|
||||||
<xsl:attribute name="href">
|
<xsl:attribute name="href">
|
||||||
<xsl:text>#section_</xsl:text>
|
<xsl:text>#section_</xsl:text>
|
||||||
<xsl:value-of select="translate(@name, ' ', '_')"/>
|
<xsl:value-of select="translate(@name, ' ', '_')" />
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:value-of select="@name"/>
|
<xsl:value-of select="@name"/>
|
||||||
</a>
|
</a>
|
||||||
@@ -114,15 +166,16 @@
|
|||||||
<!-- sections -->
|
<!-- sections -->
|
||||||
<xsl:for-each select="t:sections/t:section">
|
<xsl:for-each select="t:sections/t:section">
|
||||||
<xsl:sort select="@sortindex[not(../../@sort) or ../../@sort = 'true' or ../../@sort = '1']"/>
|
<xsl:sort select="@sortindex[not(../../@sort) or ../../@sort = 'true' or ../../@sort = '1']"/>
|
||||||
|
<div class="dottedline"></div>
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<h2>
|
<h3>
|
||||||
<!-- section anchor -->
|
<!-- section anchor -->
|
||||||
<xsl:attribute name="id">
|
<xsl:attribute name="id">
|
||||||
<xsl:text>section_</xsl:text>
|
<xsl:text>section_</xsl:text>
|
||||||
<xsl:value-of select="translate(@name, ' ', '_')"/>
|
<xsl:value-of select="translate(@name, ' ', '_')"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:value-of select="@name"/>
|
<xsl:value-of select="@name"/>
|
||||||
</h2>
|
</h3>
|
||||||
|
|
||||||
<!-- description -->
|
<!-- description -->
|
||||||
<p>
|
<p>
|
||||||
@@ -252,14 +305,14 @@
|
|||||||
<xsl:for-each select="t:examples/t:example">
|
<xsl:for-each select="t:examples/t:example">
|
||||||
<p>
|
<p>
|
||||||
Example:
|
Example:
|
||||||
<div class="code">
|
<span class="code">
|
||||||
<xsl:value-of select="t:code"/>
|
<xsl:value-of select="t:code"/>
|
||||||
</div>
|
</span>
|
||||||
<xsl:if test="t:explanation">
|
<xsl:if test="t:explanation">
|
||||||
<xsl:for-each select="t:explanation">
|
<xsl:for-each select="t:explanation">
|
||||||
<div class="exampleExplanation">
|
<span class="exampleExplanation">
|
||||||
<xsl:value-of select="."/>
|
<xsl:value-of select="."/>
|
||||||
</div>
|
</span>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</p>
|
</p>
|
||||||
@@ -278,29 +331,28 @@
|
|||||||
<!-- default keys -->
|
<!-- default keys -->
|
||||||
<xsl:if test="t:defaultKeys/*">
|
<xsl:if test="t:defaultKeys/*">
|
||||||
<div class="defaultKeys">
|
<div class="defaultKeys">
|
||||||
<p>
|
<br/>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="count(t:defaultKeys/*) = 1">
|
<xsl:when test="count(t:defaultKeys/*) = 1">
|
||||||
<xsl:text>default key: </xsl:text>
|
<xsl:text>default key: </xsl:text>
|
||||||
<xsl:apply-templates select="t:defaultKeys/*"/>
|
<xsl:apply-templates select="t:defaultKeys/*"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:text>default keys:</xsl:text>
|
<xsl:text>default keys:</xsl:text>
|
||||||
|
<br/>
|
||||||
|
<xsl:for-each select="t:defaultKeys/*">
|
||||||
|
<xsl:apply-templates select="."/>
|
||||||
<br/>
|
<br/>
|
||||||
<xsl:for-each select="t:defaultKeys/*">
|
</xsl:for-each>
|
||||||
<xsl:apply-templates select="."/>
|
</xsl:otherwise>
|
||||||
<br/>
|
</xsl:choose>
|
||||||
</xsl:for-each>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
||||||
<!-- references -->
|
<!-- references -->
|
||||||
<xsl:if test="t:references">
|
<xsl:if test="t:references">
|
||||||
<div class="references">
|
<div class="references">
|
||||||
see also:
|
See also:
|
||||||
<!-- refer to identifiers (identifier anchor) -->
|
<!-- refer to identifiers (identifier anchor) -->
|
||||||
<xsl:for-each select="t:references/t:identifierReference">
|
<xsl:for-each select="t:references/t:identifierReference">
|
||||||
<a>
|
<a>
|
||||||
@@ -338,7 +390,7 @@
|
|||||||
<xsl:for-each select="t:references/t:wikiReference">
|
<xsl:for-each select="t:references/t:wikiReference">
|
||||||
<xsl:text>, </xsl:text><!-- we assume it's never the only entry! -->
|
<xsl:text>, </xsl:text><!-- we assume it's never the only entry! -->
|
||||||
<a>
|
<a>
|
||||||
<xsl:attribute name="href">http://wiki.cubers.net/action/view/<xsl:value-of select="@article"/></xsl:attribute>
|
<xsl:attribute name="href">https://wiki.cubers.net/action/view/<xsl:value-of select="@article"/></xsl:attribute>
|
||||||
<xsl:attribute name="class">external</xsl:attribute>
|
<xsl:attribute name="class">external</xsl:attribute>
|
||||||
<xsl:attribute name="target">_blank</xsl:attribute>
|
<xsl:attribute name="target">_blank</xsl:attribute>
|
||||||
<xsl:value-of select="@article"/>
|
<xsl:value-of select="@article"/>
|
||||||
@@ -384,8 +436,7 @@
|
|||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</div>
|
</div>
|
||||||
<div id="footer"></div>
|
</div>
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
@@ -0,0 +1,443 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<xsl:transform version="1.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:t="https://assault.cubers.net/docs/xml">
|
||||||
|
<!--
|
||||||
|
This file transforms the ../reference.xml document into an XHTML webpage.
|
||||||
|
|
||||||
|
Written by: Rabid Viper Productions.
|
||||||
|
Special thanks to Adrian 'driAn' Henke for the original document
|
||||||
|
that all these XML-related files are based upon.
|
||||||
|
|
||||||
|
You may be able to redistribute this content under specific
|
||||||
|
conditions. Please read the licensing information, available
|
||||||
|
at https://assault.cubers.net/docs/license.html for the
|
||||||
|
conditions that would apply to what you may be redistributing.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<xsl:output method="html" omit-xml-declaration="yes" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
|
||||||
|
|
||||||
|
<xsl:template match="t:key">
|
||||||
|
<i>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="@name">
|
||||||
|
<xsl:value-of select="@name"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="@alias"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</i>
|
||||||
|
<xsl:if test="@description">
|
||||||
|
<xsl:text> - </xsl:text>
|
||||||
|
<xsl:value-of select="@description"/>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template name="identifierLink">
|
||||||
|
<a>
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:text>#identifier_</xsl:text>
|
||||||
|
<xsl:value-of select="translate(@name, ' ', '_')"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="title">
|
||||||
|
<xsl:value-of select="@name"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:value-of select="@name"/>
|
||||||
|
</a>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="/t:cuberef">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="application/xhtml+xml;charset=UTF-8" />
|
||||||
|
<meta name="robots" content="NOODP" />
|
||||||
|
<meta name="author" content="Rabid Viper Productions" />
|
||||||
|
<meta name="copyright" content="You may be able to redistribute this content under specific conditions.
|
||||||
|
Please read the licensing information, available @ https://assault.cubers.net/docs/license.html for the
|
||||||
|
conditions that would apply to what you may be redistributing." />
|
||||||
|
<title>AssaultCube Documentation :: CubeScript</title>
|
||||||
|
<link rel="stylesheet" href="css/main.css" />
|
||||||
|
<link rel="stylesheet" href="css/docs.css" />
|
||||||
|
<link rel="stylesheet" href="css/referencexml.css" />
|
||||||
|
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="container">
|
||||||
|
<div id="docsheader">
|
||||||
|
AssaultCube Documentation
|
||||||
|
</div>
|
||||||
|
<div id="logo">
|
||||||
|
<a href="index.html"><img src="images/aclogo.png"
|
||||||
|
alt="AssaultCube" width="193px" height="81px" /></a>
|
||||||
|
</div>
|
||||||
|
<div id="menubar">
|
||||||
|
 
|
||||||
|
</div>
|
||||||
|
<div class="docsmain">
|
||||||
|
<div id="gohome">
|
||||||
|
<a href="index.html">Go to documentation index ↵</a>
|
||||||
|
</div>
|
||||||
|
<div id="topbutton">
|
||||||
|
<a href="#">↑ Top of the page?</a>
|
||||||
|
</div>
|
||||||
|
<h2>
|
||||||
|
CubeScript
|
||||||
|
</h2>
|
||||||
|
<p>
|
||||||
|
CubeScript is the scripting language of AssaultCube and it is similar to scripting languages of other games, except
|
||||||
|
that its a bit more powerful because it is almost a full programming language.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
CubeScript consists of the command itself, followed by any number of arguments separated by whitespace. You can:
|
||||||
|
</p>
|
||||||
|
<!-- Try to keep these examples very, very simple... -->
|
||||||
|
<ul style="list-style-type : square;">
|
||||||
|
<li>
|
||||||
|
Use <span class="code">""</span> to quote strings that have whitespace within them.
|
||||||
|
<ul><li>Input example: <span class="code">alias grass "is greener"</span></li></ul>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
Use <span class="code">$</span> to capture the value of a variable/alias/bracketed-string as an argument for a command.
|
||||||
|
<ul>
|
||||||
|
<li>Input example: <span class="code">echo "The grass" $grass</span></li>
|
||||||
|
<li>Output: <span class="code">The grass is greener</span></li>
|
||||||
|
<li>Input example: <span class="code">echo "Your FOV is" $fov</span></li>
|
||||||
|
<li>Output: <span class="code">Your FOV is 90.0</span></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
Use <span class="code">;</span> to sequence multiple commands into one.
|
||||||
|
<ul>
|
||||||
|
<li>Input example: <span class="code">alias grass "is yellow"; echo "The grass" $grass</span></li>
|
||||||
|
<li>Output: <span class="code">The grass is yellow</span></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
You can also use <span class="code">()</span> or <span class="code">[]</span> to quote strings (i.e. instead of "").
|
||||||
|
These can be nested infinitely and may contain linefeeds.
|
||||||
|
The normal brackets <span class="code">()</span> are special, as they evaluate commands contained within them,
|
||||||
|
before evaluating the surrounding command.
|
||||||
|
<ul>
|
||||||
|
<li>Input example: <span class="code">alias 4x2 (* 2 (+ 1 3))</span></li>
|
||||||
|
<li>Input command: <span class="code">echo $4x2</span></li>
|
||||||
|
<li>Output: <span class="code">8</span></li>
|
||||||
|
<li>Input example: <span class="code">alias grass [ is greener ]</span></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
Lastly, you can use the automatically-set aliases of <span class="code">$arg1</span>
|
||||||
|
(.. and <span class="code">$arg2</span>, <span class="code">$arg3</span>, etc) in your scripts.
|
||||||
|
<ul>
|
||||||
|
<li>Input example: <span class="code">alias grass [ if (= $arg1 1) [ echo "The grass is green" ] [ if (= $arg1 2) [ echo "The grass is yellow" ] ] ]</span></li>
|
||||||
|
<li>Input command: <span class="code">grass 1</span></li>
|
||||||
|
<li>Output: <span class="code">The grass is green</span></li>
|
||||||
|
<li>Input command: <span class="code">grass 2</span></li>
|
||||||
|
<li>Output: <span class="code">The grass is brown</span></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<p>
|
||||||
|
It is recommended to read examples of this in your ./config/ folder to understand them better. The documentation below
|
||||||
|
contains a reference of ALL of the CubeScript commands at your disposal. Have fun!
|
||||||
|
</p>
|
||||||
|
<div id="content">
|
||||||
|
<!-- contents -->
|
||||||
|
<div id="contents">
|
||||||
|
<p>
|
||||||
|
<xsl:value-of select="t:description"/>
|
||||||
|
</p>
|
||||||
|
<div class="dottedline"></div>
|
||||||
|
<h3>CATEGORIES:</h3>
|
||||||
|
<ul id="categorylist">
|
||||||
|
<xsl:for-each select="t:sections/t:section">
|
||||||
|
<xsl:sort select="@sortindex[not(../../@sort) or ../../@sort = 'true' or ../../@sort = '1']" />
|
||||||
|
<li>
|
||||||
|
<a>
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:text>#section_</xsl:text>
|
||||||
|
<xsl:value-of select="translate(@name, ' ', '_')" />
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:value-of select="@name"/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</xsl:for-each>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- sections -->
|
||||||
|
<xsl:for-each select="t:sections/t:section">
|
||||||
|
<xsl:sort select="@sortindex[not(../../@sort) or ../../@sort = 'true' or ../../@sort = '1']"/>
|
||||||
|
<div class="dottedline"></div>
|
||||||
|
<div class="section">
|
||||||
|
<h3>
|
||||||
|
<!-- section anchor -->
|
||||||
|
<xsl:attribute name="id">
|
||||||
|
<xsl:text>section_</xsl:text>
|
||||||
|
<xsl:value-of select="translate(@name, ' ', '_')"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:value-of select="@name"/>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<!-- description -->
|
||||||
|
<p>
|
||||||
|
<xsl:value-of select="t:description"/>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<!-- identifiers -->
|
||||||
|
<xsl:for-each select="t:identifiers/*">
|
||||||
|
<xsl:sort select="@name[not(../../@sort) or ../../@sort = 'true' or ../../@sort = '1']"/>
|
||||||
|
<xsl:variable name="readOnly" select="t:value/@readOnly and (t:value/@readOnly = 'true' or t:value/@readOnly = '1')"/>
|
||||||
|
|
||||||
|
<div class="identifier">
|
||||||
|
<!-- identifier anchor -->
|
||||||
|
<xsl:attribute name="id">
|
||||||
|
<xsl:text>identifier_</xsl:text>
|
||||||
|
<xsl:value-of select="translate(@name, ' ', '_')"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
|
||||||
|
<!-- display name -->
|
||||||
|
<div class="displayname">
|
||||||
|
<xsl:call-template name="identifierLink"/>
|
||||||
|
<xsl:text> </xsl:text>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="t:arguments"><!-- command args -->
|
||||||
|
<xsl:for-each select="t:arguments/*">
|
||||||
|
<xsl:value-of select="@token"/>
|
||||||
|
<xsl:text> </xsl:text>
|
||||||
|
</xsl:for-each>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="t:value and not($readOnly)"><!-- variable value -->
|
||||||
|
<xsl:text> </xsl:text>
|
||||||
|
<xsl:value-of select="t:value/@token"/>
|
||||||
|
</xsl:when>
|
||||||
|
</xsl:choose>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- description -->
|
||||||
|
<div class="description">
|
||||||
|
<xsl:value-of select="t:description"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- arguments or value description -->
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="t:arguments/*"><!-- command args -->
|
||||||
|
<div class="argumentDescriptions">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>Argument</th>
|
||||||
|
<th>Description</th>
|
||||||
|
<th>Values</th>
|
||||||
|
</tr>
|
||||||
|
<xsl:for-each select="t:arguments/*">
|
||||||
|
<tr>
|
||||||
|
<td class="token">
|
||||||
|
<xsl:value-of select="@token"/>
|
||||||
|
</td>
|
||||||
|
<td class="description">
|
||||||
|
<xsl:value-of select="@description"/>
|
||||||
|
<xsl:if test="@optional">
|
||||||
|
<xsl:text> (optional)</xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
</td>
|
||||||
|
<td class="values">
|
||||||
|
<xsl:value-of select="@valueNotes"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</xsl:for-each>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="t:value"> <!-- var value -->
|
||||||
|
<div class="valueDescription">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<xsl:if test="not($readOnly)">
|
||||||
|
<th>
|
||||||
|
Token
|
||||||
|
</th>
|
||||||
|
</xsl:if>
|
||||||
|
<th>
|
||||||
|
Description
|
||||||
|
</th>
|
||||||
|
<th>Values</th>
|
||||||
|
<th>Range</th>
|
||||||
|
<th>Default</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<xsl:if test="not($readOnly)">
|
||||||
|
<td class="token">
|
||||||
|
<xsl:value-of select="t:value/@token"/>
|
||||||
|
</td>
|
||||||
|
</xsl:if>
|
||||||
|
<td class="description">
|
||||||
|
<xsl:value-of select="t:value/@description"/>
|
||||||
|
</td>
|
||||||
|
<td class="values">
|
||||||
|
<xsl:value-of select="t:value/@valueNotes"/>
|
||||||
|
</td>
|
||||||
|
<td class="range">
|
||||||
|
<xsl:value-of select="t:value/@minValue"/>
|
||||||
|
<xsl:text>..</xsl:text>
|
||||||
|
<xsl:value-of select="t:value/@maxValue"/>
|
||||||
|
</td>
|
||||||
|
<td class="defaultValue">
|
||||||
|
<xsl:value-of select="t:value/@defaultValue"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</xsl:when>
|
||||||
|
</xsl:choose>
|
||||||
|
|
||||||
|
<!-- remarks -->
|
||||||
|
<xsl:if test="t:remarks">
|
||||||
|
<div class="remarks">
|
||||||
|
<xsl:for-each select="t:remarks/t:remark">
|
||||||
|
<div class="remark">
|
||||||
|
<xsl:value-of select="."/>
|
||||||
|
</div>
|
||||||
|
</xsl:for-each>
|
||||||
|
</div>
|
||||||
|
</xsl:if>
|
||||||
|
|
||||||
|
<!-- examples -->
|
||||||
|
<xsl:if test="t:examples">
|
||||||
|
<div class="examples">
|
||||||
|
<xsl:for-each select="t:examples/t:example">
|
||||||
|
<p>
|
||||||
|
Example:
|
||||||
|
<span class="code">
|
||||||
|
<xsl:value-of select="t:code"/>
|
||||||
|
</span>
|
||||||
|
<xsl:if test="t:explanation">
|
||||||
|
<xsl:for-each select="t:explanation">
|
||||||
|
<span class="exampleExplanation">
|
||||||
|
<xsl:value-of select="."/>
|
||||||
|
</span>
|
||||||
|
</xsl:for-each>
|
||||||
|
</xsl:if>
|
||||||
|
</p>
|
||||||
|
</xsl:for-each>
|
||||||
|
</div>
|
||||||
|
</xsl:if>
|
||||||
|
|
||||||
|
<!-- return value -->
|
||||||
|
|
||||||
|
<xsl:if test="t:return">
|
||||||
|
<p>
|
||||||
|
Return value: <xsl:value-of select="t:return/@description"/> <xsl:if test="t:return/@valueNotes">, <xsl:value-of select="t:return/@valueNotes"/></xsl:if>
|
||||||
|
</p>
|
||||||
|
</xsl:if>
|
||||||
|
|
||||||
|
<!-- default keys -->
|
||||||
|
<xsl:if test="t:defaultKeys/*">
|
||||||
|
<div class="defaultKeys">
|
||||||
|
<br/>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="count(t:defaultKeys/*) = 1">
|
||||||
|
<xsl:text>default key: </xsl:text>
|
||||||
|
<xsl:apply-templates select="t:defaultKeys/*"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:text>default keys:</xsl:text>
|
||||||
|
<br/>
|
||||||
|
<xsl:for-each select="t:defaultKeys/*">
|
||||||
|
<xsl:apply-templates select="."/>
|
||||||
|
<br/>
|
||||||
|
</xsl:for-each>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</div>
|
||||||
|
</xsl:if>
|
||||||
|
|
||||||
|
<!-- references -->
|
||||||
|
<xsl:if test="t:references">
|
||||||
|
<div class="references">
|
||||||
|
See also:
|
||||||
|
<!-- refer to identifiers (identifier anchor) -->
|
||||||
|
<xsl:for-each select="t:references/t:identifierReference">
|
||||||
|
<a>
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:text>#identifier_</xsl:text>
|
||||||
|
<xsl:value-of select="translate(@identifier, ' ', '_')"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="class">internal</xsl:attribute>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="@name">
|
||||||
|
<xsl:value-of select="@name"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="@identifier"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</a>
|
||||||
|
<xsl:if test="position() != last()">
|
||||||
|
<xsl:text>, </xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:for-each>
|
||||||
|
<!-- refer to web resources -->
|
||||||
|
<xsl:for-each select="t:references/t:webReference">
|
||||||
|
<xsl:text>, </xsl:text><!-- we assume it's never the only entry! -->
|
||||||
|
<a>
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:value-of select="@url"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="class">external</xsl:attribute>
|
||||||
|
<xsl:attribute name="target">_blank</xsl:attribute>
|
||||||
|
<xsl:value-of select="@name"/>
|
||||||
|
</a>
|
||||||
|
</xsl:for-each>
|
||||||
|
<!-- refer to wiki resources -->
|
||||||
|
<xsl:for-each select="t:references/t:wikiReference">
|
||||||
|
<xsl:text>, </xsl:text><!-- we assume it's never the only entry! -->
|
||||||
|
<a>
|
||||||
|
<xsl:attribute name="href">https://wiki.cubers.net/action/view/<xsl:value-of select="@article"/></xsl:attribute>
|
||||||
|
<xsl:attribute name="class">external</xsl:attribute>
|
||||||
|
<xsl:attribute name="target">_blank</xsl:attribute>
|
||||||
|
<xsl:value-of select="@article"/>
|
||||||
|
</a>
|
||||||
|
</xsl:for-each>
|
||||||
|
</div>
|
||||||
|
</xsl:if>
|
||||||
|
</div>
|
||||||
|
</xsl:for-each>
|
||||||
|
</div>
|
||||||
|
</xsl:for-each>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- XML: CONTENTS PANEL -->
|
||||||
|
<div class="commandlist">
|
||||||
|
CubeScript command & variable list
|
||||||
|
</div>
|
||||||
|
<div id="contentspanel">
|
||||||
|
<xsl:if test="t:sections">
|
||||||
|
<xsl:for-each select="t:sections/t:section">
|
||||||
|
<xsl:sort select="@sortindex[not(../../@sort) or ../../@sort = 'true' or ../../@sort = '1']"/>
|
||||||
|
<div class="sectiontitle">
|
||||||
|
<a>
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:text>#section_</xsl:text>
|
||||||
|
<xsl:value-of select="translate(@name, ' ', '_')"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:value-of select="@name"/>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="identifiers">
|
||||||
|
<xsl:if test="t:identifiers">
|
||||||
|
<ul>
|
||||||
|
<xsl:for-each select="t:identifiers/*">
|
||||||
|
<xsl:sort select="@name[not(../../@sort) or ../../@sort = 'true' or ../../@sort = '1']"/>
|
||||||
|
<li>
|
||||||
|
<xsl:call-template name="identifierLink"/>
|
||||||
|
</li>
|
||||||
|
</xsl:for-each>
|
||||||
|
</ul>
|
||||||
|
</xsl:if>
|
||||||
|
</div>
|
||||||
|
</xsl:for-each>
|
||||||
|
</xsl:if>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
</xsl:template>
|
||||||
|
</xsl:transform>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# Automatically allows *nix based platforms to transform ../reference.xml into ../../config/docs.cfg
|
||||||
|
# This requires "xsltproc" - which may already be installed on most Linux based operating systems.
|
||||||
|
|
||||||
|
xsltproc -o ../../config/docs.cfg cuberef2cubescript.xslt ../reference.xml
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo "This shell script has finished!"
|
||||||
|
sleep 10
|
||||||
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
@echo off
|
||||||
|
rem Automatically allows MS Windows to transform ../reference.xml into ../../config/docs.cfg
|
||||||
|
rem This requires MSXSL, available at: http://www.microsoft.com/en-us/download/details.aspx?id=21714
|
||||||
|
@echo on
|
||||||
|
|
||||||
|
msxsl.exe -o ..\..\config\docs.cfg -v ..\reference.xml cuberef2cubescript.xslt
|
||||||
|
|
||||||
|
echo THIS BATCH
|
||||||
|
echo IS FINISHED!
|
||||||
|
pause
|
||||||
Reference in New Issue
Block a user