\HeaderA{writeThemesXML}{A function to author repository theme XML files}{writeThemesXML}
\keyword{utilities}{writeThemesXML}
\begin{Description}\relax
This function is used to generate XML files for use with repository
\code{\LinkA{themes}{themes}}.
\end{Description}
\begin{Usage}
\begin{verbatim}
writeThemesXML(themeList, repTXML = "repThemes.xml")
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{themeList}] A list describing the set of themes for a repository.
\item[\code{repTXML}] The XML output filename, defaults to \code{repThemes.xml}.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The \code{themeList} argument specifies the themes for a repository.
The names of the elements correspond to the theme names, and the
values of each element detail the structure of the theme.  Each
element is another list which itself has three elements:
\code{Description}, \code{Repository} and \code{Packages}.  The
\code{Description} element is a character string describing the theme,
and the \code{Repository} element is another character string giving
the URL of the repository that this theme belongs to.  The
\code{Packages} element is a third list with elements which are
either \code{\LinkA{pkgInfo}{pkgInfo}} objects or package names.

Specifying a \code{\LinkA{pkgInfo}{pkgInfo}} object as an entry is useful if the
repository maintainer wishes to use a particular version of a package
in their theme.  It a simple package name is given, then the highest
version of that particular package in the repository is the one that
is used.
\end{Details}
\begin{Value}
An XML file, name specified by \code{repTXML}, which contains a
description of the repository themes specified by \code{themeList}.
\end{Value}
\begin{Author}\relax
Jeff Gentry
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{repositoryThemes}{repositoryThemes}}, \code{\LinkA{reposTheme-class}{reposTheme.Rdash.class}},
\code{\LinkA{pkgInfo}{pkgInfo}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
   z <- list(Theme1=list(Description="One simple test",
                         Repository="http://www.repURL.com/",
                         Packages=list("Biobase", "Ruuid", "ROC", "geneplotter")),
             Theme2=list(Description="Another simple test",
                         Repository="http://www.repURL.com",
                         Packages=list(buildPkgInfo("annotate", "1.3.0"),
                         "genefilter", buildPkgInfo("affy", "1.3.0"))))
   ## Using tempfile() instead of default filename for example
   writeThemesXML(z, tempfile())
\end{ExampleCode}
\end{Examples}


