Review Board 1.7.16


XML documentation for manager actions.

Review Request #250 - Created May 14, 2009 and submitted

Eliel SardaƱons
Reviewers
asterisk-dev
Asterisk
With this patch we allow to set manager actions documentation in xml format like we are already doing for applications/functions and agi commands.
It is possible to use both type of documentations (static and xml).
The patch was tested with xmldoc enabled and without xmldoc enabled (./configure --disable-xmldoc).
'core show application ....' -> tested
'core show function ...' -> tested
'agi show commands topic ...' -> tested

'manager show commands' -> tested
'manager show command Ping' -> tested
'manager show command Events' -> tested
/trunk/doc/appdocsxml.dtd
Diff Revision 2 Diff Revision 3
1
  <!ELEMENT docs (application|function|agi|manager)* >
1
  <!ELEMENT docs (application|function|agi|manager)*>

    
   
2
  <!ATTLIST docs xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude">

    
   
3

   

    
   
4
  <!ELEMENT xi:include (xi:fallback?) >

    
   
5
  <!ATTLIST xi:include 

    
   
6
  xmlns:xi	CDATA       #FIXED    "http://www.w3.org/2001/XInclude"

    
   
7
  href		CDATA       #IMPLIED

    
   
8
  parse		(xml|text)  "xml"

    
   
9
  xpointer	CDATA       #IMPLIED

    
   
10
  encoding	CDATA       #IMPLIED 

    
   
11
  accept	CDATA       #IMPLIED

    
   
12
  accept-language CDATA  #IMPLIED >
2

    
   
13

   
3
  <!ELEMENT application (synopsis?,syntax?,description?,see-also?)>
14
  <!ELEMENT application (synopsis?,syntax?,description?,see-also?)>
4
  <!ATTLIST application name CDATA #REQUIRED>
15
  <!ATTLIST application name CDATA #REQUIRED>
5
  <!ATTLIST application language CDATA #REQUIRED>
16
  <!ATTLIST application language CDATA #REQUIRED>
6

    
   
17

   
[+20] [20] 7 lines
[+20]
14

    
   
25

   
15
  <!ELEMENT manager (synopsis?,syntax?,description?,see-also?)>
26
  <!ELEMENT manager (synopsis?,syntax?,description?,see-also?)>
16
  <!ATTLIST manager name CDATA #REQUIRED>
27
  <!ATTLIST manager name CDATA #REQUIRED>
17
  <!ATTLIST manager language CDATA #REQUIRED>
28
  <!ATTLIST manager language CDATA #REQUIRED>
18

    
   
29

   
19
  <!ELEMENT see-also (ref*)>
30
  <!ELEMENT see-also (ref|xi:include)*>
20

    
   
31

   
21
  <!ELEMENT ref (#PCDATA)*>
32
  <!ELEMENT ref (#PCDATA)>
22
  <!ATTLIST ref type (application|function|astcli|link|manpage|filename|agi) #REQUIRED>
33
  <!ATTLIST ref type (application|function|astcli|link|manpage|filename|agi) #REQUIRED>
23

    
   
34

   
24
  <!ELEMENT synopsis (#PCDATA)>
35
  <!ELEMENT synopsis (#PCDATA)>
25

    
   
36

   
26
  <!ELEMENT syntax (parameter*)>
37
  <!ELEMENT syntax (parameter|xi:include)*>
27
  <!ATTLIST syntax argsep CDATA ",">
38
  <!ATTLIST syntax argsep CDATA ",">
28

    
   
39

   
29
  <!ELEMENT description (para|note|warning|variablelist|enumlist)*>
40
  <!ELEMENT description (para|note|warning|variablelist|enumlist|xi:include)*>
30

    
   
41

   
31
  <!ELEMENT parameter (optionlist|enumlist|argument|para|note|warning|parameter)*>
42
  <!ELEMENT parameter (optionlist|enumlist|argument|para|note|warning|parameter|xi:include)*>
32
  <!ATTLIST parameter name CDATA "">
43
  <!ATTLIST parameter name CDATA "">
33
  <!ATTLIST parameter required (yes|no|true|false) "false">
44
  <!ATTLIST parameter required (yes|no|true|false) "false">
34
  <!ATTLIST parameter multiple (yes|no|true|false) "false">
45
  <!ATTLIST parameter multiple (yes|no|true|false) "false">
35
  <!ATTLIST parameter hasparams (yes|no|true|false|optional) "false">
46
  <!ATTLIST parameter hasparams (yes|no|true|false|optional) "false">
36
  <!ATTLIST parameter literal (yes|no|true|false) "false">
47
  <!ATTLIST parameter literal (yes|no|true|false) "false">
37
  <!ATTLIST parameter default CDATA "">
48
  <!ATTLIST parameter default CDATA "">
38
  <!ATTLIST parameter argsep CDATA ",">
49
  <!ATTLIST parameter argsep CDATA ",">
39

    
   
50

   
40
  <!ELEMENT optionlist (option+)>
51
  <!ELEMENT optionlist (option+)>
41
  <!ELEMENT option (argument|para|note|warning|variablelist|enumlist)*>
52
  <!ELEMENT option (argument|para|note|warning|variablelist|enumlist|xi:include)*>
42
  <!ATTLIST option name CDATA #REQUIRED>
53
  <!ATTLIST option name CDATA #REQUIRED>
43
  <!ATTLIST option argsep CDATA ",">
54
  <!ATTLIST option argsep CDATA ",">
44
  <!ATTLIST option implies CDATA "">
55
  <!ATTLIST option implies CDATA "">
45
  <!ATTLIST option hasparams CDATA "">
56
  <!ATTLIST option hasparams CDATA "">
46

    
   
57

   
47
  <!ELEMENT enumlist (enum+)>
58
  <!ELEMENT enumlist (enum+)>
48
  <!ELEMENT enum (para|note|warning|parameter)*>
59
  <!ELEMENT enum (para|note|warning|parameter|enumlist|xi:include)*>
49
  <!ATTLIST enum name CDATA "">
60
  <!ATTLIST enum name CDATA "">
50

    
   
61

   
51
  <!ELEMENT argument (para|note|warning|variablelist|argument)*>
62
  <!ELEMENT argument (para|note|warning|variablelist|argument|xi:include)*>
52
  <!ATTLIST argument name CDATA #REQUIRED>
63
  <!ATTLIST argument name CDATA #REQUIRED>
53
  <!ATTLIST argument multiple (yes|no|true|false) "false">
64
  <!ATTLIST argument multiple (yes|no|true|false) "false">
54
  <!ATTLIST argument required (yes|no|true|false) "false">
65
  <!ATTLIST argument required (yes|no|true|false) "false">
55
  <!ATTLIST argument hasparams (yes|no|true|false|optional) "false">
66
  <!ATTLIST argument hasparams (yes|no|true|false|optional) "false">
56
  <!ATTLIST argument argsep CDATA ",">
67
  <!ATTLIST argument argsep CDATA ",">
57

    
   
68

   
58
  <!ELEMENT para (#PCDATA|astcli|literal|emphasis|filename|directory|replaceable|variable)*>
69
  <!ELEMENT para (#PCDATA|astcli|literal|emphasis|filename|directory|replaceable|variable|xi:include)*>
59
  <!ELEMENT literal (#PCDATA)>
70
  <!ELEMENT literal (#PCDATA)>
60
  <!ELEMENT emphasis (#PCDATA)>
71
  <!ELEMENT emphasis (#PCDATA)>
61
  <!ELEMENT filename (#PCDATA)>
72
  <!ELEMENT filename (#PCDATA)>
62
  <!ELEMENT replaceable (#PCDATA)>
73
  <!ELEMENT replaceable (#PCDATA)>
63
  <!ELEMENT directory (#PCDATA)>
74
  <!ELEMENT directory (#PCDATA)>
64
  <!ELEMENT astcli (#PCDATA)>
75
  <!ELEMENT astcli (#PCDATA)>
65
 
76
 
66
  <!ELEMENT note (para+)>
77
  <!ELEMENT note (para+|xi:include*)>
67
  <!ELEMENT warning (para+)>
78
  <!ELEMENT warning (para+|xi:include*)>
68

    
   
79

   
69
  <!ELEMENT variablelist (variable+)>
80
  <!ELEMENT variablelist (variable+|xi:include*)>
70
  <!ELEMENT variable (#PCDATA|value|para)*>
81
  <!ELEMENT variable (#PCDATA|value|para|xi:include)*>
71
  <!ATTLIST variable name CDATA "">
82
  <!ATTLIST variable name CDATA "">
72

    
   
83

   
73
  <!ELEMENT value (#PCDATA)>
84
  <!ELEMENT value (#PCDATA)>
74
  <!ATTLIST value name CDATA #REQUIRED>
85
  <!ATTLIST value name CDATA #REQUIRED>
75
  <!ATTLIST value default CDATA "">
86
  <!ATTLIST value default CDATA "">
/trunk/include/asterisk/agi.h
Diff Revision 2 Diff Revision 3 - File Reverted
 
/trunk/include/asterisk/manager.h
Diff Revision 2 Diff Revision 3
 
/trunk/include/asterisk/pbx.h
Diff Revision 2 Diff Revision 3
 
/trunk/include/asterisk/xmldoc.h
Diff Revision 2 Diff Revision 3
 
/trunk/main/manager.c
Diff Revision 2 Diff Revision 3
 
/trunk/main/pbx.c
Diff Revision 2 Diff Revision 3
 
/trunk/main/xmldoc.c
Diff Revision 2 Diff Revision 3
 
/trunk/res/res_agi.c
Diff Revision 2 Diff Revision 3
 
  1. /trunk/doc/appdocsxml.dtd: Loading...
  2. /trunk/include/asterisk/agi.h: Loading...
  3. /trunk/include/asterisk/manager.h: Loading...
  4. /trunk/include/asterisk/pbx.h: Loading...
  5. /trunk/include/asterisk/xmldoc.h: Loading...
  6. /trunk/main/manager.c: Loading...
  7. /trunk/main/pbx.c: Loading...
  8. /trunk/main/xmldoc.c: Loading...
  9. /trunk/res/res_agi.c: Loading...

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.