Przeglądaj źródła

textopsx: selects moved to dedicated section

- not belonging to the functions
Daniel-Constantin Mierla 10 lat temu
rodzic
commit
6039fc5ef6

+ 18 - 17
modules/textopsx/README

@@ -33,11 +33,12 @@ Daniel-Constantin Mierla
               2.12. include_hf_value(hf, hvalue)
               2.13. exclude_hf_value(hf, hvalue)
               2.14. hf_value_exists(hf, hvalue)
-              2.15. Selects
 
-                    2.15.1. @hf_value
-                    2.15.2. @hf_value2
-                    2.15.3. @hf_value_exists
+        3. Selects
+
+              3.1. @hf_value
+              3.2. @hf_value2
+              3.3. @hf_value_exists
 
    List of Examples
 
@@ -78,11 +79,12 @@ Chapter 1. Admin Guide
         2.12. include_hf_value(hf, hvalue)
         2.13. exclude_hf_value(hf, hvalue)
         2.14. hf_value_exists(hf, hvalue)
-        2.15. Selects
 
-              2.15.1. @hf_value
-              2.15.2. @hf_value2
-              2.15.3. @hf_value_exists
+   3. Selects
+
+        3.1. @hf_value
+        3.2. @hf_value2
+        3.3. @hf_value_exists
 
 1. Overview
 
@@ -106,11 +108,6 @@ Chapter 1. Admin Guide
    2.12. include_hf_value(hf, hvalue)
    2.13. exclude_hf_value(hf, hvalue)
    2.14. hf_value_exists(hf, hvalue)
-   2.15. Selects
-
-        2.15.1. @hf_value
-        2.15.2. @hf_value2
-        2.15.3. @hf_value_exists
 
 2.1. msg_apply_changes()
 
@@ -375,9 +372,13 @@ if (@hf_value_exists.supported.path == "1") {
 }
 ...
 
-2.15. Selects
+3. Selects
+
+   3.1. @hf_value
+   3.2. @hf_value2
+   3.3. @hf_value_exists
 
-2.15.1. @hf_value
+3.1. @hf_value
 
    Get value of required header-value or param. Note that functions called
    'value2' works with Authorization-like headers where comma is not
@@ -418,10 +419,10 @@ $rr = @hf_value.route.uri;
 $prt = @hf_value2.authorization.integrity_protected;
 ...
 
-2.15.2. @hf_value2
+3.2. @hf_value2
 
    TBA.
 
-2.15.3. @hf_value_exists
+3.3. @hf_value_exists
 
    TBA.

+ 0 - 77
modules/textopsx/doc/functions.xml

@@ -438,81 +438,4 @@ if (@hf_value_exists.supported.path == "1") {
 	</example>
     </section>
 
-	<section>
-	<title>Selects</title>
-    <section id="textopsx.sel.hf_value">
-	<title>@hf_value</title>
-	<para>
-		Get value of required header-value or param. Note that functions called 'value2'
-		works with Authorization-like headers where comma is not treated as value delimiter. Formats:
-		@hf_value.HFNAME[IDX]    # idx value, negative value counts from bottom
-		@hf_value.HFNAME.PARAM_NAME
-		@hf_value.HFNAME[IDX].PARAM_NAME
-		@hf_value.HFNAME.p.PARAM_NAME  # or .param., useful if requred called "uri", "p", "param"
-		@hf_value.HFNAME[IDX].p.PARAM_NAME # dtto
-		@hf_value.HFNAME[IDX].uri # (&lt; &amp; &gt; excluded)
-		@hf_value.HFNAME[*]     # return comma delimited list of all values (combines headers)
-		@hf_value.HFNAME        # the same as above [*] but may be parsed by cfg.y
-		@hf_value.HFNAME[*].uri # return comma delimited list of uris (&lt; &amp; &gt; excluded)
-		@hf_value.HFNAME.uri    # the same as above [*] but may be parsed by cfg.y
-		@hf_value.HFNAME[IDX].name  # returns name part, quotes excluded
-		@hf_value.HFNAME.name   # returns name part of the first value
-
-		@hf_value2.HFNAME        # returns value of first header
-		@hf_value2.HFNAME[IDX]   # returns value of idx's header
-		@hf_value2.HFNAME.PARAM_NAME
-		@hf_value2.HFNAME[IDX].PARAM_NAME
-
-		@hf_value.HFNAME[IDX].uri  # return URI, quotes excluded
-		@hf_value.HFNAME.p.uri  # returns param named uri, not URI itself
-		@hf_value.HFNAME.p.name # returns param named name, not name itself
-		@hf_value.HFNAME[IDX].uri.name #  any sel_any_uri nested features may be used
-		@hf_value.HFNAME[IDX].nameaddr.name # select_any_nameaddr
-	</para>
-	<para>Meaning of the parameters is as follows:</para>
-	<itemizedlist>
-	    <listitem>
-		<para><emphasis>HFNAME</emphasis> - Header field name. Underscores are treated as dashes.
-		</para>
-	    </listitem>
-	    <listitem>
-		<para><emphasis>IDX</emphasis> - Value index, negative value counts from bottom
-		</para>
-	    </listitem>
-	    <listitem>
-		<para><emphasis>PARAM_NAME</emphasis> - name of parameter
-		</para>
-	    </listitem>
-	</itemizedlist>
-	<example>
-	    <title><function>@hf_value select</function> usage</title>
-	    <programlisting>
-...
-$a = @hf_value.my_header[1].my_param;
-xplog("L_ERR", "$sel(@hf_value.via[-1]), $sel(@hf_value.from.tag)\n");
-$b = @hf_value.p_associated_uri;
-
-xplog("L_ERR", "Route uris: '$sel(@hf_value.route[*].uri)'\n");
-$rr = @hf_value.route.uri;
-
-$prt = @hf_value2.authorization.integrity_protected;
-...
-	    </programlisting>
-	</example>
-    </section>
-    <section id="textopsx.sel.hf_value2">
-	<title>@hf_value2</title>
-	<para>
-		TBA.
-	</para>
-    </section>
-    <section id="textopsx.sel.hf_value_exists">
-	<title>@hf_value_exists</title>
-	<para>
-		TBA.
-	</para>
-    </section>
-
-    </section>
-
 </section>

+ 81 - 0
modules/textopsx/doc/selects.xml

@@ -0,0 +1,81 @@
+<?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">
+
+<section id="textopsx.selects" xmlns:xi="http://www.w3.org/2001/XInclude">
+    <title>Selects</title>
+
+    <section id="textopsx.sel.hf_value">
+	<title>@hf_value</title>
+	<para>
+		Get value of required header-value or param. Note that functions called 'value2'
+		works with Authorization-like headers where comma is not treated as value delimiter. Formats:
+		@hf_value.HFNAME[IDX]    # idx value, negative value counts from bottom
+		@hf_value.HFNAME.PARAM_NAME
+		@hf_value.HFNAME[IDX].PARAM_NAME
+		@hf_value.HFNAME.p.PARAM_NAME  # or .param., useful if requred called "uri", "p", "param"
+		@hf_value.HFNAME[IDX].p.PARAM_NAME # dtto
+		@hf_value.HFNAME[IDX].uri # (&lt; &amp; &gt; excluded)
+		@hf_value.HFNAME[*]     # return comma delimited list of all values (combines headers)
+		@hf_value.HFNAME        # the same as above [*] but may be parsed by cfg.y
+		@hf_value.HFNAME[*].uri # return comma delimited list of uris (&lt; &amp; &gt; excluded)
+		@hf_value.HFNAME.uri    # the same as above [*] but may be parsed by cfg.y
+		@hf_value.HFNAME[IDX].name  # returns name part, quotes excluded
+		@hf_value.HFNAME.name   # returns name part of the first value
+
+		@hf_value2.HFNAME        # returns value of first header
+		@hf_value2.HFNAME[IDX]   # returns value of idx's header
+		@hf_value2.HFNAME.PARAM_NAME
+		@hf_value2.HFNAME[IDX].PARAM_NAME
+
+		@hf_value.HFNAME[IDX].uri  # return URI, quotes excluded
+		@hf_value.HFNAME.p.uri  # returns param named uri, not URI itself
+		@hf_value.HFNAME.p.name # returns param named name, not name itself
+		@hf_value.HFNAME[IDX].uri.name #  any sel_any_uri nested features may be used
+		@hf_value.HFNAME[IDX].nameaddr.name # select_any_nameaddr
+	</para>
+	<para>Meaning of the parameters is as follows:</para>
+	<itemizedlist>
+	    <listitem>
+		<para><emphasis>HFNAME</emphasis> - Header field name. Underscores are treated as dashes.
+		</para>
+	    </listitem>
+	    <listitem>
+		<para><emphasis>IDX</emphasis> - Value index, negative value counts from bottom
+		</para>
+	    </listitem>
+	    <listitem>
+		<para><emphasis>PARAM_NAME</emphasis> - name of parameter
+		</para>
+	    </listitem>
+	</itemizedlist>
+	<example>
+	    <title><function>@hf_value select</function> usage</title>
+	    <programlisting>
+...
+$a = @hf_value.my_header[1].my_param;
+xplog("L_ERR", "$sel(@hf_value.via[-1]), $sel(@hf_value.from.tag)\n");
+$b = @hf_value.p_associated_uri;
+
+xplog("L_ERR", "Route uris: '$sel(@hf_value.route[*].uri)'\n");
+$rr = @hf_value.route.uri;
+
+$prt = @hf_value2.authorization.integrity_protected;
+...
+	    </programlisting>
+	</example>
+    </section>
+    <section id="textopsx.sel.hf_value2">
+	<title>@hf_value2</title>
+	<para>
+		TBA.
+	</para>
+    </section>
+    <section id="textopsx.sel.hf_value_exists">
+	<title>@hf_value_exists</title>
+	<para>
+		TBA.
+	</para>
+    </section>
+
+</section>

+ 1 - 0
modules/textopsx/doc/textopsx.xml

@@ -40,6 +40,7 @@
     </section>
 
     <xi:include href="functions.xml"/>
+    <xi:include href="selects.xml"/>
     </chapter>
 </book>