<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2008 - INRIA
 *
 * Copyright (C) 2012 - 2016 - Scilab Enterprises
 *
 * This file is hereby licensed under the terms of the GNU GPL v2.0,
 * pursuant to article 5.3.4 of the CeCILL v.2.1.
 * This file was originally licensed under the terms of the CeCILL v2.1,
 * and continues to be available under such terms.
 * For more information, see the COPYING file which you should have received
 * along with this program.
 *
 -->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="help_skeleton" xml:lang="en">
    <refnamediv>
        <refname>help_skeleton</refname>
        <refpurpose>build the skeleton of the xml help file associated to a Scilab
            function
        </refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>txt = help_skeleton(funname [,path [,language]])</synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>funname</term>
                <listitem>
                    <para>character string : the name of the function</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>path</term>
                <listitem>
                    <para>character string : the path where the file will be create if
                        required. If this argument is not given the skeleton is returned as
                        a string.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>language</term>
                <listitem>
                    <para>character string :with possible value "fr_FR" or "en_US" the
                        default is "en_US"
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>txt</term>
                <listitem>
                    <para>the XML code or the complete XML file path</para>
                    <para/>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>
            <literal>txt = help_skeleton(funname)</literal> generates a vector
            of strings containing the skeleton of the XML code describing the help of
            the function <literal>funname</literal>.
        </para>
        <para>
            <literal>fullpath = help_skeleton(funname,dirpath)</literal>
            generates the XML code describing the help of the function
            <literal>funname</literal> in a file named <literal>funname.xml</literal>
            in the directory specified by the path <literal>dirpath</literal>. In this
            case the function returns the file path.
        </para>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[
function [y,z]=foo(a,b),y=a+b,z=1,endfunction
p=help_skeleton('foo',TMPDIR)
if (isdef('editor') | (funptr('editor')<>0)) then
  editor(p);
end
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>See also</title>
        <simplelist type="inline">
            <member>
                <link linkend="help">help</link>
            </member>
            <member>
                <link linkend="man">Scilab documentation format</link>
            </member>
        </simplelist>
    </refsection>
</refentry>
