Module: sip-router
Branch: master
Commit: f881456904969e1b2074cfd94af0daed9eef1292
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f881456…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Sun Mar 7 12:31:59 2010 +0100
doc rpc: fix xmllint errors
Fix unsupported xmlns:xi attrib., missing example titles and
text or examples outside sections.
---
doc/rpc/ser_rpc.xml | 32 ++++++++++++++++++++++----------
1 files changed, 22 insertions(+), 10 deletions(-)
diff --git a/doc/rpc/ser_rpc.xml b/doc/rpc/ser_rpc.xml
index 9ce6fef..295413b 100644
--- a/doc/rpc/ser_rpc.xml
+++ b/doc/rpc/ser_rpc.xml
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+ [ <!ENTITY % local.common.attrib
+ "xmlns:xi CDATA #FIXED 'http://www.w3.org/2001/XInclude'">]
+>
<section id="ser_rpc" xmlns:xi="http://www.w3.org/2001/XInclude">
<!--
@@ -155,9 +158,11 @@ typedef struct rpc_export {
(defined in rpc_lookup.h), from the module init function
(mod_init()). This is the <emphasis>recommended</emphasis>
method for all the new modules.
- <example>
+ <example><title>usrloc RPC Exports Declaration</title>
+ <para>
The <varname>rpc_export_t</varname> array for the usrloc
module looks like:
+ </para>
<programlisting>
<emphasis>
rpc_export_t ul_rpc[] = {
@@ -172,8 +177,10 @@ rpc_export_t ul_rpc[] = {
};
</emphasis>
</programlisting>
+ <para>
To register it from the module init function one would use
something similar to:
+ </para>
<programlisting>
if (rpc_register_array(ul_rpc) != 0) {
ERR("failed to register RPC commands\n");
@@ -214,7 +221,7 @@ struct module_exports {
functions of the usrloc module, using the rpc_export_t array
<emphasis>ul_rpc</emphasis> defined above, in the
rpc_register_array() example:
- <example>
+ <example><title>usrloc Module Exports Declaration</title>
<programlisting>
struct module_exports exports = {
"usrloc",
@@ -229,13 +236,13 @@ struct module_exports exports = {
</programlisting>
</example>
- <note>
+ <note><para>
This mode works only with modules using the SER module
interface. It does not work for kamailio modules and it
will probably not work for future sip-router modules. It is
safer and recommended to use instead the
<function>rpc_register_array()</function> function.
- </note>
+ </para></note>
</para></listitem>
</itemizedlist>
</para>
@@ -470,10 +477,11 @@ rpc->scan("f", &double_val);
Function <function>struct_scan</function> can be used to
retrieve named attributes from a parameter of type
structure.
- <note>This function is obsolete and not implemented by all the
+ <note><para>
+ This function is obsolete and not implemented by all the
rpc transports (e.g.: ctl / binrpc). Consider using the normal
<function>scan</function> instead.
- </note>
+ </para></note>
When retrieving a structure parameter from the
parameter set:
<programlisting>
@@ -501,8 +509,9 @@ rpc->struct_scan(handle, "sd", "str_attr", &str_val, "int_attr", &int_va
the structure.
</para>
</section>
-
- <example>
+
+ <section><title>Retrieving Parameters Example</title>
+ <example>
<title>Retrieving Parameters</title>
<programlisting>
<![CDATA[
@@ -555,6 +564,7 @@ static void core_echo(rpc_t* rpc, void* c)
]]>
</programlisting>
</example>
+ </section>
</section>
<section id="rpc.creating_result">
@@ -849,7 +859,9 @@ static void rpc_register(rpc_t* rpc)
<section id="rpc.new_transport">
<title>Implementing New Transports</title>
+ <remark>
To be done.
+ </remark>
<!-- TODO:
- create a new module
- take a look at sip_router/rpc.h
Module: sip-router
Branch: master
Commit: e6b92a08389e09bbddb7c30d1a328db00c6a8f2d
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e6b92a0…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Sun Mar 7 12:24:02 2010 +0100
doc: *_list: fix xmllint errors and TOC
- fix xmllint erros
- use a 0-level TOC (such that the main TOC will list only the
chapters and not also the sections)
---
doc/cfg_list/Makefile | 12 ++++++++----
doc/cfg_list/docbook/Makefile | 2 ++
doc/rpc_list/Makefile | 12 ++++++++----
doc/rpc_list/docbook/Makefile | 2 ++
doc/select_list/Makefile | 12 ++++++++----
doc/select_list/docbook/Makefile | 2 ++
doc/select_list/docbook/intro.xml | 30 +++++++++++++++---------------
7 files changed, 45 insertions(+), 27 deletions(-)
diff --git a/doc/cfg_list/Makefile b/doc/cfg_list/Makefile
index c72f621..16d645a 100644
--- a/doc/cfg_list/Makefile
+++ b/doc/cfg_list/Makefile
@@ -197,18 +197,22 @@ $(docbook_output_dir)/cfg_var_list.xml: Makefile \
$(foreach f,$(flist),$(docbook_output_dir)/$(call get_target,$f).xml)
@echo '<?xml version="1.0" encoding="UTF-8"?>' >$@
@echo '<!-- this file is autogenerated, do not edit! -->' >>$@
- @echo '<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"' >>$@
- @echo ' "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">' >>$@
+ @echo '<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"' >>$@
+ @echo ' "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"' >>$@
+ @echo ' [ <!ENTITY % local.common.attrib' >>$@
+ @echo " \"xmlns:xi CDATA #FIXED 'http://www.w3.org/2001/XInclude'\">]">>$@
+ @echo '>' >>$@
@echo '<book id="cfg_var_list"'\
'xmlns:xi="http://www.w3.org/2001/XInclude">' >>$@
@echo ' <title>Runtime Configuration Variables List</title>' >>$@
- @echo ' <info><revhistory><revision>' >>$@
+ @echo ' <bookinfo><revhistory><revision>' >>$@
@echo ' <revnumber>'$(repo_ver)'</revnumber>' >>$@
+ @echo ' <date>'`date -R`'</date>' >>$@
@echo ' <revremark>' >>$@
@echo " Automatically generated by:">>$@
@echo " $(MAKE) -C doc/cfg_list $(MAKECMDGOALS)" >>$@
@echo ' </revremark>' >>$@
- @echo ' </revision></revhistory></info>' >>$@
+ @echo ' </revision></revhistory></bookinfo>' >>$@
@$(foreach f,$(flist),\
echo ' <xi:include'\
'href="'$(call get_target,$f).xml'"/>' \
diff --git a/doc/cfg_list/docbook/Makefile b/doc/cfg_list/docbook/Makefile
index d0f65d2..8a30bf3 100644
--- a/doc/cfg_list/docbook/Makefile
+++ b/doc/cfg_list/docbook/Makefile
@@ -1,5 +1,7 @@
docs = cfg_var_list.xml
docbook_dir = ../../../docbook
+# no subsection listed in the main TOC
+xsltproc_flags+=--stringparam toc.section.depth 0
include $(docbook_dir)/Makefile
diff --git a/doc/rpc_list/Makefile b/doc/rpc_list/Makefile
index dbcea55..80a9783 100644
--- a/doc/rpc_list/Makefile
+++ b/doc/rpc_list/Makefile
@@ -213,18 +213,22 @@ $(docbook_output_dir)/rpc_list.xml: Makefile \
$(foreach f,$(flist),$(docbook_output_dir)/$(call get_target,$f).xml)
@echo '<?xml version="1.0" encoding="UTF-8"?>' >$@
@echo '<!-- this file is autogenerated, do not edit! -->' >>$@
- @echo '<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"' >>$@
- @echo ' "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">' >>$@
+ @echo '<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"' >>$@
+ @echo ' "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"' >>$@
+ @echo ' [ <!ENTITY % local.common.attrib' >>$@
+ @echo " \"xmlns:xi CDATA #FIXED 'http://www.w3.org/2001/XInclude'\">]">>$@
+ @echo '>' >>$@
@echo '<book id="rpc_list"'\
'xmlns:xi="http://www.w3.org/2001/XInclude">' >>$@
@echo ' <title>RPC Exports List</title>' >>$@
- @echo ' <info><revhistory><revision>' >>$@
+ @echo ' <bookinfo><revhistory><revision>' >>$@
@echo ' <revnumber>'$(repo_ver)'</revnumber>' >>$@
+ @echo ' <date>'`date -R`'</date>' >>$@
@echo ' <revremark>' >>$@
@echo " Automatically generated by:">>$@
@echo " $(MAKE) -C doc/rpc_list $(MAKECMDGOALS)" >>$@
@echo ' </revremark>' >>$@
- @echo ' </revision></revhistory></info>' >>$@
+ @echo ' </revision></revhistory></bookinfo>' >>$@
@$(foreach f,$(flist),\
echo ' <xi:include'\
'href="'$(call get_target,$f).xml'"/>' \
diff --git a/doc/rpc_list/docbook/Makefile b/doc/rpc_list/docbook/Makefile
index c76cc9f..e31800d 100644
--- a/doc/rpc_list/docbook/Makefile
+++ b/doc/rpc_list/docbook/Makefile
@@ -1,5 +1,7 @@
docs = rpc_list.xml
docbook_dir = ../../../docbook
+# no subsection listed in the main TOC
+xsltproc_flags+=--stringparam toc.section.depth 0
include $(docbook_dir)/Makefile
diff --git a/doc/select_list/Makefile b/doc/select_list/Makefile
index b50c852..e3f510e 100644
--- a/doc/select_list/Makefile
+++ b/doc/select_list/Makefile
@@ -212,18 +212,22 @@ $(docbook_output_dir)/select_list.xml: Makefile \
$(foreach f,$(flist),$(docbook_output_dir)/$(call get_target,$f).xml)
@echo '<?xml version="1.0" encoding="UTF-8"?>' >$@
@echo '<!-- this file is autogenerated, do not edit! -->' >>$@
- @echo '<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"' >>$@
- @echo ' "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">' >>$@
+ @echo '<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"' >>$@
+ @echo ' "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"' >>$@
+ @echo ' [ <!ENTITY % local.common.attrib' >>$@
+ @echo " \"xmlns:xi CDATA #FIXED 'http://www.w3.org/2001/XInclude'\">]">>$@
+ @echo '>' >>$@
@echo '<book id="select_list"'\
'xmlns:xi="http://www.w3.org/2001/XInclude">' >>$@
@echo ' <title>Select List</title>' >>$@
- @echo ' <info><revhistory><revision>' >>$@
+ @echo ' <bookinfo><revhistory><revision>' >>$@
@echo ' <revnumber>'$(repo_ver)'</revnumber>' >>$@
+ @echo ' <date>'`date -R`'</date>' >>$@
@echo ' <revremark>' >>$@
@echo " Automatically generated by:">>$@
@echo " $(MAKE) -C doc/select_list $(MAKECMDGOALS)" >>$@
@echo ' </revremark>' >>$@
- @echo ' </revision></revhistory></info>' >>$@
+ @echo ' </revision></revhistory></bookinfo>' >>$@
@echo ' <xi:include href="intro.xml"/>' >>$@
@$(foreach f,$(flist),\
echo ' <xi:include'\
diff --git a/doc/select_list/docbook/Makefile b/doc/select_list/docbook/Makefile
index 95cc961..827b10c 100644
--- a/doc/select_list/docbook/Makefile
+++ b/doc/select_list/docbook/Makefile
@@ -1,5 +1,7 @@
docs = select_list.xml
docbook_dir = ../../../docbook
+# no subsection listed in the main TOC
+xsltproc_flags+=--stringparam toc.section.depth 0
include $(docbook_dir)/Makefile
diff --git a/doc/select_list/docbook/intro.xml b/doc/select_list/docbook/intro.xml
index da9e852..7ca52ce 100644
--- a/doc/select_list/docbook/intro.xml
+++ b/doc/select_list/docbook/intro.xml
@@ -21,21 +21,21 @@
<title>Notations</title>
<para>The following notations are used:
<orderedlist>
- <listitem>@ - all selects always start with '@'. </listitem>
- <listitem>"string" - string type.</listitem>
- <listitem>integer - integer type.</listitem>
- <listitem>[] - Parameter markers. Can be either [integer] or
+ <listitem><para>@ - all selects always start with '@'.</para></listitem>
+ <listitem><para>"string" - string type.</para></listitem>
+ <listitem><para>integer - integer type.</para></listitem>
+ <listitem><para>[] - Parameter markers. Can be either [integer] or
["string"].
Note that instead of ["string"] one could write .string,
e.g.:
@foo.bar["string"] is equivalent to @foo.bar.string.
- </listitem>
- <listitem>{} - denotes an optional parameter.
+ </para></listitem>
+ <listitem><para>{} - denotes an optional parameter.
E.g.: @ruri.params{["string"]} means you could use
@ruri.params by itself or you could specify an extra parameter:
@ruri.params["trasnport"] or @ruri.params.transport.
- </listitem>
- <listitem><string> - means the next member is not fixed and can
+ </para></listitem>
+ <listitem><para><string> - means the next member is not fixed and can
take any string value (it is a string parameter).
It is equivalent with ["string"], e.g.:
@msg.header.<string> is the same as
@@ -43,18 +43,18 @@
It is used only to expose an internal implementation detail
(SEL_PARAM_* vs. CONSUME_NEXT_*), but from the script writer point
of view it is the same thing.
- </listitem>
- <listitem>.* - means the select can be followed by a variable number of
- string parameters.
+ </para></listitem>
+ <listitem><para>.* - means the select can be followed by a variable number
+ of string parameters.
E.g.: @cfg_get.* means that @cfg_get.core.version is a valid usage.
- </listitem>
- <listitem>* (without a '.' in front) - it means the last member
- might be a class that might expand further (but the
+ </para></listitem>
+ <listitem><para>* (without a '.' in front) - it means the
+ last member might be a class that might expand further (but the
"expansion" is not defined in the same module).
E.g. @foo.nameaddr* means that nameaddr is most likely
a class that expands further
(for example into @foo.nameaddr.uri a.s.o).
- </listitem>
+ </para></listitem>
</orderedlist>
</para>
</section>