Unix/Linux Go Back    


Linux 2.6 - man page for docb_gen (linux section 3erl)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)


docb_gen(3erl)			     Erlang Module Definition			   docb_gen(3erl)

NAME
       docb_gen - Generate XML from EDoc comments in Erlang source code.

DESCRIPTION
       docb_gen  contains functions for generating XML documentation source code according to the
       erlref or chapter DTD from EDoc comments in Erlang source code or an  overview.edoc  file,
       using EDoc.

EXPORTS
       module(File) -> ok | {error, Reason}
       module(File, Options) -> ok | {error, Reason}

	      Types  File = string()
		     Options = [Opt]
		     Opt  =  {def,Defs}  |  {includes,Dirs}  |	{preprocess,Bool}  |  {sort_func-
		     tions,Bool}
		     Defs = [{atom(),string()}]
		     Dirs = [string()]
		     Bool = bool()
		     Reason = badfile | {badopt,term()} | term()

	      Generates XML documentation source code according to the erlref DTD from EDoc  com-
	      ments File , using the EDoc application.

	      File is an Erlang source file, given with or without the .erl extension as Name.erl
	      or Name . The resulting XML file is created in the current  working  directory  and
	      named Name.xml .

	      Options is a list of options, see below.

	      Returns ok if successful, and an error tuple otherwise.

       users_guide(File) -> ok | {error, Reason}
       users_guide(File, Options) -> ok | {error, Reason}

	      Types  File -- see module/1,2
		     Options -- see module/1,2
		     Reason -- see module/1,2

	      Like  module/1,2 but generates XML source code according to the chapter DTD from an
	      overview.edoc or similar file.

	      The resulting file is named chapter.xml .

OPTIONS
	 {def, [{Name,Text}]} :
	   Specifies EDoc macro definitions. See edoc:get_doc/2 .

	 {includes, [Dir]} :
	   Specifies  directories   where   EDoc   should   search   for   include   files.   See
	   edoc:read_source/2 .

	 {preprocess, true|false} :
	   Specifies  if EDoc should read the source file via the Erlang preprocessor. Default is
	   false . See edoc:read_source/2 .

	 {sort_functions, true|false} :
	   Specifies if the functions in the resulting XML file should be sorted  alphabetically.
	   Default is true .

LIMITATIONS
       The mapping from the EDoc XHTML output to valid Erlang/OTP XML is not complete. An attempt
       has been made to cover the most commonly used XHTML constructs, but there  will	still  be
       cases  where  XML generation fails or where the resulting XML is inadequate. This is espe-
       cially true for users_guide/1,2 .

       Known limitations for some XHTML tags:

	 <a> :
	   All attributes except the first href or name attribute are ignored.

	   A href attribute means the <a> tag will be transformed to a <seealso> or <url> tag and
	   an attempt is made to resolve the reference if necessary.

	   A name attribute means the <a> tag will be transformed to a <marker> tag.

	 <b>, <em>, <pre> :
	   Cannot contain other tags in Erlang/OTP XML, content is converted to plain text.

	 <center> :
	   No corresponding Erlang/OTP XML tag, converted to plain text.

	 <font> :
	   No corresponding Erlang/OTP XML tag, converted to plain text.

	 <h1>, <h2>, ... :
	   There is no tag corresponding to a header in Erlang/OTP XML, so these are converted to
	   plain text instead, with the exception of <h3> and <h4> tags  within  overview.edoc	,
	   see part about " chapter DTD" below.

	 <sup> :
	   There  is  no tag corresponding to superscript in Erlang/OTP XML, so this is converted
	   to plain text within brackets "(..)".

	 References :
	   The markers automatically inserted by EDoc at each heading and function will  override
	   the markers automatically inserted by DocBuilder, with the unfortunate result that the
	   links in the left-hand frame of the User's Guide will not work, and	also  that  cross
	   referencing	 a   function	in   a	 module  the  usual  Erlang/OTP  way  "  <seealso
	   marker="edoc:edoc#run/3...>	  "    does	not	work.	  (But	   "	 <seealso
	   marker="edoc:edoc#run-3...> " does.)

       erlref DTD

	 Tables :
	   Tables are not allowed. The contents of a table is converted to text instead, each row
	   corresponding to one line of text.

       chapter DTD

	 Sections :
	   Only two levels of sections. <h3> (equivalent to EDoc headings " == Heading ==  ")  is
	   interpreted as start of top-level section, or if there is no <h3> tag, the entire doc-
	   ument is made into one top-level section. <h4> (equivalent to EDoc sub-headings (" ===
	   Sub-heading === ") is interpreted as start of second-level section.

	 Tables :
	   Tables without borders are converted to text in the same manner as for the erlref DTD.

Ericsson AB				docbuilder 0.9.8.9			   docb_gen(3erl)
Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums


All times are GMT -4. The time now is 08:37 PM.