\name{xmlEvidenceModelSet} \alias{xmlEvidenceModelSet} \alias{xmlStudentModel} \title{Creates tags for models in AMD XML.} \description{ The function creates the references to the models for use in a StatShop Assessment Model Description (\code{amd.xml}) file. The function \code{xmlEvidenceModelSet} creates appropriate \code{} and \code{} or \code{} and \code{} elements for a \code{gmModel} object. The function \code{xmlStudentModel} creates appropriate \code{} element for a \code{gmModel} object. } \usage{ xmlEvidenceModelSet(em, smname, type = "EvidenceModel", emname = getECDIDModel(em$id)) xmlStudentModel(sm) } %- maybe also 'usage' for other objects documented here. \arguments{ \item{em}{A \code{gmModel} object describing a link or evidence model.} \item{smname}{Name of the student model this Evidence Model links to.} \item{type}{A string, one of \code{"EvidenceModel"}, \code{"LinkModel"} or \code{"LinkModelPrior"}.} \item{sm}{A \code{gmModel} object describing a student model.} \item{emname}{Name of the evidence model. Note the default expression only works for evidence models, for link models use \code{getECDIDtask()}} } \details{ StatShop models have two realizations in XML, an element in the \code{amd.xml} file and a complete \code{gm.xml} file giving all of the details. These functions create the appropriate elements for the AMD file. It is assumed that the name of the supporting GM file will be the name of the model with \code{gm.xml} appended. } \value{ An \code{XMLNode} object suitable for including in a \code{AssessmentDescription} object. } \references{ \url{http://research.ets.org/~ralmond/StatShop/dataFormats.html} } \author{Russell Almond} \section{Under Construction}{ The \code{} and \code{} set elements are part of a largely unused mechansim for allowing multiple evidence models per task model. (This was used in Biomass, but not in subsequent projects). This is not yet supported. } \seealso{\code{\link{gmModel}},\code{\link{parseGmModel}} } \examples{ StatShop <- Sys.getenv("STATSHOP") if (StatShop == "") { warn("StatShop not installed, skipping test.") } else { fc <- file.path(StatShop,"TestScripts","ICT","Version0","Hybrid","FixedContext") ## This command finds the name of the AMD files in the current ## directory. Rest of the script assumes that the first one is the ## one you want to use. amds <- list.files(fc,pattern=".amd.xml$") ## This version of the command for Assessment Description files, it ## looks at link models. anAmp <- parseAMD(file.path(fc,amds[1])) ## XML for the first student model. xmlStudentModel(anAmp$studentModels[[1]]) ## XML for all the link models lapply(anAmp$linkModels, function(e) xmlEvidenceModelSet(e,smname,"LinkModel", getECDIDtask(e))) } } \keyword{interface}% at least one, from doc/KEYWORDS