[Zodb-checkins] CVS: Packages/ZConfig/doc - zconfig.tex:1.48

Fred L. Drake, Jr. fred@zope.com
Fri, 10 Jan 2003 16:06:08 -0500


Update of /cvs-repository/Packages/ZConfig/doc
In directory cvs.zope.org:/tmp/cvs-serv526

Modified Files:
	zconfig.tex 
Log Message:
- comment out material discussing section "delegation" since it's not
  supported in the current version when using schema
- move the docs for the backward-compatibility modules to the end,
  nicely out of the way


=== Packages/ZConfig/doc/zconfig.tex 1.47 => 1.48 === (527/627 lines abridged)
--- Packages/ZConfig/doc/zconfig.tex:1.47	Thu Jan  9 17:31:25 2003
+++ Packages/ZConfig/doc/zconfig.tex	Fri Jan 10 16:06:05 2003
@@ -66,17 +66,17 @@
 {http://www.python.org/doc/current/lib/module-ConfigParser.html}
 format, this format supports key-value pairs arranged in sections.
 Unlike the \module{ConfigParser} format, sections are typed and can be
-organized hierarchically, and support delegation of value lookup to
-other sections.  Additional files may be included if needed.  Though
-both formats are substantially line-oriented, this format is more
-flexible.
+organized hierarchically.
+% XXX and support delegation of value lookup to other sections.
+Additional files may be included if needed.  Though both formats are
+substantially line-oriented, this format is more flexible.
 
 The intent of supporting nested section is to allow setting up the
 configurations for loosely-associated components in a container.  For
 example, each process running on a host might get its configuration
-section from that host's section of a shared configuration file.  Each
-section may use the delegation syntax to share a base configuration
-with other components of the same type.
+section from that host's section of a shared configuration file.
+% XXX Each section may use the delegation syntax to share a base
+% configuration with other components of the same type.
 
 The top level of a configuration file consists of a series of
 inclusions, key-value pairs, and sections.
@@ -127,11 +127,12 @@
 denote optional parts):
 
 \begin{alltt}
-<\var{section-type} \optional{\var{name}} \optional{(\var{basename})} >
+<\var{section-type} \optional{\var{name}} >
 \end{alltt}
+% <\var{section-type} \optional{\var{name}} \optional{(\var{basename})} >
 
-\var{section-type}, \var{name}, and \var{basename} all have the same
-syntactic constraints as key names.
+\var{section-type} and \var{name} % and \var{basename}
+all have the same syntactic constraints as key names.
 
 The terminator looks like this:
 
@@ -156,39 +157,40 @@
 (The indentation is used here for clarity, but is not required for
 syntactic correctness.)
 
-If the \var{basename} component is given for a section header
-(regardless of the presence of the name component), that section
-acquires additional values from another section having \var{basename}

[-=- -=- -=- 527 lines omitted -=- -=- -=-]

-\begin{description}
-  \item[(1)]  This is different from the Bourne shell, which uses
-              \code{\textbackslash\$} to generate a \character{\$} in
-              the result text.  This difference avoids having as many
-              special characters in the syntax.
-
-  \item[(2)]  Any character which immediately follows \var{name} may
-              not be a valid character in a name.
-\end{description}
-
-In each case, \var{name} is a non-empty sequence of alphanumeric and
-underscore characters not starting with a digit.  If there is not a
-replacement for \var{name}, the exception
-\exception{SubstitutionReplacementError} is raised.
-Note that the lookup is expected to be case-insensitive; this module
-will always use a lower-case version of the name to perform the query.
-
-This module provides these functions:
-
-\begin{funcdesc}{substitute}{s, mapping}
-  Substitute values from \var{mapping} into \var{s}.  \var{mapping}
-  can be a \class{dict} or any type that supports the \method{get()}
-  method of the mapping protocol.  Replacement
-  values are copied into the result without further interpretation.
-  Raises \exception{SubstitutionSyntaxError} if there are malformed
-  constructs in \var{s}.
-\end{funcdesc}
-
-\begin{funcdesc}{isname}{s}
-  Returns \code{True} if \var{s} is a valid name for a substitution
-  text, otherwise returns \code{False}.
-\end{funcdesc}
-
-
-\subsection{Examples}
-
-\begin{verbatim}
->>> from ZConfig.substitution import substitute
->>> d = {'name': 'value',
-...      'top': '$middle',
-...      'middle' : 'bottom'}
->>>
->>> substitute('$name', d)
-'value'
->>> substitute('$top', d)
-'$middle'
-\end{verbatim}
 
 
 \end{document}