diff options
author | Shashank | 2017-05-29 12:40:26 +0530 |
---|---|---|
committer | Shashank | 2017-05-29 12:40:26 +0530 |
commit | 0345245e860375a32c9a437c4a9d9cae807134e9 (patch) | |
tree | ad51ecbfa7bcd3cc5f09834f1bb8c08feaa526a4 /modules/xml/help | |
download | scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.gz scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.bz2 scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.zip |
CMSCOPE changed
Diffstat (limited to 'modules/xml/help')
65 files changed, 5884 insertions, 0 deletions
diff --git a/modules/xml/help/en_US/XMLObjects.xml b/modules/xml/help/en_US/XMLObjects.xml new file mode 100755 index 000000000..2ee3f16f8 --- /dev/null +++ b/modules/xml/help/en_US/XMLObjects.xml @@ -0,0 +1,331 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="XMLObjects" xml:lang="en"> + <refnamediv> + <refname>XML Objects</refname> + <refpurpose>Describe the properties of the different XML objects</refpurpose> + </refnamediv> + <refsection> + <title>Contents</title> + <itemizedlist> + <listitem> + <para> + <link linkend="XMLDocument">XML Document</link> + </para> + </listitem> + <listitem> + <para> + <link linkend="XMLElement">XML Element</link> + </para> + </listitem> + <listitem> + <para> + <link linkend="XMLAttributes">XML Attributes</link> + </para> + </listitem> + <listitem> + <para> + <link linkend="XMLNamespace">XML Namespace</link> + </para> + </listitem> + <listitem> + <para> + <link linkend="XMLNodeList">XML Node List</link> + </para> + </listitem> + <listitem> + <para> + <link linkend="XMLNodeSet">XML XPath result set</link> + </para> + </listitem> + <listitem> + <para> + <link linkend="XMLValid">XML Validation file</link> + </para> + </listitem> + </itemizedlist> + </refsection> + <refsection> + <title>Description</title> + <para>The nodes and their properties can be accessed and modified.</para> + </refsection> + <refsection id="XMLDocument"> + <title>XML Document</title> + <para>A XML Document has two properties: root and url + <itemizedlist> + <listitem> + <para> + <emphasis role="bold">root</emphasis>: the root element of the document, it is a XML Element; + </para> + </listitem> + <listitem> + <para> + <emphasis role="bold">url</emphasis>: the url, as a string, of the document if it exist or an empty string if it is undefined. + </para> + </listitem> + </itemizedlist> + </para> + <programlisting role="example"><![CDATA[ + doc = xmlReadStr("<root><a att=""foo"" rib=""bar""><b>Hello</b></a></root>"); + doc.root = doc.root.children(1); + xmlDump(doc) + doc.url = TMPDIR+"/foo.xml"; + doc + xmlWrite(doc); + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection id="XMLElement"> + <title>XML Element</title> + <para>A XML Element has seven properties: + <itemizedlist> + <listitem> + <para> + <emphasis role="bold">name</emphasis>: the tag name; + </para> + </listitem> + <listitem> + <para> + <emphasis role="bold">namespace</emphasis>: a XML Namespace object; + </para> + </listitem> + <listitem> + <para> + <emphasis role="bold">content</emphasis>: the node content as a string. For example, the content of the node A in <A>hello <B>world</B> will be the string "hello world"; + </para> + </listitem> + <listitem> + <para> + <emphasis role="bold">type</emphasis>: the type of the node as a string. It can be on of the following values: "XML_ELEMENT_NODE", "XML_ATTRIBUTE_NODE", "XML_TEXT_NODE", "XML_CDATA_SECTION_NODE", "XML_ENTITY_REF_NODE", "XML_ENTITY_NODE", "XML_PI_NODE", "XML_COMMENT_NODE", "XML_DOCUMENT_NODE", "XML_DOCUMENT_TYPE_NODE", "XML_DOCUMENT_FRAG_NODE", "XML_NOTATION_NODE", "XML_HTML_DOCUMENT_NODE", "XML_DTD_NODE", "XML_ELEMENT_DECL", "XML_ATTRIBUTE_DECL", "XML_ENTITY_DECL", "XML_NAMESPACE_DECL", "XML_XINCLUDE_START", "XML_XINCLUDE_END", "XML_DOCB_DOCUMENT_NODE". + </para> + </listitem> + <listitem> + <para> + <emphasis role="bold">parent</emphasis>: the parent XML Element; + </para> + </listitem> + <listitem> + <para> + <emphasis role="bold">attributes</emphasis>: the node attributes as a XML Attributes object; + </para> + </listitem> + <listitem> + <para> + <emphasis role="bold">children</emphasis>: the children elements as a XML Node List object. + </para> + </listitem> + <listitem> + <para> + <emphasis role="bold">line</emphasis>: the line definition of this XML Element. + </para> + </listitem> + </itemizedlist> + <programlisting role="example"><![CDATA[ + s = "<root xmlns:bar=""http://www.scilab.org/"">"+.. + "<bar:a att=""foo"" rib=""bar"">"+.. + "<b>Hello</b><c> world</c></bar:a></root>" + doc = xmlReadStr(s); + first = doc.root.children(1); + b = first.children(1); + + // Add a new attribute named "new_attribute" + first.attributes.new_attribute = "value"; + + // Display the first child namespace + first.namespace + + // Display the node content + first.content + + // b has a parent + b.parent + + // You can add a new child to first + first.children(3) = b + + // non-integer index can be used to make insertion + first.children(1.5) = "<d> Scilab</d>" + + // First child has been defined at line... + b.line + + xmlDump(first) + xmlDelete(doc); + ]]></programlisting> + </para> + </refsection> + <refsection id="XMLAttributes"> + <title>XML Attributes</title> + <para>A XML Attributes is a kind of hashtable which maps attributes name to attributes value. An attribute value can be accessed or modified in using the attribute name as field of this object or in using an index between 1 and attributes size.</para> + <programlisting role="example"><![CDATA[ + s = "<root xmlns:bar=""http://www.scilab.org/"">"+.. + "<bar:a att=""foo"" rib=""bar"">"+.. + "<b>Hello</b><c> world</c></bar:a></root>" + doc = xmlReadStr(s); + first = doc.root.children(1); + + // Read an attribute + first.attributes.att + + // Set an empty attribute + first.attributes.att = ""; + + // Add a new attribute + first.attributes.hello = "world"; + + // Use an index + first.attributes(1) = "Bonjour"; + first.attributes(1) + + xmlDump(first) + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection id="XMLNamespace"> + <title>XML Namespace</title> + <para>A XML Namespace has two properties: href and prefix + <itemizedlist> + <listitem> + <para> + <emphasis role="bold">href</emphasis>: the namespace href as a string; + </para> + </listitem> + <listitem> + <para> + <emphasis role="bold">prefix</emphasis>: the prefix to use for this namespace, as a string. + </para> + </listitem> + </itemizedlist> + </para> + <programlisting role="example"><![CDATA[ + s = "<root xmlns:bar=""http://www.scilab.org/"">"+.. + "<bar:a att=""foo"" rib=""bar"">"+.. + "<b>Hello</b><c> world</c></bar:a></root>" + doc = xmlReadStr(s); + ns = doc.root.children(1).namespace; + ns.href + ns.prefix + + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection id="XMLNodeList"> + <title>XML Node List</title> + <para>A XML Node List is a type used to enumerate the children of an element. Each element can be accessed with an integer index. Since this is a list, it is possible to make insertion of new element in it, in using double index.</para> + <para>The size of the list can be retrieved in using 'size' field.</para> + <para>The name or the contents of each node of the list can be retrieved in using 'name' or 'content' field.</para> + <programlisting role="example"><![CDATA[ + doc = xmlReadStr("<root><a>Hello</a><b> world</b></root>"); + c = doc.root.children; + + // We check that we have two elements + c.size + + // Read the first element + xmlDump(c(1)) + + // Replace an element by another one + c(1) = "<c>Hello</c>" + + // Insert a new element between the first and the second + c(1.5) = "<d> Scilab</d>" // 1.5 or 1.234... + + // Insert a new element at the tail or at the head of the list + c(0) = "<e>Head </e>" + c(217) = "<f> Tail</f>" + + xmlDump(c) + + // Get the nodes name + c.name + + // Get the nodes contents + c.content + + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection id="XMLNodeSet"> + <title>XML XPath result set</title> + <para>A XML Node Set is an object returned by a XPath query. It is not possible to insert new elements or to replace existing ones. It is just possible to get them in using an integer index.</para> + <para>The size of the set can be retrieved with field 'size'.</para> + <programlisting role="example"><![CDATA[ + doc = xmlReadStr("<root><a><b>Hello</b></a><a>World</a></root>"); + s = xmlXPath(doc, "//a") + s.size + + s(1).content + s(2).content + + // Or ... + s.content + + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection id="XMLValid"> + <title>XML Validation file</title> + <para>A XML Validation file is an object used to validate a document. It is possible to validate in using DTD, Relax NG or schema.</para> + <programlisting role="example"><![CDATA[ + doc = xmlRead("SCI/modules/xml/tests/unit_tests/library.xml"); + dtd = xmlDTD("SCI/modules/xml/tests/unit_tests/library.dtd"); + schema = xmlSchema("SCI/modules/xml/tests/unit_tests/library.xsd"); + rng = xmlRelaxNG("SCI/modules/xml/tests/unit_tests/library.rng"); + + // Validation + xmlValidate(doc, dtd); + xmlValidate(doc, rng); + xmlValidate(doc, schema); + + xmlDelete("all"); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="xmlRead">xmlRead</link> + </member> + <member> + <link linkend="xmlReadStr">xmlReadStr</link> + </member> + <member> + <link linkend="xmlElement">xmlElement</link> + </member> + <member> + <link linkend="xmlDocument">xmlDocument</link> + </member> + <member> + <link linkend="xmlNs">xmlNs</link> + </member> + <member> + <link linkend="xmlDTD">xmlDTD</link> + </member> + <member> + <link linkend="xmlSchema">xmlSchema</link> + </member> + <member> + <link linkend="xmlRelaxNG">xmlRelaxNG</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XML module introduced.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/addchapter.sce b/modules/xml/help/en_US/addchapter.sce new file mode 100755 index 000000000..db6ea9f66 --- /dev/null +++ b/modules/xml/help/en_US/addchapter.sce @@ -0,0 +1,10 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +add_help_chapter("XML Management",SCI+"/modules/xml/help/en_US",%T);
\ No newline at end of file diff --git a/modules/xml/help/en_US/htmlDump.xml b/modules/xml/help/en_US/htmlDump.xml new file mode 100755 index 000000000..d36cf6d27 --- /dev/null +++ b/modules/xml/help/en_US/htmlDump.xml @@ -0,0 +1,94 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2013 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="htmlDump" xml:lang="en"> + <refnamediv> + <refname>htmlDump</refname> + <refpurpose>Dump a HTML document</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + str = htmlDump(xmlDoc [, indent]) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>xmlDoc</term> + <listitem> + <para>xmlDoc, a XML document</para> + </listitem> + </varlistentry> + <varlistentry> + <term>indent</term> + <listitem> + <para>indent, a boolean</para> + </listitem> + </varlistentry> + <varlistentry> + <term>str</term> + <listitem> + <para>str, a matrix of strings</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>Dump a HTML document. If indent is false (by default it is true), no indentation and carriage return will be added.</para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = htmlReadStr(["<!DOCTYPE html PUBLIC ""-//W3C//DTD HTML 4.01//EN"""; + """http://www.w3.org/TR/html4/strict.dtd"">"; + "<html lang=""en"">"; + " <head>"; + " <meta http-equiv=""content-type"" content=""text/html; charset=utf-8"">"; + " <title>title</title>"; + " <link rel=""stylesheet"" type=""text/css"" href=""style.css"">"; + " <script type=""text/javascript"" src=""script.js""></script>"; + " </head>"; + " <body>"; + " </body>"; + "</html>"]); + + // Dump a HTML document + htmlDump(doc) + + // Dump a HTML document without indentation + htmlDump(doc, %f) + + // Free the resources associated with the document + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="xmlWrite">htmlWrite</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.5.0</revnumber> + <revremark>HTML features added.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/htmlRead.xml b/modules/xml/help/en_US/htmlRead.xml new file mode 100755 index 000000000..790caa237 --- /dev/null +++ b/modules/xml/help/en_US/htmlRead.xml @@ -0,0 +1,102 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="htmlRead" xml:lang="en"> + <refnamediv> + <refname>htmlRead</refname> + <refpurpose>Read a HTML stream from a local or distant file</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + doc = htmlRead(path [, encoding]) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>path</term> + <listitem> + <para>a string, the path to the file to read.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>encoding</term> + <listitem> + <para>a string, the file encoding.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>doc</term> + <listitem> + <para>a mlist typed XMLDoc</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>Read and parse a HTML file. The returned document allows to access to the DOM tree which is kept in memory.</para> + <para>In general, a HTML file cannot be read with a XML parser because a HTML is rarely well-formated, so a HTML parser is required and it is more compliant.</para> + <para>Once the HTML file is parsed, it can be seen as a XML file in memory, so usual operations can be done.</para> + <para>The encoding argument is used to precise the file encoding.</para> + <para> + It is important to notice that the tree must be freed (to avoid memory leaks) with the function <link linkend="xmlDelete">xmlDelete</link>. + </para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = htmlRead("http://www.scilab.org"); + e = doc.root.children(1).children(1) + e.name + e.content + + // Now we can retrieve all the nodes with an 'href' attribute + q = xmlXPath(doc, "//*[@href]"); + q(1).attributes + + // We delete the doc + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="htmlReadStr">htmlReadStr</link> + </member> + <member> + <link linkend="xmlGetOpenDocs">xmlGetOpenDocs</link> + </member> + <member> + <link linkend="xmlDelete">xmlDelete</link> + </member> + <member> + <link linkend="xmlDocument">xmlDocument</link> + </member> + <member> + <link linkend="xmlXPath">xmlXPath</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.5.0</revnumber> + <revremark>HTML features added.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/htmlReadStr.xml b/modules/xml/help/en_US/htmlReadStr.xml new file mode 100755 index 000000000..df54bf7d8 --- /dev/null +++ b/modules/xml/help/en_US/htmlReadStr.xml @@ -0,0 +1,97 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="htmlReadStr" xml:lang="en"> + <refnamediv> + <refname>htmlReadStr</refname> + <refpurpose>Read a HTML tree from a string</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + doc = htmlReadStr(string) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>string</term> + <listitem> + <para>a string, containing XML code.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>doc</term> + <listitem> + <para>a mlist typed XMLDoc</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>Read and parse a HTML string. The returned document allows to access to the DOM tree which is kept in memory.</para> + <para> + It is important to notice that the tree must be freed (to avoid memory leaks) with the function <link linkend="xmlDelete">xmlDelete</link>. + </para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = htmlReadStr(["<!DOCTYPE html PUBLIC ""-//W3C//DTD HTML 4.01//EN"""; + """http://www.w3.org/TR/html4/strict.dtd"">"; + "<html lang=""en"">"; + " <head>"; + " <meta http-equiv=""content-type"" content=""text/html; charset=utf-8"">"; + " <title>title</title>"; + " <link rel=""stylesheet"" type=""text/css"" href=""style.css"">"; + " <script type=""text/javascript"" src=""script.js""></script>"; + " </head>"; + " <body>"; + " </body>"; + "</html>"]); + + // Dump a HTML document + htmlDump(doc) + + // Free the resources associated with the document + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="htmlRead">htmlRead</link> + </member> + <member> + <link linkend="xmlGetOpenDocs">xmlGetOpenDocs</link> + </member> + <member> + <link linkend="xmlDelete">xmlDelete</link> + </member> + <member> + <link linkend="xmlDocument">xmlDocument</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.5.0</revnumber> + <revremark>HTML features added.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/htmlWrite.xml b/modules/xml/help/en_US/htmlWrite.xml new file mode 100755 index 000000000..677686d90 --- /dev/null +++ b/modules/xml/help/en_US/htmlWrite.xml @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="htmlWrite" xml:lang="en"> + <refnamediv> + <refname>htmlWrite</refname> + <refpurpose>Write a HTML document in a file</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + htmlWrite(doc [, filename] [, indent]) + htmlWrite(doc [, indent]) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>doc</term> + <listitem> + <para>doc, a mlist typed XMLDoc</para> + </listitem> + </varlistentry> + <varlistentry> + <term>filename</term> + <listitem> + <para>filename, a string</para> + </listitem> + </varlistentry> + <varlistentry> + <term>indent</term> + <listitem> + <para>indent, a boolean</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>Write a HTML document in a file with the given filename or with the document url. If indent is true, then the document will be indented, by default indent is true.</para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = htmlRead("http://www.scilab.org"); + htmlWrite(doc, TMPDIR+"/scilab.html", %f); + + // Now we open the previous file, modify it and save it + doc1 = htmlRead(TMPDIR+"/scilab.html"); + xp = xmlXPath(doc1, "//title"); + e = xp(1); + e.content = "Hello Scilab World"; + htmlWrite(doc1); + + // Now we check that the modification has been done + doc2 = htmlRead(TMPDIR+"/scilab.html"); + xp = xmlXPath(doc2, "//title"); + xp(1).content + + xmlDelete("all"); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="xmlDump">xmlDump</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.5.0</revnumber> + <revremark>HTML features added.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/xmlAddNs.xml b/modules/xml/help/en_US/xmlAddNs.xml new file mode 100755 index 000000000..9fa56787f --- /dev/null +++ b/modules/xml/help/en_US/xmlAddNs.xml @@ -0,0 +1,95 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlAddNs" xml:lang="en"> + <refnamediv> + <refname>xmlAddNs</refname> + <refpurpose>Add a namespace to a XML Element</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + xmlAddNs(elem, [, ns1 [, ns2, ...]]) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>elem</term> + <listitem> + <para>a mlist typed XMLElem</para> + </listitem> + </varlistentry> + <varlistentry> + <term>nsi</term> + <listitem> + <para>a mlist typed XMLNs</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>Add one or more namespaces to an element</para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = xmlDocument("TMPDIR/foo.xml"); + doc.root = xmlElement(doc, "root"); + a = xmlElement(doc, "a"); + b = xmlElement(doc, "b"); + ns_scilab = xmlNs(a, "scilab", "http://www.scilab.org"); + ns_balics = xmlNs(a, "balics", "http://gro.balics.www"); + xmlAddNs(b, ns_scilab, ns_balics); + + doc.root.children(1) = a; + doc.root.children(2) = b; + xmlDump(doc) + + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="XMLObjects">XML Objects</link> + </member> + <member> + <link linkend="xmlDocument">xmlDocument</link> + </member> + <member> + <link linkend="xmlElement">xmlElement</link> + </member> + <member> + <link linkend="xmlNs">xmlNs</link> + </member> + <member> + <link linkend="xmlGetNsByHref">xmlGetNsByHref</link> + </member> + <member> + <link linkend="xmlGetNsByPrefix">xmlGetNsByPrefix</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XML module introduced.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/xmlAppend.xml b/modules/xml/help/en_US/xmlAppend.xml new file mode 100755 index 000000000..92a5d7463 --- /dev/null +++ b/modules/xml/help/en_US/xmlAppend.xml @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlAppend" xml:lang="en"> + <refnamediv> + <refname>xmlAppend</refname> + <refpurpose>Append an element to the parent children</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + xmlAppend(parent, child) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>parent</term> + <listitem> + <para>a mlist typed XMLElem</para> + </listitem> + </varlistentry> + <varlistentry> + <term>child</term> + <listitem> + <para>a mlist typed XMLElem</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>Append an element to the children of another element.</para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = xmlDocument(); + root = xmlElement(doc, "root"); + doc.root = root; + + for i=1:5 + xmlAppend(doc.root, xmlElement(doc, "child_" + string(i))); + end; + + xmlDump(doc) + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="XMLObjects">XML Objects</link> + </member> + <member> + <link linkend="xmlElement">xmlElement</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.1</revnumber> + <revremark>XML module updated.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/xmlAsNumber.xml b/modules/xml/help/en_US/xmlAsNumber.xml new file mode 100755 index 000000000..3d286f49e --- /dev/null +++ b/modules/xml/help/en_US/xmlAsNumber.xml @@ -0,0 +1,82 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlAsNumber" xml:lang="en"> + <refnamediv> + <refname>xmlAsNumber</refname> + <refpurpose>Convert the result of a XPath query into a row of numbers</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + nums = xmlAsNumber(xp) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>xp</term> + <listitem> + <para>xp, a XML mlist typed XMLSet or XMLList</para> + </listitem> + </varlistentry> + <varlistentry> + <term>nums</term> + <listitem> + <para>nums, a single row of doubles</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>The result of a XPath query or the chidren of a node can be a set of XMLElements which contains numbers, so the aim of this function is to convert the contents of each nodes into a double.</para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = xmlReadStr("<root><a>12</a><a>13</a><a>1.2345678</a><a>45e3</a><a>.23E-2</a></root>"); + + // Retrieve the content of the nodes with name equal to "a" + xp = xmlXPath(doc, "//a/text()"); + + // convert the result into doubles + data = xmlAsNumber(xp) + + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="xmlXPath">xmlXPath</link> + </member> + <member> + <link linkend="xmlAsText">xmlAsText</link> + </member> + <member> + <link linkend="xmlName">xmlName</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XML module introduced.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/xmlAsText.xml b/modules/xml/help/en_US/xmlAsText.xml new file mode 100755 index 000000000..840b8c18b --- /dev/null +++ b/modules/xml/help/en_US/xmlAsText.xml @@ -0,0 +1,82 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlAsText" xml:lang="en"> + <refnamediv> + <refname>xmlAsText</refname> + <refpurpose>Convert the result of a XPath query into a row of strings</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + strings = xmlAsText(xp) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>xp</term> + <listitem> + <para>xp, a XML mlist typed XMLSet or XMLList</para> + </listitem> + </varlistentry> + <varlistentry> + <term>strings</term> + <listitem> + <para>strings, a single row of strings</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>The result of a XPath query or the children of a node can be a set of XMLElements, so the aim of this function is to convert the contents of each nodes into a string.</para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = xmlReadStr("<root><a>Hello</a><a>Scilab</a><a>World</a></root>"); + + // Retrieve the content of the nodes with name equal to "a" + xp = xmlXPath(doc, "//a/text()"); + + // convert the result into a row of strings + data = xmlAsText(xp) + + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="xmlXPath">xmlXPath</link> + </member> + <member> + <link linkend="xmlAsNumber">xmlAsNumber</link> + </member> + <member> + <link linkend="xmlName">xmlName</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XML module introduced.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/xmlDTD.xml b/modules/xml/help/en_US/xmlDTD.xml new file mode 100755 index 000000000..a39d3ccaa --- /dev/null +++ b/modules/xml/help/en_US/xmlDTD.xml @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlDTD" xml:lang="en"> + <refnamediv> + <refname>xmlDTD</refname> + <refpurpose>Create a XML DTD object</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + dtd = xmlDTD(path) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>path</term> + <listitem> + <para>a string giving the path of the validation file</para> + </listitem> + </varlistentry> + <varlistentry> + <term>dtd</term> + <listitem> + <para>a mlist typed XMLValid</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>Useful to validate a document with a DTD.</para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = xmlRead("SCI/modules/xml/tests/unit_tests/library.xml"); + dtd = xmlDTD("SCI/modules/xml/tests/unit_tests/library.dtd"); + + // We test if the document is valid + // If no error the file is valid + + xmlValidate(doc, dtd); + + xmlDelete(doc, dtd); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="xmlValidate">xmlValidate</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XML module introduced.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/xmlDelete.xml b/modules/xml/help/en_US/xmlDelete.xml new file mode 100755 index 000000000..fd096db4d --- /dev/null +++ b/modules/xml/help/en_US/xmlDelete.xml @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlDelete" xml:lang="en"> + <refnamediv> + <refname>xmlDelete</refname> + <refpurpose>Delete a XML document</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + xmlDelete(obj1 [, obj2, [...]]) + xmlDelete("all") + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>obji</term> + <listitem> + <para>a mlist type XMLDoc or XMLValid, the document to delete</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>Delete a document or a validation file (in fact free all the memory associated with this object).</para> + <para>When the syntax xmlDelete("all") is used, all the open documents will be deleted.</para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = xmlRead("http://www.w3.org/TR/2009/REC-xml-names-20091208/xml-names-10-3e.xml"); + root = doc.root + xmlDelete(doc); + + // root is no more valid... so try to access it, will lead to an error + // disp(root) => This will fail + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="xmlGetOpenDocs">xmlGetOpenDocs</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XML module introduced.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/xmlDocument.xml b/modules/xml/help/en_US/xmlDocument.xml new file mode 100755 index 000000000..b957c8e76 --- /dev/null +++ b/modules/xml/help/en_US/xmlDocument.xml @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlDocument" xml:lang="en"> + <refnamediv> + <refname>xmlDocument</refname> + <refpurpose>Create a new XML document</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + doc = xmlDocument([uri, [, version]]) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>uri</term> + <listitem> + <para>a string giving document uri</para> + </listitem> + </varlistentry> + <varlistentry> + <term>version</term> + <listitem> + <para>a string giving the XML version ofthe document</para> + </listitem> + </varlistentry> + <varlistentry> + <term>doc</term> + <listitem> + <para>a mlist typed XMLDoc</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>Create a new XML document.</para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = xmlDocument("TMPDIR/foo.xml"); + root = xmlElement(doc, "root"); + root.attributes.attr = "value"; + + root.children(1) = "<a>hello</a>"; + root.children(2) = xmlElement(doc, "b"); + root.children(2).attributes.id = "123"; + root.children(2).content = " world"; + + doc.root = root; + xmlDump(doc) + + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="XMLObjects">XML Objects</link> + </member> + <member> + <link linkend="xmlElement">xmlElement</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XML module introduced.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/xmlDump.xml b/modules/xml/help/en_US/xmlDump.xml new file mode 100755 index 000000000..378aa6880 --- /dev/null +++ b/modules/xml/help/en_US/xmlDump.xml @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlDump" xml:lang="en"> + <refnamediv> + <refname>xmlDump</refname> + <refpurpose>Dump a XML object</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + str = xmlDump(xmlObj [, indent]) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>xmlObj</term> + <listitem> + <para>xmlObj, a XML mlist</para> + </listitem> + </varlistentry> + <varlistentry> + <term>indent</term> + <listitem> + <para>indent, a boolean</para> + </listitem> + </varlistentry> + <varlistentry> + <term>str</term> + <listitem> + <para>str, a matrix of strings</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>Dump a XML object. The objects which are dumpable are XMLDoc, XMLElement or XMLList. If indent is false (by default it is true), no indentation and carriage return will be added.</para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = xmlReadStr("<root><a att=""foo"" rib=""bar""><b>Hello</b></a></root>"); + // Dump a document + xmlDump(doc) + + // Dump a document without indentation + xmlDump(doc, %f) + + // Dump a node list + xmlDump(doc.root.children) + + //Dump an element + xmlDump(doc.root.children(1)) + + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="xmlWrite">xmlWrite</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XML module introduced.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/xmlElement.xml b/modules/xml/help/en_US/xmlElement.xml new file mode 100755 index 000000000..761e122c8 --- /dev/null +++ b/modules/xml/help/en_US/xmlElement.xml @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlElement" xml:lang="en"> + <refnamediv> + <refname>xmlElement</refname> + <refpurpose>Create a new XML element</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + e = xmlElement(doc, name) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>doc</term> + <listitem> + <para>a mlist typed XMLDoc</para> + </listitem> + </varlistentry> + <varlistentry> + <term>name</term> + <listitem> + <para>a string giving the element name</para> + </listitem> + </varlistentry> + <varlistentry> + <term>e</term> + <listitem> + <para>a mlist typed XMLElem</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>Create a new XML element with the given name.</para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = xmlReadStr("<root><a>Hello</a><b> world</b></root>"); + e = xmlElement(doc, "c"); + e.attributes.attr = "value"; + e.content = "!"; + doc.root.children(3) = e; + xmlDump(doc) + + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="XMLObjects">XML Objects</link> + </member> + <member> + <link linkend="xmlDocument">xmlDocument</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XML module introduced.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/xmlFormat.xml b/modules/xml/help/en_US/xmlFormat.xml new file mode 100755 index 000000000..6b7283680 --- /dev/null +++ b/modules/xml/help/en_US/xmlFormat.xml @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlFormat" xml:lang="en"> + <refnamediv> + <refname>xmlFormat</refname> + <refpurpose>Format a Scilab variable into XML</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + xmlCode = xmlFormat(scilabVar) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>scilabVar</term> + <listitem> + <para>scilabVar, a Scilab's variable</para> + </listitem> + </varlistentry> + <varlistentry> + <term>xmlCode</term> + <listitem> + <para>xmlCode, a string containing XML code</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>This function does nothing by itself ! It needs to be overloaded to be useful.</para> + <para>It is used when a Scilab variable is inserted in the XML tree.</para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = xmlReadStr("<root><a att=""foo"" rib=""bar""><b>Hello</b></a></root>"); + // This code will fail: + // doc.root.children(1.5) = 1.23456; + + // Now we define %s_xmlFormat to handle double type + // Take care, in this example, the double matrix is not handled + function y=%s_xmlFormat(x), y="<number>" + string(x) + "</number>", endfunction; + + // we retry a number insertion + doc.root.children(1.5) = 1.23456; + xmlDump(doc) + + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XML module introduced.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/xmlGetNsByHref.xml b/modules/xml/help/en_US/xmlGetNsByHref.xml new file mode 100755 index 000000000..d575b2fa1 --- /dev/null +++ b/modules/xml/help/en_US/xmlGetNsByHref.xml @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlGetNsByHref" xml:lang="en"> + <refnamediv> + <refname>xmlGetNsByHref</refname> + <refpurpose>Get a namespace by its href</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + ns = xmlGetNsByHref(elem, href) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>elem</term> + <listitem> + <para>a mlist typed XMLElem</para> + </listitem> + </varlistentry> + <varlistentry> + <term>href</term> + <listitem> + <para>a string giving the href</para> + </listitem> + </varlistentry> + <varlistentry> + <term>ns</term> + <listitem> + <para>a mlist typed XMLNs</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>Search a namespace with the given href on the element or on its ancestors.</para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + s = "<root><a xmlns:scilab=""http://www.scilab.org"">"+.. + "<b>Hello </b><scilab:c>World</scilab:c></a></root>" + doc = xmlReadStr(s) + c = doc.root.children(1).children(2); + xmlGetNsByHref(c, "http://www.scilab.org") + + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="xmlNs">xmlNs</link> + </member> + <member> + <link linkend="xmlGetNsByPrefix">xmlGetNsByPrefix</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XML module introduced.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/xmlGetNsByPrefix.xml b/modules/xml/help/en_US/xmlGetNsByPrefix.xml new file mode 100755 index 000000000..94e2d92c9 --- /dev/null +++ b/modules/xml/help/en_US/xmlGetNsByPrefix.xml @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlGetNsByPrefix" xml:lang="en"> + <refnamediv> + <refname>xmlGetNsByPrefix</refname> + <refpurpose>Get a namespace by prefix</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + ns = xmlGetNsByPrefix(elem, prefix) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>elem</term> + <listitem> + <para>a mlist typed XMLElem</para> + </listitem> + </varlistentry> + <varlistentry> + <term>prefix</term> + <listitem> + <para>a string giving the prefix</para> + </listitem> + </varlistentry> + <varlistentry> + <term>ns</term> + <listitem> + <para>a mlist typed XMLNs</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>Search a namespace with the given prefix on the element or on its ancestors.</para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + s = "<root><a xmlns:scilab=""http://www.scilab.org"">"+.. + "<b>Hello </b><scilab:c>World</scilab:c></a></root>" + doc = xmlReadStr(s) + c = doc.root.children(1).children(2); + xmlGetNsByPrefix(c, "scilab") + + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="xmlNs">xmlNs</link> + </member> + <member> + <link linkend="xmlGetNsByHref">xmlGetNsByHref</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XML module introduced.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/xmlGetOpenDocs.xml b/modules/xml/help/en_US/xmlGetOpenDocs.xml new file mode 100755 index 000000000..65e62971f --- /dev/null +++ b/modules/xml/help/en_US/xmlGetOpenDocs.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlGetOpenDocs" xml:lang="en"> + <refnamediv> + <refname>xmlGetOpenDocs</refname> + <refpurpose>Get all open XML documents or all open XML Validation files.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + list = xmlGetOpenDocs() + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>list</term> + <listitem> + <para>list, a list containing all the open documents or XML Validation files</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>This function is useful to delete open documents (and essentially to free the memory).</para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = xmlRead("http://www.w3.org/TR/2009/REC-xml-names-20091208/xml-names-10-3e.xml"); + doc = xmlReadStr("<root><a att=""foo"" rib=""bar""><b>Hello</b></a></root>"); + l = xmlGetOpenDocs() + xmlDelete("all"); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="xmlDelete">xmlDelete</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XML module introduced.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/xmlIsValidObject.xml b/modules/xml/help/en_US/xmlIsValidObject.xml new file mode 100755 index 000000000..421c18571 --- /dev/null +++ b/modules/xml/help/en_US/xmlIsValidObject.xml @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlIsValidObject" xml:lang="en"> + <refnamediv> + <refname>xmlIsValidObject</refname> + <refpurpose>Test the existence of a XML object</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + exists = xmlIsValidObject(obj) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>obj</term> + <listitem> + <para>a XML object or a matrix of strings containing the variables names</para> + </listitem> + </varlistentry> + <varlistentry> + <term>exists</term> + <listitem> + <para>a boolean or a matrix of booleans to indicate if the XML objects exist or not</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>When a XML document has been deleted all the attached objects are destroyed, but on the Scilab side the objects are still alive. So this function is useful to know if an object on the Scilab side is valid or not.</para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = xmlRead("http://www.w3.org/TR/2009/REC-xml-names-20091208/xml-names-10-3e.xml"); + r = doc.root + // must return %T + xmlIsValidObject(r) + + // We delete the doc + xmlDelete(doc); + + // must return [%F %F] + xmlIsValidObject(["doc" "r"]) + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="XMLObjects">XML Objects</link> + </member> + <member> + <link linkend="xmlDelete">xmlDelete</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XML module introduced.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/xmlName.xml b/modules/xml/help/en_US/xmlName.xml new file mode 100755 index 000000000..848847f5e --- /dev/null +++ b/modules/xml/help/en_US/xmlName.xml @@ -0,0 +1,85 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlName" xml:lang="en"> + <refnamediv> + <refname>xmlName</refname> + <refpurpose>Retrieve the name of the elements.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + names = xmlName(obj) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>obj</term> + <listitem> + <para>obj, a XML mlist typed XMLSet or XMLList or XMLElem or XMLAttr</para> + </listitem> + </varlistentry> + <varlistentry> + <term>name</term> + <listitem> + <para>names, a single row of strings</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>Retrieve the name(s) of the elements composing the XMLObject.</para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +doc = xmlReadStr("<root><foo a=""123"" b=""456"" c=""789""/></root>") + +// Retrieve the name of a single element +xmlName(doc.root.children(1)) + +// Retrieve the names of an attributes list +xmlName(doc.root.children(1).attributes) + +// Retrieve the names of the result of a XPath query +xmlName(xmlXPath(doc,"//foo/@*")) + +xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="xmlXPath">xmlXPath</link> + </member> + <member> + <link linkend="xmlAsText">xmlAsText</link> + </member> + <member> + <link linkend="xmlAsNumber">xmlAsNumber</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.1</revnumber> + <revremark>xmlName function introduced.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/xmlNs.xml b/modules/xml/help/en_US/xmlNs.xml new file mode 100755 index 000000000..b0ea1cd61 --- /dev/null +++ b/modules/xml/help/en_US/xmlNs.xml @@ -0,0 +1,96 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlNs" xml:lang="en"> + <refnamediv> + <refname>xmlNs</refname> + <refpurpose>Create a new XML Namespace</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + ns = xmlNs(elem, prefix, href) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>elem</term> + <listitem> + <para>a mlist typed XMLElem</para> + </listitem> + </varlistentry> + <varlistentry> + <term>prefix</term> + <listitem> + <para>a string giving the prefix for this namespace or the empty matrix to have an empty prefix</para> + </listitem> + </varlistentry> + <varlistentry> + <term>href</term> + <listitem> + <para>a string giving the href for this namespace</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>Create a new XML namespace associated with a XML element. The created namespace can be used in the element or in its children.</para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = xmlDocument("TMPDIR/foo.xml"); + doc.root = xmlElement(doc, "root"); + ns = xmlNs(doc.root, "scilab", "http://www.scilab.org"); + doc.root.children(1) = "<a>hello</a>"; + doc.root.children(1).namespace = ns; + xmlDump(doc) + + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="XMLObjects">XML Objects</link> + </member> + <member> + <link linkend="xmlDocument">xmlDocument</link> + </member> + <member> + <link linkend="xmlElement">xmlElement</link> + </member> + <member> + <link linkend="xmlAddNs">xmlAddNs</link> + </member> + <member> + <link linkend="xmlGetNsByHref">xmlGetNsByHref</link> + </member> + <member> + <link linkend="xmlGetNsByPrefix">xmlGetNsByPrefix</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XML module introduced.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/xmlRead.xml b/modules/xml/help/en_US/xmlRead.xml new file mode 100755 index 000000000..334f4c933 --- /dev/null +++ b/modules/xml/help/en_US/xmlRead.xml @@ -0,0 +1,115 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlRead" xml:lang="en"> + <refnamediv> + <refname>xmlRead</refname> + <refpurpose>Read a XML stream from a local or distant file</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + doc = xmlRead(path [, encoding] [, validateDTD]) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>path</term> + <listitem> + <para>a string, the path to the file to read.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>encoding</term> + <listitem> + <para>a string, the file encoding.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>validateDTD</term> + <listitem> + <para>a boolean to indicate if the document must be validated.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>doc</term> + <listitem> + <para>a mlist typed XMLDoc</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>Read and parse a XML file. The returned document allows to access to the DOM tree which is kept in memory.</para> + <para>If validateDTD is set to true, the document will be validated or not during the parsing operation.</para> + <para>The encoding argument is used to precise the file encoding.</para> + <para> + It is important to notice that the tree must be freed (to avoid memory leaks) with the function <link linkend="xmlDelete">xmlDelete</link>. + </para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = xmlRead("http://www.w3.org/TR/2009/REC-xml-names-20091208/xml-names-10-3e.xml"); + e = doc.root.children(1).children(1) + e.name + e.content + xmlDump(e) + + // Now we can retrieve all the nodes with an 'href' attribute + q = xmlXPath(doc, "//*[@href]"); + q(1).attributes.href + + // We delete the doc + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="xmlReadStr">xmlReadStr</link> + </member> + <member> + <link linkend="xmlGetOpenDocs">xmlGetOpenDocs</link> + </member> + <member> + <link linkend="xmlDelete">xmlDelete</link> + </member> + <member> + <link linkend="xmlDocument">xmlDocument</link> + </member> + <member> + <link linkend="xmlXPath">xmlXPath</link> + </member> + <member> + <link linkend="xmlValidate">xmlValidate</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XML module introduced.</revremark> + </revision> + <revision> + <revnumber>5.5.0</revnumber> + <revremark>Add new argument to select file encoding.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/xmlReadStr.xml b/modules/xml/help/en_US/xmlReadStr.xml new file mode 100755 index 000000000..814e6a97f --- /dev/null +++ b/modules/xml/help/en_US/xmlReadStr.xml @@ -0,0 +1,104 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlReadStr" xml:lang="en"> + <refnamediv> + <refname>xmlReadStr</refname> + <refpurpose>Read a XML tree from a string</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + doc = xmlReadStr(string [, validateDTD]) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>string</term> + <listitem> + <para>a string, containing XML code.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>validateDTD</term> + <listitem> + <para>a boolean to indicate if the document must be validated.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>doc</term> + <listitem> + <para>a mlist typed XMLDoc</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>Read and parse a XML string. The returned document allows to access to the DOM tree which is kept in memory.</para> + <para>If validateDTD is set to true, the document will be validated or not during the parsing operation.</para> + <para> + It is important to notice that the tree must be freed (to avoid memory leaks) with the function <link linkend="xmlDelete">xmlDelete</link>. + </para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = xmlReadStr("<root><a att=""foo"" rib=""bar""><b>Hello</b></a></root>"); + e = doc.root.children(1).children(1) + e.name + e.content + xmlDump(e) + doc.root.children(1).attributes.att + doc.root.children(1).attributes.rib + + // Modify the attributes + doc.root.children(1).attributes.att = "truc" + doc.root.children(1).attributes.rib = "machin" + xmlDump(doc.root.children(1)) + + // We delete the doc + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="xmlRead">xmlRead</link> + </member> + <member> + <link linkend="xmlGetOpenDocs">xmlGetOpenDocs</link> + </member> + <member> + <link linkend="xmlDelete">xmlDelete</link> + </member> + <member> + <link linkend="xmlDocument">xmlDocument</link> + </member> + <member> + <link linkend="xmlValidate">xmlValidate</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XML module introduced.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/xmlRelaxNG.xml b/modules/xml/help/en_US/xmlRelaxNG.xml new file mode 100755 index 000000000..5080d8c6f --- /dev/null +++ b/modules/xml/help/en_US/xmlRelaxNG.xml @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlRelaxNG" xml:lang="en"> + <refnamediv> + <refname>xmlRelaxNG</refname> + <refpurpose>Create a XML Relax NG object</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + schema = xmlRelaxNG(path) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>path</term> + <listitem> + <para>a string giving the path of the validation file</para> + </listitem> + </varlistentry> + <varlistentry> + <term>dtd</term> + <listitem> + <para>a mlist typed XMLValid</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>Useful to validate a document with a Relax NG.</para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = xmlRead("SCI/modules/xml/tests/unit_tests/library.xml"); + rng = xmlRelaxNG("SCI/modules/xml/tests/unit_tests/library.rng"); + + // We test if the document is valid + // If no error the file is valid + + xmlValidate(doc, rng); + + xmlDelete(doc, rng); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="xmlValidate">xmlValidate</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XML module introduced.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/xmlRemove.xml b/modules/xml/help/en_US/xmlRemove.xml new file mode 100755 index 000000000..aec603102 --- /dev/null +++ b/modules/xml/help/en_US/xmlRemove.xml @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlRemove" xml:lang="en"> + <refnamediv> + <refname>xmlRemove</refname> + <refpurpose>Remove an element or a list of elements from their parents</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + xmlRemove(elems) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>elems</term> + <listitem> + <para>elems, a XMLElem or a XMLSet (result of XPath query) or a XMLlist (a children list)</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>Detach one or several elements from their parents. The detached elements are definitly lost.</para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = xmlReadStr("<root><a>Hello</a><b>Scilab</b><a>World</a></root>"); + + // Remove all the <a> + xp = xmlXPath(doc, "//a"); + xmlRemove(xp); + xmlDump(doc) + xmlDelete(doc); + + // Remove the first element + doc = xmlReadStr("<root><a>Hello</a><b>Scilab</b><a>World</a></root>"); + xmlRemove(doc.root.children(1)); + xmlDump(doc) + + //Remove all the root children + xmlRemove(doc.root.children); + xmlDump(doc) + + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="XMLObjects">XMLObjects</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XML module introduced.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/xmlSchema.xml b/modules/xml/help/en_US/xmlSchema.xml new file mode 100755 index 000000000..d3b0a1f51 --- /dev/null +++ b/modules/xml/help/en_US/xmlSchema.xml @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlSchema" xml:lang="en"> + <refnamediv> + <refname>xmlSchema</refname> + <refpurpose>Create a XML Schema object</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + schema = xmlSchema(path) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>path</term> + <listitem> + <para>a string giving the path of the validation file</para> + </listitem> + </varlistentry> + <varlistentry> + <term>dtd</term> + <listitem> + <para>a mlist typed XMLValid</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>Useful to validate a document with a Schema.</para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = xmlRead("SCI/modules/xml/tests/unit_tests/library.xml"); + schema = xmlSchema("SCI/modules/xml/tests/unit_tests/library.xsd"); + + // We test if the document is valid + // If no error the file is valid + + xmlValidate(doc, schema); + + xmlDelete(doc, schema); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="xmlValidate">xmlValidate</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XML module introduced.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/xmlSetAttributes.xml b/modules/xml/help/en_US/xmlSetAttributes.xml new file mode 100755 index 000000000..023b64d9e --- /dev/null +++ b/modules/xml/help/en_US/xmlSetAttributes.xml @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlSetAttributes" xml:lang="en"> + <refnamediv> + <refname>xmlSetAttributes</refname> + <refpurpose>Set the attributes name and value.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + xmlObj = xmlSetAttributes(xmlObj, nameValue) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>xmlObj</term> + <listitem> + <para>xmlObj, a XML mlist typed XMLSet or XMLList or XMLElem or XMLAttr</para> + </listitem> + </varlistentry> + <varlistentry> + <term>nameValue</term> + <listitem> + <para>nameValue, a matrix nx2 or nx3 of strings where each rows contains [name value] or [prefix name value]</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>Set the attributes of an element or a list of elements.</para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = xmlReadStr("<root><a><b><c></c></b></a><b></b></root>"); + + // Retrieve all the nodes + xp = xmlXPath(doc, "//*"); + + // Add the attributes hello="world" and bonjour="monde" to all the nodes + xmlSetAttributes(xp, ["hello" "world" ; "bonjour" "monde"]); + xmlDump(doc) + + // Add the attribute foo="bar" to the first child of root + xmlSetAttributes(doc.root.children(1), ["foo" "bar"]); + xmlDump(doc) + + // Add the attribute bar="foo" to all the children of root + xmlSetAttributes(doc.root.children, ["bar" "foo"]); + + // Add the attribute truc="machin" to the list of the attributes of the second <b> + xmlSetAttributes(doc.root.children(2).attributes, ["truc" "machin"]); + xmlDump(doc) + + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="XMLObjects">XMLObjects</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XML module introduced.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/xmlValidate.xml b/modules/xml/help/en_US/xmlValidate.xml new file mode 100755 index 000000000..518cf4647 --- /dev/null +++ b/modules/xml/help/en_US/xmlValidate.xml @@ -0,0 +1,115 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlValidate" xml:lang="en"> + <refnamediv> + <refname>xmlValidate</refname> + <refpurpose>Validate a document in using a DTD, a Relax NG or a Schema.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + error = xmlValidate(docs [, valid]) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>docs</term> + <listitem> + <para>a mlist typed XMLDoc or a matrix of string containing path to XML documents</para> + </listitem> + </varlistentry> + <varlistentry> + <term>valid</term> + <listitem> + <para>a mlist typed XMLValid.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>error</term> + <listitem> + <para>a matrix of string if an error occurred or []</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>Validate an already parsed document or a set of documents with given paths with a DTD, a Relax NG or a Schema. If the document is valid, then the returned error is an empty matrix, else a matrix of strings is returned with the error message.</para> + <para>Validate a document with its path can improve performance and reduce the memory consumption.</para> + <para>It is not possible for the moment to validate a document against an external DTD. The only way to do this is to include in your XML file someting like <![CDATA[<!DOCTYPE foo SYSTEM "foo.dtd">]]> and to use xmlValidate without second argument.</para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = xmlRead("SCI/modules/xml/tests/unit_tests/library.xml"); + dtd = xmlDTD("SCI/modules/xml/tests/unit_tests/library.dtd"); + schema = xmlSchema("SCI/modules/xml/tests/unit_tests/library.xsd"); + rng = xmlRelaxNG("SCI/modules/xml/tests/unit_tests/library.rng"); + + // We test if the document is valid + // If no error the file is valid + + // DTD + xmlValidate(doc, dtd); + + // Relax NG + xmlValidate(doc, rng); + + // Schema + xmlValidate(doc, schema); + + // All is ok... now we add a new element to the document + doc.root.children(3) = "<a>error</a>" + + // Now the validations go to fail + xmlValidate(doc, dtd); + xmlValidate(doc, rng); + xmlValidate(doc, schema); + + // You can validate a document with its path + xmlValidate("SCI/modules/xml/tests/unit_tests/library.xml") + xmlValidate("SCI/modules/xml/tests/unit_tests/invalid_library.xml") + + xmlValidate("SCI/modules/xml/tests/unit_tests/library.xml", schema) + xmlValidate("SCI/modules/xml/tests/unit_tests/invalid_library.xml", rng) + + // We delete the all the open documents + xmlDelete(doc, dtd, schema, rng); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="xmlDTD">xmlDTD</link> + </member> + <member> + <link linkend="xmlSchema">xmlSchema</link> + </member> + <member> + <link linkend="xmlRelaxNG">xmlRelaxNG</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XML module introduced.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/xmlWrite.xml b/modules/xml/help/en_US/xmlWrite.xml new file mode 100755 index 000000000..e2f558ac3 --- /dev/null +++ b/modules/xml/help/en_US/xmlWrite.xml @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlWrite" xml:lang="en"> + <refnamediv> + <refname>xmlWrite</refname> + <refpurpose>Write a XML document in a file</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + xmlWrite(doc [, filename] [, indent]) + xmlWrite(doc [, indent]) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>doc</term> + <listitem> + <para>doc, a mlist typed XMLDoc</para> + </listitem> + </varlistentry> + <varlistentry> + <term>filename</term> + <listitem> + <para>filename, a string</para> + </listitem> + </varlistentry> + <varlistentry> + <term>indent</term> + <listitem> + <para>indent, a boolean</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>Write a XML document in a file with the given filename or with the document url. If indent is true, then the document will be indented, by default indent is true.</para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = xmlReadStr("<root><a att=""foo"" rib=""bar""><b>Hello</b></a></root>"); + xmlWrite(doc, TMPDIR+"/foo.xml", %f); + + // Now we open the previous file, modify it and save it + doc1 = xmlRead(TMPDIR+"/foo.xml"); + doc1.root.children(1).name = "newName"; + xmlWrite(doc1); + + // Now we check that the modification has been done + doc2 = xmlRead(TMPDIR+"/foo.xml"); + doc2.root.children(1).name + + xmlDelete("all"); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="xmlDump">xmlDump</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XML module introduced.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/en_US/xmlXPath.xml b/modules/xml/help/en_US/xmlXPath.xml new file mode 100755 index 000000000..93213f1ca --- /dev/null +++ b/modules/xml/help/en_US/xmlXPath.xml @@ -0,0 +1,148 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlXPath" xml:lang="en"> + <refnamediv> + <refname>xmlXPath</refname> + <refpurpose>Make a XPath query on a XML document</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + result = xmlXPath(xmlObj, queryStr [, namespaces]) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>xmlObj</term> + <listitem> + <para>a XML mlist typed XMLDoc or XMLElem</para> + </listitem> + </varlistentry> + <varlistentry> + <term>queryStr</term> + <listitem> + <para>a Xpath query</para> + </listitem> + </varlistentry> + <varlistentry> + <term>namespaces</term> + <listitem> + <para>An optional matrix nx2 of strings</para> + </listitem> + </varlistentry> + <varlistentry> + <term>result</term> + <listitem> + <para>result can be a set of XMLElements or a number or a string or a boolean</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>Make a XPath query on a document or in starting on an element. If you need to use namespaces, then you must define them in using the optional argument. XML namespaces are defined in the first tag with the keyword "xmlns".</para> + <para> + For more information about XPath, you can read the <ulink url="http://www.w3.org/TR/1999/REC-xpath-19991116/">W3C recommandation</ulink>. + </para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = xmlRead("http://www.w3.org/TR/2009/REC-xml-names-20091208/xml-names-10-3e.xml"); + + // Retrieve the nodes with name equal to "note" + xp = xmlXPath(doc, "//note"); + s = size(xp); + for i=1:s(2) + xmlDump(xp(i)) + end + + // Count the nodes with name equal to "note" + xp = xmlXPath(doc, "count(//note)") + + // Retrieve the node with id="Philosophy" + xp = xmlXPath(doc, "//*[@id=""Philosophy""]"); + s = size(xp); + if (s(2) <> 0) then + xmlDump(xp(1)) + end + + // Retrieve the nodes with an attribute num equal to the number 5 + xp = xmlXPath(doc, "//*[number(@num)=5]"); + s = size(xp); + if (s(2) <> 0) then + xmlDump(xp(1)) + end + + // Get the name and the content of all the attributes of nodes named 'emph' + xp = xmlXPath(doc, "//emph/@*"); + xp.name + xp.content + + xmlDelete(doc); + + // Query using namespaces + t = "<root xmlns:scilab=""http://www.scilab.org"">"+.. + "<scilab:a att=""foo"" rib=""bar"">"+.. + "<b>Hello</b></scilab:a></root>" + doc = xmlReadStr(t); + + // We search for element named a + xmlXPath(doc, "//a") // => nothing + xmlXPath(doc, "//scilab:a", ["scilab" "http://www.scilab.org"]) // => OK + + // This code will fail: + // xmlXPath(doc, "//scilab:a") // => error + + xmlDelete(doc); + + // Query starting on an element + t = "<root att=""attribute""><a a1=""A1"" a2=""A2"" a3=""A3"">"+.. + "<b>Hello</b><c>Scilab</c><b>World</b></a><b>Nothing</b></root>" + doc = xmlReadStr(t); + e = doc.root.children(1); + + // Get the attributes of e + xp = xmlXPath(e, "@*"); + xmlAsText(xp) + + // Get the 'b' from e + xp = xmlXPath(e, "b"); + xmlAsText(xp) + + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <ulink url="http://www.w3.org/TR/1999/REC-xpath-19991116/">W3C XPath recommandation</ulink> + </member> + <member> + <ulink url="http://www.w3schools.com/xpath/">XPath tutorial</ulink> + </member> + </simplelist> + </refsection> + <refsection> + <title>History</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XML module introduced.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/fr_FR/addchapter.sce b/modules/xml/help/fr_FR/addchapter.sce new file mode 100755 index 000000000..e31fd7fb6 --- /dev/null +++ b/modules/xml/help/fr_FR/addchapter.sce @@ -0,0 +1,10 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +add_help_chapter("Gestion des fichiers XML",SCI+"/modules/xml/help/fr_FR",%T); diff --git a/modules/xml/help/ja_JP/XMLObjects.xml b/modules/xml/help/ja_JP/XMLObjects.xml new file mode 100755 index 000000000..e5bed1f1d --- /dev/null +++ b/modules/xml/help/ja_JP/XMLObjects.xml @@ -0,0 +1,335 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="XMLObjects" xml:lang="ja"> + <refnamediv> + <refname>XML Objects</refname> + <refpurpose>異なるのXMLオブジェクトのプロパティを記述する</refpurpose> + </refnamediv> + <refsection> + <title>内容</title> + <itemizedlist> + <listitem> + <para> + <link linkend="XMLDocument">XML文書</link> + </para> + </listitem> + <listitem> + <para> + <link linkend="XMLElement">XML要素</link> + </para> + </listitem> + <listitem> + <para> + <link linkend="XMLAttributes">XML属性</link> + </para> + </listitem> + <listitem> + <para> + <link linkend="XMLNamespace">XML名前空間</link> + </para> + </listitem> + <listitem> + <para> + <link linkend="XMLNodeList">XMLノードリスト</link> + </para> + </listitem> + <listitem> + <para> + <link linkend="XMLNodeSet">XML XPath結果セット</link> + </para> + </listitem> + <listitem> + <para> + <link linkend="XMLValid">XML検証ファイル</link> + </para> + </listitem> + </itemizedlist> + </refsection> + <refsection> + <title>説明</title> + <para>ノードおよびそのプロパティをアクセスおよび修正可能です.</para> + </refsection> + <refsection id="XMLDocument"> + <title>XML文書</title> + <para>XML文書は以下の2つのプロパティを有します: root および url + <itemizedlist> + <listitem> + <para> + <emphasis role="bold">root</emphasis>: 文書のルート要素で, XML要素です; + </para> + </listitem> + <listitem> + <para> + <emphasis role="bold">url</emphasis>: urlは文字列で, + 存在する場合は文書のURL,未定義の場合は空文字列となります. + </para> + </listitem> + </itemizedlist> + </para> + <programlisting role="example"><![CDATA[ + doc = xmlReadStr("<root><a att=""foo"" rib=""bar""><b>Hello</b></a></root>"); + doc.root = doc.root.children(1); + xmlDump(doc) + doc.url = TMPDIR+"/foo.xml"; + doc + xmlWrite(doc); + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection id="XMLElement"> + <title>XML要素</title> + <para>XML要素は以下の7つのプロパティを有します: + <itemizedlist> + <listitem> + <para> + <emphasis role="bold">name</emphasis>: タグ名; + </para> + </listitem> + <listitem> + <para> + <emphasis role="bold">namespace</emphasis>: XML名前空間オブジェクト; + </para> + </listitem> + <listitem> + <para> + <emphasis role="bold">content</emphasis>: + ノードの内容を表す文字列. + 例えば,<A>hello <B>world</B> というノードA + の内容は文字列 "hello world"となります. + </para> + </listitem> + <listitem> + <para> + <emphasis role="bold">type</emphasis>: + ノードの型を表す文字列. 以下の値のどれかとなります: + "XML_ELEMENT_NODE", "XML_ATTRIBUTE_NODE", "XML_TEXT_NODE", "XML_CDATA_SECTION_NODE", "XML_ENTITY_REF_NODE", "XML_ENTITY_NODE", "XML_PI_NODE", "XML_COMMENT_NODE", "XML_DOCUMENT_NODE", "XML_DOCUMENT_TYPE_NODE", "XML_DOCUMENT_FRAG_NODE", "XML_NOTATION_NODE", "XML_HTML_DOCUMENT_NODE", "XML_DTD_NODE", "XML_ELEMENT_DECL", "XML_ATTRIBUTE_DECL", "XML_ENTITY_DECL", "XML_NAMESPACE_DECL", "XML_XINCLUDE_START", "XML_XINCLUDE_END", "XML_DOCB_DOCUMENT_NODE". + </para> + </listitem> + <listitem> + <para> + <emphasis role="bold">parent</emphasis>: 親XML要素; + </para> + </listitem> + <listitem> + <para> + <emphasis role="bold">attributes</emphasis>: + XML属性オブジェクトとして表したノード属性; + </para> + </listitem> + <listitem> + <para> + <emphasis role="bold">children</emphasis>: + XMLノードリストオブジェクトとして表した子要素. + </para> + </listitem> + <listitem> + <para> + <emphasis role="bold">line</emphasis>: + XML要素の線の定義. + </para> + </listitem> + </itemizedlist> + <programlisting role="example"><![CDATA[ + s = "<root xmlns:bar=""http://www.scilab.org/"">"+.. + "<bar:a att=""foo"" rib=""bar"">"+.. + "<b>Hello</b><c> world</c></bar:a></root>" + doc = xmlReadStr(s); + first = doc.root.children(1); + b = first.children(1); + // "new_attribute"という名前の属性を新規に追加 + first.attributes.new_attribute = "value"; + // firstの子の名前空間を表示 + first.namespace + // ノードの内容を表示 + first.content + // bは親を有します + b.parent + // firstに子を追加できます. + first.children(3) = b + // 整数でない添字により挿入を行えます. + first.children(1.5) = "<d> Scilab</d>" + // firstの子が上の行で定義されています... + b.line + xmlDump(first) + xmlDelete(doc); + ]]></programlisting> + </para> + </refsection> + <refsection id="XMLAttributes"> + <title>XML属性</title> + <para> + XML属性は,属性の名前を属性の値にマップするハッシュテーブルの一種です. + 属性の値は,このオブジェクトのフィールドとして属性の名前,または + 1から属性の大きさまでの添字番号によりアクセスや修正が可能です. + </para> + <programlisting role="example"><![CDATA[ + s = "<root xmlns:bar=""http://www.scilab.org/"">"+.. + "<bar:a att=""foo"" rib=""bar"">"+.. + "<b>Hello</b><c> world</c></bar:a></root>" + doc = xmlReadStr(s); + first = doc.root.children(1); + // 属性を読み込みます + first.attributes.att + // 空の属性を設定します + first.attributes.att = ""; + // 新しい属性を追加します + first.attributes.hello = "world"; + // 添字を使用します + first.attributes(1) = "Bonjour"; + first.attributes(1) + xmlDump(first) + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection id="XMLNamespace"> + <title>XML名前空間</title> + <para>XML名前空間は以下の2つのプロパティを有します: href および prefix + <itemizedlist> + <listitem> + <para> + <emphasis role="bold">href</emphasis>: 名前空間hrefを表す文字列; + </para> + </listitem> + <listitem> + <para> + <emphasis role="bold">prefix</emphasis>: + この名前空間で使用する接頭辞を表す文字列. + </para> + </listitem> + </itemizedlist> + </para> + <programlisting role="example"><![CDATA[ + s = "<root xmlns:bar=""http://www.scilab.org/"">"+.. + "<bar:a att=""foo"" rib=""bar"">"+.. + "<b>Hello</b><c> world</c></bar:a></root>" + doc = xmlReadStr(s); + ns = doc.root.children(1).namespace; + ns.href + ns.prefix + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection id="XMLNodeList"> + <title>XMLノードリスト</title> + <para> + XMLノードリストはある要素の子に番号を付ける際に使用される + 型です.各要素は整数の添字によりアクセスできます. + これはリストであるため,doubleの添字により, + 新しい要素をこのリストに挿入することができます. + </para> + <para> + リストの大きさは,'size'フィールドにより取得できます. + </para> + <para> + リストの各ノードの名前または内容は'name'または'content'フィールド + により取得できます. + </para> + <programlisting role="example"><![CDATA[ + doc = xmlReadStr("<root><a>Hello</a><b> world</b></root>"); + c = doc.root.children; + // 2つの要素があることが確認できます + c.size + // 最初の要素を読み込みます + xmlDump(c(1)) + // 特定の要素を他の要素で置換します + c(1) = "<c>Hello</c>" + // 新しい要素を最初の要素と二番目の要素の間に挿入します + c(1.5) = "<d> Scilab</d>" // 1.5 or 1.234... + // 新しい要素を末尾またはリストの先頭に挿入します + c(0) = "<e>Head </e>" + c(217) = "<f> Tail</f>" + xmlDump(c) + // ノードの名前を取得します + c.name + // ノードの内容を取得します + c.content + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection id="XMLNodeSet"> + <title>XML XPath結果セット</title> + <para> + XMLノードセットは,XPathクエリから返されたオブジェクトです. + 新しい要素を挿入したり,既存の要素を置換することはできません. + できることは整数の添字により要素を取得することのみです. + </para> + <para> + このセットの大きさは'size'フィールドにより取得できます. + </para> + <programlisting role="example"><![CDATA[ + doc = xmlReadStr("<root><a><b>Hello</b></a><a>World</a></root>"); + s = xmlXPath(doc, "//a") + s.size + s(1).content + s(2).content + // または ... + s.content + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection id="XMLValid"> + <title>XML検証ファイル</title> + <para>XML検証ファイルは文書の検証に使用されるオブジェクトです. + DTD, Relax NGまたは schemaにより検証できます. + </para> + <programlisting role="example"><![CDATA[ + doc = xmlRead("SCI/modules/xml/tests/unit_tests/library.xml"); + dtd = xmlDTD("SCI/modules/xml/tests/unit_tests/library.dtd"); + schema = xmlSchema("SCI/modules/xml/tests/unit_tests/library.xsd"); + rng = xmlRelaxNG("SCI/modules/xml/tests/unit_tests/library.rng"); + // 検証 + xmlValidate(doc, dtd); + xmlValidate(doc, rng); + xmlValidate(doc, schema); + xmlDelete("all"); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="xmlRead">xmlRead</link> + </member> + <member> + <link linkend="xmlReadStr">xmlReadStr</link> + </member> + <member> + <link linkend="xmlElement">xmlElement</link> + </member> + <member> + <link linkend="xmlDocument">xmlDocument</link> + </member> + <member> + <link linkend="xmlNs">xmlNs</link> + </member> + <member> + <link linkend="xmlDTD">xmlDTD</link> + </member> + <member> + <link linkend="xmlSchema">xmlSchema</link> + </member> + <member> + <link linkend="xmlRelaxNG">xmlRelaxNG</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XMLモジュールが導入されました.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/addchapter.sce b/modules/xml/help/ja_JP/addchapter.sce new file mode 100755 index 000000000..4cbcddc17 --- /dev/null +++ b/modules/xml/help/ja_JP/addchapter.sce @@ -0,0 +1,10 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +add_help_chapter("XML Management",SCI+"/modules/xml/help/ja_JP",%T); diff --git a/modules/xml/help/ja_JP/htmlDump.xml b/modules/xml/help/ja_JP/htmlDump.xml new file mode 100755 index 000000000..27c5310cd --- /dev/null +++ b/modules/xml/help/ja_JP/htmlDump.xml @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2013 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="htmlDump" xml:lang="ja"> + <refnamediv> + <refname>htmlDump</refname> + <refpurpose>HTML文書をダンプ</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis> + str = htmlDump(xmlDoc [, indent]) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>xmlDoc</term> + <listitem> + <para>xmlDoc, XML文書</para> + </listitem> + </varlistentry> + <varlistentry> + <term>indent</term> + <listitem> + <para>indent, 論理値</para> + </listitem> + </varlistentry> + <varlistentry> + <term>str</term> + <listitem> + <para>str, 文字列の行列</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para>HTML文書をダンプします. indentがfalseの場合 (デフォルト値: true), インデントは行われず, 復改が追加されます.</para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ + doc = htmlReadStr(["<!DOCTYPE html PUBLIC ""-//W3C//DTD HTML 4.01//EN"""; + """http://www.w3.org/TR/html4/strict.dtd"">"; + "<html lang=""en"">"; + " <head>"; + " <meta http-equiv=""content-type"" content=""text/html; charset=utf-8"">"; + " <title>title</title>"; + " <link rel=""stylesheet"" type=""text/css"" href=""style.css"">"; + " <script type=""text/javascript"" src=""script.js""></script>"; + " </head>"; + " <body>"; + " </body>"; + "</html>"]); + // HTML文書をダンプ + htmlDump(doc) + // インデントせずにHTML文書をダンプ + htmlDump(doc, %f) + // 文書に関連するリソースを開放 + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="xmlWrite">htmlWrite</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.5.0</revnumber> + <revremark>HTML機能追加.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/htmlRead.xml b/modules/xml/help/ja_JP/htmlRead.xml new file mode 100755 index 000000000..50191fdd8 --- /dev/null +++ b/modules/xml/help/ja_JP/htmlRead.xml @@ -0,0 +1,110 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="htmlRead" xml:lang="ja"> + <refnamediv> + <refname>htmlRead</refname> + <refpurpose>ローカルまたはリモートファイルからHTMLストリームを読み込む</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis> + doc = htmlRead(path [, encoding]) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>path</term> + <listitem> + <para>文字列, 読み込むファイルのパス.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>encoding</term> + <listitem> + <para>文字列, ファイルエンコーディング.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>doc</term> + <listitem> + <para>XMLDoc型のmlist</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para>HTMLファイルを読込み, パースします. 返される文書により, + メモリ上に保持したDOMツリーにアクセスできます. + </para> + <para>一般に, HTMLファイルは,整形式であることがまれのため, + XMLパーサーにより読み込むことはできません. + このため,HTMLパーサが必要となり,より適合したものになります. + </para> + <para>HTMLファイルが一度パースされると, メモリ上でXMLファイルとして参照でき, + 通常の操作が適用可能になります. + </para> + <para>encoding引数はファイルエンコーディングを明確に + 指定する際に使用されます. + </para> + <para> + (メモリーリークを回避するために)<link linkend="xmlDelete">xmlDelete</link> + によりツリーを解放することはできません. + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ + doc = htmlRead("http://www.scilab.org"); + e = doc.root.children(1).children(1) + e.name + e.content + // 'href'属性を有する全ノードを取得 + q = xmlXPath(doc, "//*[@href]"); + q(1).attributes + // 文書を削除 + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="htmlReadStr">htmlReadStr</link> + </member> + <member> + <link linkend="xmlGetOpenDocs">xmlGetOpenDocs</link> + </member> + <member> + <link linkend="xmlDelete">xmlDelete</link> + </member> + <member> + <link linkend="xmlDocument">xmlDocument</link> + </member> + <member> + <link linkend="xmlXPath">xmlXPath</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.5.0</revnumber> + <revremark>HTML機能が追加されました.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/htmlReadStr.xml b/modules/xml/help/ja_JP/htmlReadStr.xml new file mode 100755 index 000000000..ce357a527 --- /dev/null +++ b/modules/xml/help/ja_JP/htmlReadStr.xml @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="htmlReadStr" xml:lang="ja"> + <refnamediv> + <refname>htmlReadStr</refname> + <refpurpose>文字列からHTMLツリーを読み込む</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis> + doc = htmlReadStr(string) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>string</term> + <listitem> + <para>文字列, XMLコードを保持.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>doc</term> + <listitem> + <para>XMLDoc型のmlist</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + HTML文字列を読み込んでパースします. + 返される文書によりメモリ上に保持したDOMツリーにアクセスできます. + </para> + <para> + 重要なことですが, + 関数<link linkend="xmlDelete">xmlDelete</link>により + (メモリリークを回避するために)ツリーを開放する必要があります. + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ + doc = htmlReadStr(["<!DOCTYPE html PUBLIC ""-//W3C//DTD HTML 4.01//EN"""; + """http://www.w3.org/TR/html4/strict.dtd"">"; + "<html lang=""en"">"; + " <head>"; + " <meta http-equiv=""content-type"" content=""text/html; charset=utf-8"">"; + " <title>title</title>"; + " <link rel=""stylesheet"" type=""text/css"" href=""style.css"">"; + " <script type=""text/javascript"" src=""script.js""></script>"; + " </head>"; + " <body>"; + " </body>"; + "</html>"]); + // HTML文書をダンプ + htmlDump(doc) + // 文書に関連するリソースを開放 + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="htmlRead">htmlRead</link> + </member> + <member> + <link linkend="xmlGetOpenDocs">xmlGetOpenDocs</link> + </member> + <member> + <link linkend="xmlDelete">xmlDelete</link> + </member> + <member> + <link linkend="xmlDocument">xmlDocument</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.5.0</revnumber> + <revremark>HTML機能を追加.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/htmlWrite.xml b/modules/xml/help/ja_JP/htmlWrite.xml new file mode 100755 index 000000000..1368bd2dc --- /dev/null +++ b/modules/xml/help/ja_JP/htmlWrite.xml @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="htmlWrite" xml:lang="ja"> + <refnamediv> + <refname>htmlWrite</refname> + <refpurpose>HTML文書をファイルに書き込む</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis> + htmlWrite(doc [, filename] [, indent]) + htmlWrite(doc [, indent]) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>doc</term> + <listitem> + <para>XMLDoc型のmlist</para> + </listitem> + </varlistentry> + <varlistentry> + <term>filename</term> + <listitem> + <para>filename, 文字列</para> + </listitem> + </varlistentry> + <varlistentry> + <term>indent</term> + <listitem> + <para>indent, インデント</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para>HTML文書をファイル名または文書URLを指定したファイルに + 書き込みます. + indentがtrueの場合,文書はインデントされます. + デフォルトでindentはtrueです. + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ + doc = htmlRead("http://www.scilab.org"); + htmlWrite(doc, TMPDIR+"/scilab.html", %f); + // ここで前のファイルを開き, 修正後に保存 + doc1 = htmlRead(TMPDIR+"/scilab.html"); + xp = xmlXPath(doc1, "//title"); + e = xp(1); + e.content = "Hello Scilab World"; + htmlWrite(doc1); + // 修正が行われたことを確認 + doc2 = htmlRead(TMPDIR+"/scilab.html"); + xp = xmlXPath(doc2, "//title"); + xp(1).content + xmlDelete("all"); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="xmlDump">xmlDump</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.5.0</revnumber> + <revremark>HTML機能追加.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/xmlAddNs.xml b/modules/xml/help/ja_JP/xmlAddNs.xml new file mode 100755 index 000000000..ede64b44b --- /dev/null +++ b/modules/xml/help/ja_JP/xmlAddNs.xml @@ -0,0 +1,93 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlAddNs" xml:lang="ja"> + <refnamediv> + <refname>xmlAddNs</refname> + <refpurpose>XML要素に名前空間を追加</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis> + xmlAddNs(elem, [, ns1 [, ns2, ...]]) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>elem</term> + <listitem> + <para>XMLElem型のmlist</para> + </listitem> + </varlistentry> + <varlistentry> + <term>nsi</term> + <listitem> + <para>XMLNs型のmlist</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para>要素に1つ以上の名前空間を追加します.</para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ + doc = xmlDocument("TMPDIR/foo.xml"); + doc.root = xmlElement(doc, "root"); + a = xmlElement(doc, "a"); + b = xmlElement(doc, "b"); + ns_scilab = xmlNs(a, "scilab", "http://www.scilab.org"); + ns_balics = xmlNs(a, "balics", "http://gro.balics.www"); + xmlAddNs(b, ns_scilab, ns_balics); + doc.root.children(1) = a; + doc.root.children(2) = b; + xmlDump(doc) + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="XMLObjects">XML Objects</link> + </member> + <member> + <link linkend="xmlDocument">xmlDocument</link> + </member> + <member> + <link linkend="xmlElement">xmlElement</link> + </member> + <member> + <link linkend="xmlNs">xmlNs</link> + </member> + <member> + <link linkend="xmlGetNsByHref">xmlGetNsByHref</link> + </member> + <member> + <link linkend="xmlGetNsByPrefix">xmlGetNsByPrefix</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XMLモジュールが導入されました.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/xmlAppend.xml b/modules/xml/help/ja_JP/xmlAppend.xml new file mode 100755 index 000000000..c764b7831 --- /dev/null +++ b/modules/xml/help/ja_JP/xmlAppend.xml @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlAppend" xml:lang="ja"> + <refnamediv> + <refname>xmlAppend</refname> + <refpurpose>子要素を親に追加する</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼出し手順</title> + <synopsis> + xmlAppend(parent, child) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>parent</term> + <listitem> + <para>XMLElem型のmlist</para> + </listitem> + </varlistentry> + <varlistentry> + <term>child</term> + <listitem> + <para>XMLElem型のmlist</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para>他の要素の子として要素を追加します.</para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ + doc = xmlDocument(); + root = xmlElement(doc, "root"); + doc.root = root; + for i=1:5 + xmlAppend(doc.root, xmlElement(doc, "child_" + string(i))); + end; + xmlDump(doc) + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="XMLObjects">XML Objects</link> + </member> + <member> + <link linkend="xmlElement">xmlElement</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.4.1</revnumber> + <revremark>XMLモジュールが更新されました.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/xmlAsNumber.xml b/modules/xml/help/ja_JP/xmlAsNumber.xml new file mode 100755 index 000000000..2512615d9 --- /dev/null +++ b/modules/xml/help/ja_JP/xmlAsNumber.xml @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlAsNumber" xml:lang="ja"> + <refnamediv> + <refname>xmlAsNumber</refname> + <refpurpose>XPathクエリの結果を数値の行に変換</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis> + nums = xmlAsNumber(xp) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>xp</term> + <listitem> + <para>xp, XMLSet または XMLList型のXML mlist</para> + </listitem> + </varlistentry> + <varlistentry> + <term>nums</term> + <listitem> + <para>nums, doubleの行</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + XPathクエリの結果またはノードの子は,数値を有するXMLElementsの集合とする + ことができます. + この関数の用途は,この際,各ノードの内容をdoubleに変換することです. + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ + doc = xmlReadStr("<root><a>12</a><a>13</a><a>1.2345678</a><a>45e3</a><a>.23E-2</a></root>"); + // 名前が "a" に等しいノードの内容を取得 + xp = xmlXPath(doc, "//a/text()"); + // 結果をdoubleに変換 + data = xmlAsNumber(xp) + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="xmlXPath">xmlXPath</link> + </member> + <member> + <link linkend="xmlAsText">xmlAsText</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XMLモジュールが導入されました.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/xmlAsText.xml b/modules/xml/help/ja_JP/xmlAsText.xml new file mode 100755 index 000000000..177d72055 --- /dev/null +++ b/modules/xml/help/ja_JP/xmlAsText.xml @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlAsText" xml:lang="ja"> + <refnamediv> + <refname>xmlAsText</refname> + <refpurpose>XPathクエリの結果を文字列の行に変換</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis> + strings = xmlAsText(xp) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>xp</term> + <listitem> + <para>xp, XMLSet または XMLList型のXML mlist</para> + </listitem> + </varlistentry> + <varlistentry> + <term>strings</term> + <listitem> + <para>strings, 文字列の行</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + XPathクエリの結果またはノードの子は,文字列を有するXMLElementsの集合とする + ことができます. + この関数の用途は,この際,各ノードの内容を文字列に変換することです. + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ + doc = xmlReadStr("<root><a>Hello</a><a>Scilab</a><a>World</a></root>"); + // 名前が "a" に等しいノードの内容を取得 + xp = xmlXPath(doc, "//a/text()"); + // 結果を文字列に変換 + data = xmlAsText(xp) + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="xmlXPath">xmlXPath</link> + </member> + <member> + <link linkend="xmlAsNumber">xmlAsNumber</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XMLモジュールが導入されました.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/xmlDTD.xml b/modules/xml/help/ja_JP/xmlDTD.xml new file mode 100755 index 000000000..6c2c26bbd --- /dev/null +++ b/modules/xml/help/ja_JP/xmlDTD.xml @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlDTD" xml:lang="ja"> + <refnamediv> + <refname>xmlDTD</refname> + <refpurpose>XML DTDオブジェクトを作成</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis> + dtd = xmlDTD(path) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>path</term> + <listitem> + <para>有効なファイルのパスを指定する文字列</para> + </listitem> + </varlistentry> + <varlistentry> + <term>dtd</term> + <listitem> + <para>XMLValid型のmlist</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para>文書をDTDで検証する際に有用です.</para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ + doc = xmlRead("SCI/modules/xml/tests/unit_tests/library.xml"); + dtd = xmlDTD("SCI/modules/xml/tests/unit_tests/library.dtd"); + // 文書が有効かどうかを確認します + // エラーが発生しない場合は有効です + xmlValidate(doc, dtd); + xmlDelete(doc, dtd); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="xmlValidate">xmlValidate</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XMLモジュールが導入されました.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/xmlDelete.xml b/modules/xml/help/ja_JP/xmlDelete.xml new file mode 100755 index 000000000..5cfbc6633 --- /dev/null +++ b/modules/xml/help/ja_JP/xmlDelete.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlDelete" xml:lang="ja"> + <refnamediv> + <refname>xmlDelete</refname> + <refpurpose>XML文書を削除</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis> + xmlDelete(obj1 [, obj2, [...]]) + xmlDelete("all") + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>obji</term> + <listitem> + <para>XMLDoc または XMLValid型のmlist, 削除する文書</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + 文書または検証ファイルを削除します(この処理により,オブジェクトに関連する + 全てのメモリを開放します). + </para> + <para> + xmlDelete("all") 構文が使用された場合,オープンされている文書が + 全て削除されます. + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ + doc = xmlRead("http://www.w3.org/TR/2009/REC-xml-names-20091208/xml-names-10-3e.xml"); + root = doc.root + xmlDelete(doc); + // ルートは有効ではなくなりました.. したがって,ルートにアクセスすると + // エラーを発生します. + // disp(root) => これは失敗します + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="xmlGetOpenDocs">xmlGetOpenDocs</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XMLモジュールが導入されました.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/xmlDocument.xml b/modules/xml/help/ja_JP/xmlDocument.xml new file mode 100755 index 000000000..0a4d4f4ca --- /dev/null +++ b/modules/xml/help/ja_JP/xmlDocument.xml @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlDocument" xml:lang="ja"> + <refnamediv> + <refname>xmlDocument</refname> + <refpurpose>XML文書を新規に作成</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis> + doc = xmlDocument([uri, [, version]]) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>uri</term> + <listitem> + <para>文書のuriを指定する文字列</para> + </listitem> + </varlistentry> + <varlistentry> + <term>version</term> + <listitem> + <para>文書のXMLバージョンを指定する文字列</para> + </listitem> + </varlistentry> + <varlistentry> + <term>doc</term> + <listitem> + <para>XMLDoc型のmlist</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para>XML文書を新規に作成します.</para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ + doc = xmlDocument("TMPDIR/foo.xml"); + root = xmlElement(doc, "root"); + root.attributes.attr = "value"; + root.children(1) = "<a>hello</a>"; + root.children(2) = xmlElement(doc, "b"); + root.children(2).attributes.id = "123"; + root.children(2).content = " world"; + doc.root = root; + xmlDump(doc) + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="XMLObjects">XML Objects</link> + </member> + <member> + <link linkend="xmlElement">xmlElement</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XMLモジュールが導入されました.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/xmlDump.xml b/modules/xml/help/ja_JP/xmlDump.xml new file mode 100755 index 000000000..763e18cfc --- /dev/null +++ b/modules/xml/help/ja_JP/xmlDump.xml @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlDump" xml:lang="ja"> + <refnamediv> + <refname>xmlDump</refname> + <refpurpose>XMLオブジェクトをダンプする</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis> + str = xmlDump(xmlObj [, indent]) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>xmlObj</term> + <listitem> + <para>xmlObj, XML mlist</para> + </listitem> + </varlistentry> + <varlistentry> + <term>indent</term> + <listitem> + <para>indent, 論理値</para> + </listitem> + </varlistentry> + <varlistentry> + <term>str</term> + <listitem> + <para>str, 文字列の行列</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + XMLオブジェクトをダンプします. + ダンプ可能なオブジェクトは XMLDoc, XMLElement または XMLListです. + indentがfalseの場合(デフォルトではtrue),インデント及び復改記号は + 追加されません. + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ + doc = xmlReadStr("<root><a att=""foo"" rib=""bar""><b>Hello</b></a></root>"); + // 文書をダンプ + xmlDump(doc) + // インデントなしに文書をダンプ + xmlDump(doc, %f) + // ノードリストをダンプ + xmlDump(doc.root.children) + //要素をダンプ + xmlDump(doc.root.children(1)) + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="xmlWrite">xmlWrite</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XMLモジュールが導入されました.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/xmlElement.xml b/modules/xml/help/ja_JP/xmlElement.xml new file mode 100755 index 000000000..970ff4564 --- /dev/null +++ b/modules/xml/help/ja_JP/xmlElement.xml @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlElement" xml:lang="ja"> + <refnamediv> + <refname>xmlElement</refname> + <refpurpose>XML要素を新規に作成する</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis> + e = xmlElement(doc, name) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>doc</term> + <listitem> + <para>XMLDoc型のmlist</para> + </listitem> + </varlistentry> + <varlistentry> + <term>name</term> + <listitem> + <para>要素名を指定する文字列</para> + </listitem> + </varlistentry> + <varlistentry> + <term>e</term> + <listitem> + <para>XMLElem型のmlist</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para>指定した名前を有するXML要素を新たに作成します.</para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = xmlReadStr("<root><a>Hello</a><b> world</b></root>"); + e = xmlElement(doc, "c"); + e.attributes.attr = "value"; + e.content = "!"; + doc.root.children(3) = e; + xmlDump(doc) + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="XMLObjects">XML Objects</link> + </member> + <member> + <link linkend="xmlDocument">xmlDocument</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XMLモジュールが導入されました.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/xmlFormat.xml b/modules/xml/help/ja_JP/xmlFormat.xml new file mode 100755 index 000000000..0d7e5845a --- /dev/null +++ b/modules/xml/help/ja_JP/xmlFormat.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlFormat" xml:lang="ja"> + <refnamediv> + <refname>xmlFormat</refname> + <refpurpose>Scilab変数をXMLに整形する</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis> + xmlCode = xmlFormat(scilabVar) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>scilabVar</term> + <listitem> + <para>scilabVar, Scilab変数</para> + </listitem> + </varlistentry> + <varlistentry> + <term>xmlCode</term> + <listitem> + <para>xmlCode, XMLコードを含む文字列</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + この関数は単独ではなにもしません! 有用なことを行うにはオーバーロードされる + 必要があります. + </para> + <para> + Scilab変数をXMLツリーに変換する際に使用されます. + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ + doc = xmlReadStr("<root><a att=""foo"" rib=""bar""><b>Hello</b></a></root>"); + // このコードは失敗します: + // doc.root.children(1.5) = 1.23456; + // ここで, double型を処理するために %s_xmlFormat を定義します + // この例ではdouble行列は処理されないことに注意してください + function y=%s_xmlFormat(x), y="<number>" + string(x) + "</number>", endfunction; + // 数値の挿入を再試行 + doc.root.children(1.5) = 1.23456; + xmlDump(doc) + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XMLモジュールが導入されました.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/xmlGetNsByHref.xml b/modules/xml/help/ja_JP/xmlGetNsByHref.xml new file mode 100755 index 000000000..8190128d4 --- /dev/null +++ b/modules/xml/help/ja_JP/xmlGetNsByHref.xml @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlGetNsByHref" xml:lang="ja"> + <refnamediv> + <refname>xmlGetNsByHref</refname> + <refpurpose>名前名前をhrefにより取得する</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis> + ns = xmlGetNsByHref(elem, href) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>elem</term> + <listitem> + <para>XMLElem型のmlist</para> + </listitem> + </varlistentry> + <varlistentry> + <term>href</term> + <listitem> + <para>hrefを指定する文字列</para> + </listitem> + </varlistentry> + <varlistentry> + <term>ns</term> + <listitem> + <para>XMLNs型のmlist</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + 要素またはアクセサ上で指定したhrefを有する名前空間を探します. + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ + s = "<root><a xmlns:scilab=""http://www.scilab.org"">"+.. + "<b>Hello </b><scilab:c>World</scilab:c></a></root>" + doc = xmlReadStr(s) + c = doc.root.children(1).children(2); + xmlGetNsByHref(c, "http://www.scilab.org") + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="xmlNs">xmlNs</link> + </member> + <member> + <link linkend="xmlGetNsByPrefix">xmlGetNsByPrefix</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XMLモジュールが導入されました.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/xmlGetNsByPrefix.xml b/modules/xml/help/ja_JP/xmlGetNsByPrefix.xml new file mode 100755 index 000000000..1c0e6ce4d --- /dev/null +++ b/modules/xml/help/ja_JP/xmlGetNsByPrefix.xml @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlGetNsByPrefix" xml:lang="ja"> + <refnamediv> + <refname>xmlGetNsByPrefix</refname> + <refpurpose>接頭辞により名前空間を取得する</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis> + ns = xmlGetNsByPrefix(elem, prefix) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>elem</term> + <listitem> + <para>XMLElem型のmlist</para> + </listitem> + </varlistentry> + <varlistentry> + <term>prefix</term> + <listitem> + <para>接頭辞を指定する文字列</para> + </listitem> + </varlistentry> + <varlistentry> + <term>ns</term> + <listitem> + <para>XMLNs型のmlist</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + 要素またはそのアクセサ上で指定した接頭辞を有する名前空間を探します. + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ + s = "<root><a xmlns:scilab=""http://www.scilab.org"">"+.. + "<b>Hello </b><scilab:c>World</scilab:c></a></root>" + doc = xmlReadStr(s) + c = doc.root.children(1).children(2); + xmlGetNsByPrefix(c, "scilab") + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="xmlNs">xmlNs</link> + </member> + <member> + <link linkend="xmlGetNsByHref">xmlGetNsByHref</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XMLモジュールが導入されました.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/xmlGetOpenDocs.xml b/modules/xml/help/ja_JP/xmlGetOpenDocs.xml new file mode 100755 index 000000000..ede50a0ff --- /dev/null +++ b/modules/xml/help/ja_JP/xmlGetOpenDocs.xml @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlGetOpenDocs" xml:lang="ja"> + <refnamediv> + <refname>xmlGetOpenDocs</refname> + <refpurpose>オープンされたXML文書またはXML検証ファイルを全て取得する. + </refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis> + list = xmlGetOpenDocs() + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>list</term> + <listitem> + <para>list, + オープンされた全てのXML文書またはXML検証ファイルを含むリスト + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para>This function is useful to delete open documents (and essentially to free the memory).</para> + </refsection> + <refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + doc = xmlRead("http://www.w3.org/TR/2009/REC-xml-names-20091208/xml-names-10-3e.xml"); + doc = xmlReadStr("<root><a att=""foo"" rib=""bar""><b>Hello</b></a></root>"); + l = xmlGetOpenDocs() + xmlDelete("all"); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="xmlDelete">xmlDelete</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XMLモジュールが導入されました.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/xmlIsValidObject.xml b/modules/xml/help/ja_JP/xmlIsValidObject.xml new file mode 100755 index 000000000..1966a1740 --- /dev/null +++ b/modules/xml/help/ja_JP/xmlIsValidObject.xml @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlIsValidObject" xml:lang="ja"> + <refnamediv> + <refname>xmlIsValidObject</refname> + <refpurpose>XMLオブジェクトの存在を調べる</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis> + exists = xmlIsValidObject(obj) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>obj</term> + <listitem> + <para>XMLオブジェクトまたは変数名を含む文字列の行列</para> + </listitem> + </varlistentry> + <varlistentry> + <term>exists</term> + <listitem> + <para> + XMLオブジェクトが存在するかどうかを示す + 論理値または論理値の行列 + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + XML文書が削除された際,付随するオブジェクトは全て破棄されますが, + Scilab側ではこのオブジェクトが生存し続けます. + このため,この関数はScilab側であるオブジェクトが有効かどうかを + 知るために有用です. + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ + doc = xmlRead("http://www.w3.org/TR/2009/REC-xml-names-20091208/xml-names-10-3e.xml"); + r = doc.root + // %Tを返します + xmlIsValidObject(r) + // 文書を削除 + xmlDelete(doc); + // [%F %F]を返します + xmlIsValidObject(["doc" "r"]) + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="XMLObjects">XML Objects</link> + </member> + <member> + <link linkend="xmlDelete">xmlDelete</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XMLモジュールが導入されました.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/xmlName.xml b/modules/xml/help/ja_JP/xmlName.xml new file mode 100755 index 000000000..ffb921ce4 --- /dev/null +++ b/modules/xml/help/ja_JP/xmlName.xml @@ -0,0 +1,85 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlName" xml:lang="ja"> + <refnamediv> + <refname>xmlName</refname> + <refpurpose>要素名を取得する.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼出し手順</title> + <synopsis> + names = xmlName(obj) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>obj</term> + <listitem> + <para>obj, XMLSet,XMLList,XMLElemまたはXMLAttr型の + XML mlist + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>name</term> + <listitem> + <para>名前, 1行分の文字列</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + XMLObjectを構成する要素の名前を取得します. + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ +doc = xmlReadStr("<root><foo a=""123"" b=""456"" c=""789""/></root>") +// 単一の要素の名前を取得 +xmlName(doc.root.children(1)) +// 属性のリストの名前を取得 +xmlName(doc.root.children(1).attributes) +// XPathクエリの結果の名前を取得 +xmlName(xmlXPath(doc,"//foo/@*")) +xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="xmlXPath">xmlXPath</link> + </member> + <member> + <link linkend="xmlAsText">xmlAsText</link> + </member> + <member> + <link linkend="xmlAsNumber">xmlAsNumber</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.4.1</revnumber> + <revremark>xmlName関数が導入されました.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/xmlNs.xml b/modules/xml/help/ja_JP/xmlNs.xml new file mode 100755 index 000000000..d161f8f8f --- /dev/null +++ b/modules/xml/help/ja_JP/xmlNs.xml @@ -0,0 +1,98 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlNs" xml:lang="ja"> + <refnamediv> + <refname>xmlNs</refname> + <refpurpose>XML名前空間を新規に作成する</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis> + ns = xmlNs(elem, prefix, href) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>elem</term> + <listitem> + <para>XMLElem型のmlist</para> + </listitem> + </varlistentry> + <varlistentry> + <term>prefix</term> + <listitem> + <para>この名前空間の接頭辞を指定する文字列</para> + </listitem> + </varlistentry> + <varlistentry> + <term>href</term> + <listitem> + <para>この名前空間のhrefを指定する文字列</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + あるXML要素に関連するXML名前空間を新たに作成します. + 作成された名前空間はその要素またはその子要素で使用できます. + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ + doc = xmlDocument("TMPDIR/foo.xml"); + doc.root = xmlElement(doc, "root"); + ns = xmlNs(doc.root, "scilab", "http://www.scilab.org"); + doc.root.children(1) = "<a>hello</a>"; + doc.root.children(1).namespace = ns; + xmlDump(doc) + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="XMLObjects">XML Objects</link> + </member> + <member> + <link linkend="xmlDocument">xmlDocument</link> + </member> + <member> + <link linkend="xmlElement">xmlElement</link> + </member> + <member> + <link linkend="xmlAddNs">xmlAddNs</link> + </member> + <member> + <link linkend="xmlGetNsByHref">xmlGetNsByHref</link> + </member> + <member> + <link linkend="xmlGetNsByPrefix">xmlGetNsByPrefix</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XMLモジュールが導入されました.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/xmlRead.xml b/modules/xml/help/ja_JP/xmlRead.xml new file mode 100755 index 000000000..e509152ab --- /dev/null +++ b/modules/xml/help/ja_JP/xmlRead.xml @@ -0,0 +1,110 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlRead" xml:lang="ja"> + <refnamediv> + <refname>xmlRead</refname> + <refpurpose>ローカルまたはリモートファイルからXMLストリームを読み込む</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis> + doc = xmlRead(path [, validateDTD]) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>path</term> + <listitem> + <para>文字列, 読み込むファイルのパス.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>validateDTD</term> + <listitem> + <para>文書を検証するべきかどうかを示す論理値.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>doc</term> + <listitem> + <para>XMLDoc型のmlist</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + XMLファイルを読み込んでパースします. + 返される文書によりメモリに保持されるDOMツリーにアクセス可能です. + </para> + <para> + validateDTDにtrueが指定された場合, + 文書は検証され,失敗するとパース処理は行われません. + </para> + <para> + (メモリリークを避けるために) + <link linkend="xmlDelete">xmlDelete</link>関数により + ツリーを開放する必要があることに注意してください. + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ + doc = xmlRead("http://www.w3.org/TR/2009/REC-xml-names-20091208/xml-names-10-3e.xml"); + e = doc.root.children(1).children(1) + e.name + e.content + xmlDump(e) + // 'href'属性を有するノードを全て取得できます + q = xmlXPath(doc, "//*[@href]"); + q(1).attributes.href + // 文書を削除します + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="xmlReadStr">xmlReadStr</link> + </member> + <member> + <link linkend="xmlGetOpenDocs">xmlGetOpenDocs</link> + </member> + <member> + <link linkend="xmlDelete">xmlDelete</link> + </member> + <member> + <link linkend="xmlDocument">xmlDocument</link> + </member> + <member> + <link linkend="xmlXPath">xmlXPath</link> + </member> + <member> + <link linkend="xmlValidate">xmlValidate</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XMLモジュールが導入されました.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/xmlReadStr.xml b/modules/xml/help/ja_JP/xmlReadStr.xml new file mode 100755 index 000000000..1f19b9497 --- /dev/null +++ b/modules/xml/help/ja_JP/xmlReadStr.xml @@ -0,0 +1,109 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlReadStr" xml:lang="ja"> + <refnamediv> + <refname>xmlReadStr</refname> + <refpurpose>文字列からXMLツリーを読み込む</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis> + doc = xmlReadStr(string [, validateDTD]) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>string</term> + <listitem> + <para>XMLコードを含む文字列.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>validateDTD</term> + <listitem> + <para>文書を検証する必要があるかどうかを示す論理値.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>doc</term> + <listitem> + <para>XMLDoc型のmlist</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + XML文字列を読み込んでパースします. + 返された文書によりメモリに保持されるDOMツリーにアクセスできます. + </para> + <para>validateDTDにtrueが指定された場合, + 文書は検証され,失敗するとパース処理は行われません. + </para> + <para> + (メモリリークを避けるために) + <link linkend="xmlDelete">xmlDelete</link>関数により + ツリーを開放する必要があることに注意してください. + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ + doc = xmlReadStr("<root><a att=""foo"" rib=""bar""><b>Hello</b></a></root>"); + e = doc.root.children(1).children(1) + e.name + e.content + xmlDump(e) + doc.root.children(1).attributes.att + doc.root.children(1).attributes.rib + // 属性を修正 + doc.root.children(1).attributes.att = "truc" + doc.root.children(1).attributes.rib = "machin" + xmlDump(doc.root.children(1)) + // 文書を削除します + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="xmlRead">xmlRead</link> + </member> + <member> + <link linkend="xmlGetOpenDocs">xmlGetOpenDocs</link> + </member> + <member> + <link linkend="xmlDelete">xmlDelete</link> + </member> + <member> + <link linkend="xmlDocument">xmlDocument</link> + </member> + <member> + <link linkend="xmlValidate">xmlValidate</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XMLモジュールが導入されました.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/xmlRelaxNG.xml b/modules/xml/help/ja_JP/xmlRelaxNG.xml new file mode 100755 index 000000000..259f500cb --- /dev/null +++ b/modules/xml/help/ja_JP/xmlRelaxNG.xml @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlRelaxNG" xml:lang="ja"> + <refnamediv> + <refname>xmlRelaxNG</refname> + <refpurpose>XML Relax NGオブジェクトを作成する</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis> + schema = xmlRelaxNG(path) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>path</term> + <listitem> + <para>検証ファイルのパスを指定する文字列</para> + </listitem> + </varlistentry> + <varlistentry> + <term>dtd</term> + <listitem> + <para>XMLValid型のmlist</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para>Relax NGで文書を検証する際に有用です.</para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ + doc = xmlRead("SCI/modules/xml/tests/unit_tests/library.xml"); + rng = xmlRelaxNG("SCI/modules/xml/tests/unit_tests/library.rng"); + // 文書が有効かどうかを調べます + // エラーが発生しない場合,ファイルは有効です + xmlValidate(doc, rng); + xmlDelete(doc, rng); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="xmlValidate">xmlValidate</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XMLモジュールが導入されました.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/xmlRemove.xml b/modules/xml/help/ja_JP/xmlRemove.xml new file mode 100755 index 000000000..73a71f527 --- /dev/null +++ b/modules/xml/help/ja_JP/xmlRemove.xml @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlRemove" xml:lang="ja"> + <refnamediv> + <refname>xmlRemove</refname> + <refpurpose>要素または要素のリストを親から削除する</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis> + xmlRemove(elems) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>elems</term> + <listitem> + <para>elems, XMLElem または XMLSet (XPathクエリの結果) + またはXMLlist (子のリスト) + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + 親から一つまたは複数の要素を分離します. + 分離された要素は無条件に失われます. + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ + doc = xmlReadStr("<root><a>Hello</a><b>Scilab</b><a>World</a></root>"); + // <a>を全て削除 + xp = xmlXPath(doc, "//a"); + xmlRemove(xp); + xmlDump(doc) + xmlDelete(doc); + // 最初の要素を削除 + doc = xmlReadStr("<root><a>Hello</a><b>Scilab</b><a>World</a></root>"); + xmlRemove(doc.root.children(1)); + xmlDump(doc) + // ルートの子を全て削除 + xmlRemove(doc.root.children); + xmlDump(doc) + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="XMLObjects">XMLObjects</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XMLモジュールが導入されました.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/xmlSchema.xml b/modules/xml/help/ja_JP/xmlSchema.xml new file mode 100755 index 000000000..9c0996b76 --- /dev/null +++ b/modules/xml/help/ja_JP/xmlSchema.xml @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlSchema" xml:lang="ja"> + <refnamediv> + <refname>xmlSchema</refname> + <refpurpose>XMLスキーマオブジェクトを作成する</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis> + schema = xmlSchema(path) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>path</term> + <listitem> + <para>検証ファイルのパスを指定する文字列</para> + </listitem> + </varlistentry> + <varlistentry> + <term>dtd</term> + <listitem> + <para>XMLValid型のmlist</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para>スキーマで文書を検証する際に有用です.</para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ + doc = xmlRead("SCI/modules/xml/tests/unit_tests/library.xml"); + schema = xmlSchema("SCI/modules/xml/tests/unit_tests/library.xsd"); + // 文書が有効かどうかを調べます + // エラーがない場合,ファイルは有効です + xmlValidate(doc, schema); + xmlDelete(doc, schema); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="xmlValidate">xmlValidate</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XMLモジュールが導入されました.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/xmlSetAttributes.xml b/modules/xml/help/ja_JP/xmlSetAttributes.xml new file mode 100755 index 000000000..ab1912e93 --- /dev/null +++ b/modules/xml/help/ja_JP/xmlSetAttributes.xml @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlSetAttributes" xml:lang="ja"> + <refnamediv> + <refname>xmlSetAttributes</refname> + <refpurpose>属性の名前と値を設定する.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis> + xmlObj = xmlSetAttributes(xmlObj, nameValue) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>xmlObj</term> + <listitem> + <para> + xmlObj, XMLSet または XMLList または XMLElem または XMLAttr型 + のXML mlist + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>nameValue</term> + <listitem> + <para>nameValue, + [name value] または [prefix name value]を各行に含む + 文字列の n x 2 または n x 3 行列 + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para>要素または要素のリストの属性を設定します.</para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ + doc = xmlReadStr("<root><a><b><c></c></b></a><b></b></root>"); + // 全てのノードを取得します + xp = xmlXPath(doc, "//*"); + // 属性 hello="world" および bonjour="monde" を全ノードに追加します + xmlSetAttributes(xp, ["hello" "world" ; "bonjour" "monde"]); + xmlDump(doc) + // 属性 foo="bar" をルートの最初の子に追加します + xmlSetAttributes(doc.root.children(1), ["foo" "bar"]); + xmlDump(doc) + // 属性 bar="foo" をルートの全ての子に追加します + xmlSetAttributes(doc.root.children, ["bar" "foo"]); + // 属性 truc="machin" を2番目の子<b>の属性のリストに追加します + xmlSetAttributes(doc.root.children(2).attributes, ["truc" "machin"]); + xmlDump(doc) + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="XMLObjects">XMLObjects</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XMLモジュールが導入されました.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/xmlValidate.xml b/modules/xml/help/ja_JP/xmlValidate.xml new file mode 100755 index 000000000..914462e3a --- /dev/null +++ b/modules/xml/help/ja_JP/xmlValidate.xml @@ -0,0 +1,118 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlValidate" xml:lang="ja"> + <refnamediv> + <refname>xmlValidate</refname> + <refpurpose>DTD, Relax NG または Schema により文書を検証する.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis> + error = xmlValidate(docs [, valid]) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>docs</term> + <listitem> + <para>XMLDoc型のmlistまたはXML文書へのパスを有する文字列の行列</para> + </listitem> + </varlistentry> + <varlistentry> + <term>valid</term> + <listitem> + <para>XMLValid型のmlist.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>error</term> + <listitem> + <para>エラーが発生した場合は文字列の行列,そうでない場合は[]</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + パース済みの文書または指定されたパスの一連の文書を + DTD, Relax NG, Schemaで検証します. + 文書が有効な場合は空の行列,そうでない場合は + エラーメッセージを含む文字列の行列が返されます. + </para> + <para> + パスを指定して文書を検証することで性能が改善され,消費メモリが減少します. + </para> + <para> + 現時点では外部DTDで文書を検証することはできません. + これを行う唯一の方法はXMLファイルに + <![CDATA[<!DOCTYPE foo SYSTEM "foo.dtd">]]> のような記述を行い, + xmlValidateを2番目の引数を付けずに使用することです. + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ + doc = xmlRead("SCI/modules/xml/tests/unit_tests/library.xml"); + dtd = xmlDTD("SCI/modules/xml/tests/unit_tests/library.dtd"); + schema = xmlSchema("SCI/modules/xml/tests/unit_tests/library.xsd"); + rng = xmlRelaxNG("SCI/modules/xml/tests/unit_tests/library.rng"); + // 文書が有効かどうかを調べます + // エラーがない場合,ファイルは有効です + // DTD + xmlValidate(doc, dtd); + // Relax NG + xmlValidate(doc, rng); + // Schema + xmlValidate(doc, schema); + // 新規要素に文書が追加されます + doc.root.children(3) = "<a>error</a>" + // ここで検証は失敗します + xmlValidate(doc, dtd); + xmlValidate(doc, rng); + xmlValidate(doc, schema); + // パスを指定して文書を検証できます + xmlValidate("SCI/modules/xml/tests/unit_tests/library.xml") + xmlValidate("SCI/modules/xml/tests/unit_tests/invalid_library.xml") + xmlValidate("SCI/modules/xml/tests/unit_tests/library.xml", schema) + xmlValidate("SCI/modules/xml/tests/unit_tests/invalid_library.xml", rng) + // オープンした文書を全て削除します + xmlDelete(doc, dtd, schema, rng); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="xmlDTD">xmlDTD</link> + </member> + <member> + <link linkend="xmlSchema">xmlSchema</link> + </member> + <member> + <link linkend="xmlRelaxNG">xmlRelaxNG</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XMLモジュールが導入されました.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/xmlWrite.xml b/modules/xml/help/ja_JP/xmlWrite.xml new file mode 100755 index 000000000..0952f8c0f --- /dev/null +++ b/modules/xml/help/ja_JP/xmlWrite.xml @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlWrite" xml:lang="ja"> + <refnamediv> + <refname>xmlWrite</refname> + <refpurpose>XML文書をファイルに書き込む</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis> + xmlWrite(doc [, filename] [, indent]) + xmlWrite(doc [, indent]) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>doc</term> + <listitem> + <para>doc, XMLDoc型のmlist</para> + </listitem> + </varlistentry> + <varlistentry> + <term>filename</term> + <listitem> + <para>filename, 文字列</para> + </listitem> + </varlistentry> + <varlistentry> + <term>indent</term> + <listitem> + <para>indent, 論理値</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + XML文書を指定したファイル名または文書URLを有するファイルに書き込みます. + indentがtrueの場合, + 文書はインデントされます. + デフォルトでindentはtrueです. + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ + doc = xmlReadStr("<root><a att=""foo"" rib=""bar""><b>Hello</b></a></root>"); + xmlWrite(doc, TMPDIR+"/foo.xml", %f); + // 前のファイルをオープンし,修正,保存します + doc1 = xmlRead(TMPDIR+"/foo.xml"); + doc1.root.children(1).name = "newName"; + xmlWrite(doc1); + // 修正が行われたかどうかを調べます + doc2 = xmlRead(TMPDIR+"/foo.xml"); + doc2.root.children(1).name + xmlDelete("all"); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="xmlDump">xmlDump</link> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XMLモジュールが導入されました.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/ja_JP/xmlXPath.xml b/modules/xml/help/ja_JP/xmlXPath.xml new file mode 100755 index 000000000..1e0104df6 --- /dev/null +++ b/modules/xml/help/ja_JP/xmlXPath.xml @@ -0,0 +1,140 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +--> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xmlXPath" xml:lang="ja"> + <refnamediv> + <refname>xmlXPath</refname> + <refpurpose>XML文書にXPathクエリを作成する</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis> + result = xmlXPath(xmlObj, queryStr [, namespaces]) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>引数</title> + <variablelist> + <varlistentry> + <term>xmlObj</term> + <listitem> + <para>XMLDocまたはXMLElem型のXML mlist</para> + </listitem> + </varlistentry> + <varlistentry> + <term>queryStr</term> + <listitem> + <para>Xpathクエリ</para> + </listitem> + </varlistentry> + <varlistentry> + <term>namespaces</term> + <listitem> + <para>オプションの文字列の n x 2行列</para> + </listitem> + </varlistentry> + <varlistentry> + <term>result</term> + <listitem> + <para> + XMLElementsの集合または数値または文字列または論理値 + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para> + 特定の文書中またはある要素で始まるXPathクエリを作成します. + 名前空間を使用する必要がある場合,オプション引数によりこれらを + 定義する必要があります. + XML名前空間は最初のタグにキーワード "xmlns" で定義します. + </para> + <para> + XPathに関する詳細については, <ulink url="http://www.w3.org/TR/1999/REC-xpath-19991116/">W3C recommandation</ulink>を参照ください. + </para> + </refsection> + <refsection> + <title>例</title> + <programlisting role="example"><![CDATA[ + doc = xmlRead("http://www.w3.org/TR/2009/REC-xml-names-20091208/xml-names-10-3e.xml"); + // "note"に名前が等しいノードを取得 + xp = xmlXPath(doc, "//note"); + s = size(xp); + for i=1:s(2) + xmlDump(xp(i)) + end + // 名前が"note"に等しいノードの数を数える + xp = xmlXPath(doc, "count(//note)") + // id="Philosophy"のノードを取得 + xp = xmlXPath(doc, "//*[@id=""Philosophy""]"); + s = size(xp); + if (s(2) <> 0) then + xmlDump(xp(1)) + end + // 属性番号が5に等しいノードを取得 + xp = xmlXPath(doc, "//*[number(@num)=5]"); + s = size(xp); + if (s(2) <> 0) then + xmlDump(xp(1)) + end + // 'emph'という名前のノードの全ての属性の名前と内容を取得 + xp = xmlXPath(doc, "//emph/@*"); + xp.name + xp.content + xmlDelete(doc); + // 名前空間を検索 + t = "<root xmlns:scilab=""http://www.scilab.org"">"+.. + "<scilab:a att=""foo"" rib=""bar""><b>Hello</b></scilab:a></root>" + doc = xmlReadStr(t); + // aという名前の要素を探します + xmlXPath(doc, "//a") // => nothing + xmlXPath(doc, "//scilab:a", ["scilab" "http://www.scilab.org"]) // => OK + // このコードは失敗します: + // xmlXPath(doc, "//scilab:a") // => エラー + xmlDelete(doc); + // 要素で始まるクエリ + t = "<root att=""attribute""><a a1=""A1"" a2=""A2"" a3=""A3"">"+.. + "<b>Hello</b><c>Scilab</c><b>World</b></a><b>Nothing</b></root>" + doc = xmlReadStr(t); + e = doc.root.children(1); + // eの属性を取得 + xp = xmlXPath(e, "@*"); + xmlAsText(xp) + // eから'b'を取得 + xp = xmlXPath(e, "b"); + xmlAsText(xp) + xmlDelete(doc); + ]]></programlisting> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <ulink url="http://www.w3.org/TR/1999/REC-xpath-19991116/">W3C XPath recommandation</ulink> + </member> + <member> + <ulink url="http://www.w3schools.com/xpath/">XPathチュートリアル</ulink> + </member> + </simplelist> + </refsection> + <refsection> + <title>履歴</title> + <revhistory> + <revision> + <revnumber>5.4.0</revnumber> + <revremark>XML文字列が導入されました.</revremark> + </revision> + </revhistory> + </refsection> +</refentry> diff --git a/modules/xml/help/pt_BR/addchapter.sce b/modules/xml/help/pt_BR/addchapter.sce new file mode 100755 index 000000000..557a1302a --- /dev/null +++ b/modules/xml/help/pt_BR/addchapter.sce @@ -0,0 +1,10 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +add_help_chapter("XML Management",SCI+"/modules/xml/help/pt_BR",%T); diff --git a/modules/xml/help/ru_RU/addchapter.sce b/modules/xml/help/ru_RU/addchapter.sce new file mode 100755 index 000000000..f8e57cc18 --- /dev/null +++ b/modules/xml/help/ru_RU/addchapter.sce @@ -0,0 +1,10 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011 - DIGITEO +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +add_help_chapter("XML Management",SCI+"/modules/xml/help/ru_RU",%T);
\ No newline at end of file |