\name{xmlPretestDescription} \alias{xmlPretestDescription} \title{Generates XML code for a PretestDescription} \description{ This function creates an \code{\link[XML]{XMLNode}} containing the information found in the first argument which should be a \code{\link{PretestDescription}}. } \usage{ xmlPretestDescription(pd, toplevel = TRUE) } \arguments{ \item{pd}{A \code{PretestDescription} object.} \item{toplevel}{A logical flag, if true the appropriate XML namespace and schema attributes are added to the top level node.} } \details{ A Pretest Description (\code{pd.xml}) is an XML file describing the layout of a Comma Sparated Value file containing StatShop calibration pretest data. StatShop provides a java based tool for translating between CSV files and its own internal \code{cpd.xml} XML format. The Pretest Description file is used to drive the conversion. Column numbers in the CSV file are automatically generated using the supplied ordering. The function \code{nextPDColumn()} is used to generate column numbers. The function \code{xmlPretestDescription} produces produces an object of type \code{XMLNode} which can be written with \code{saveXML} (or \code{xmlWrite}). As this is the top level XML object, the constant \code{tdd.prefix} gives the namespace prefix and the constants \code{tdd.namespace} and \code{tdd.schemaLocation} provide details about the schema location. } \value{ An object of type \code{XMLNode} containing a \code{} element. } \references{ \url{http://research.ets.org/~ralmond/StatShop/dataFormats.html} } \author{Russell Almond} \section{Under Construction}{ Probably should replaced \code{integerCodes} argument with a function for more flexibility. This function used to work based on a Q-Matrix. That functionality has now been assigned to \code{\link{QtoPD}}. } \seealso{ \code{\link[XML]{XMLNode}}, \code{\link{nextPDColumn}} \code{\link{ECDID}}, \code{\link{pd.namespace}}, \code{\link{QtoPD}}, \code{\link{pd.prefix}}, \code{\link{pd.schemaLocation}}, \code{\link[XML]{saveXML}}, \code{\link{read.cpd.csv}}, } \examples{ \dontrun{ pdnode <- xmlPretestDescription(pd) saveXML(pdnode,paste(outdir,"demoReading.pd.xml", sep=.Platform$file.sep)) } } \keyword{interface}% at least one, from doc/KEYWORDS