Index: trunk/doc/pslib/psLibSDRS.tex
===================================================================
--- trunk/doc/pslib/psLibSDRS.tex	(revision 2502)
+++ trunk/doc/pslib/psLibSDRS.tex	(revision 2542)
@@ -1,3 +1,3 @@
-%%% $Id: psLibSDRS.tex,v 1.154 2004-11-27 01:48:23 eugene Exp $
+%%% $Id: psLibSDRS.tex,v 1.155 2004-11-30 22:45:37 eugene Exp $
 \documentclass[panstarrs,spec]{panstarrs}
 
@@ -11,5 +11,5 @@
 \project{Pan-STARRS Image Processing Pipeline}
 \organization{Institute for Astronomy}
-\version{09}
+\version{10}
 \docnumber{PSDC-430-007}
 
@@ -40,4 +40,5 @@
 08 & 2004 Oct 12 & draft for start of cycle 4 \\ \hline
 09 & 2004 Nov 15 & final for cycle 4 \\
+10 & 2004 Nov 30 & update for cycle 4 \\
 \RevisionsEnd
 
@@ -1662,6 +1663,6 @@
 
 \begin{verbatim}
-psArray *psArrayFromList(psList *list);
-psList  *psListFromArray(psArray *array);
+psArray *psListToArray(psList *list);
+psList  *psArrayToList(psArray *array);
 \end{verbatim}
 These two functions are available to convert between the
@@ -1764,11 +1765,11 @@
 
 \begin{verbatim}
-psArray *psArrayFromHash(psHash *hash);
-\end{verbatim}
-This function is available place the data in a \code{psHash} into a
-\code{psArray} container.  This function does not free the elements or
-destroy the input collection.  Rather, it increments the reference
-counter for each of the elements.  The resulting array does not have
-any information about the has key values, and the order is not
+psArray *psHashToArray(psHash *hash);
+\end{verbatim}
+This function places the data in a \code{psHash} into a \code{psArray}
+container.  This function does not free the elements or destroy the
+input collection.  Rather, it increments the reference counter for
+each of the elements.  The resulting array does not have any
+information about the has key values, and the order is not
 significant.
 
@@ -4122,4 +4123,60 @@
 \S\ref{sec:configgrammar}.
 
+\subsection{XML Functions}
+
+Within Pan-STARRS, we will use XML documents as a transport mechanism
+to carry data between programs and between IPP and other subsystems.
+Configuration information may be stored as well as XML documents, in
+addition to the text format discussed in the discussion on Metadata.
+XML is an extremely variable document format, and it is not currently
+the intention of PSLib to provide a complete PSLib version of XML
+operations.  Rather, a limited number of operations are defined to
+convert specific data structures to an appropriate XML document.  To
+maximize the simplicity of the XML APIs, we will use the convention
+that a single XML document to be parsed by PSLib shall contain only a
+single data structure.  Each of the XML APIs therefore take as input a
+reference to a complete XML document and return a PSLib data
+structure, or take a PSLib data structure and return a complete XML
+document.
+
+We start by defining a PSLib wrapper type which is a pointer to an XML
+document in memory.  We wrap the \code{libxml2} version of an XML
+document pointer for now:
+\begin{verbatim}
+typedef xmlDocPtr psXMLDoc;
+void psXMLDocFree(psXMLDoc *doc);
+\end{verbatim}.
+
+The next pair of functions convert a \code{psMetadata} data structure
+to a complete \code{psXMLDoc} (in memory) and vice versa:
+\begin{verbatim}
+psXMLDoc *psMetadataToXMLDoc(const psMetadata *metadata);
+psMetadata *psXMLDocToMetadata(const psXMLDoc *doc);
+\end{verbatim}.
+
+The next pair of functions loads the data in a named file into a
+complete \code{psXMLDoc} (in memory) and write out the \code{psXMLDoc}
+to a named file:
+\begin{verbatim}
+psXMLDoc *psXMLParseFile(const char *filename);
+int psXMLDocToFile(const psXMLDoc *doc, const char *filename);
+\end{verbatim}.
+
+The next pair of functions accepts a block of memory and parses it
+into a complete \code{psXMLDoc} (also in memory), and vice versa:
+\begin{verbatim}
+psXMLDoc *psXMLParseMemory(const char *buffer, const int size);
+int psXMLDocToMemory(const psXMLDoc *doc, char *buffer);
+\end{verbatim}.
+
+The next pair of functions read from and write to a file descriptor.
+The first converts the imcoming data to a complete \code{psXMLDoc}
+(also in memory), the second writes the \code{psXMLDoc} to the file
+descriptor:
+\begin{verbatim}
+psXMLDoc *psXMLParseFD(int fd);
+int psXMLDocToFD(const psXMLDoc *doc, int fd);
+\end{verbatim}.
+
 \subsection{FITS I/O Functions}
 
