defineClasses {XMLSchema}R Documentation

Define R classes corresponding to XML schema types

Description

This function maps SOAPType-class objects describing XML schema types to R class definitions within the existing R session.

Usage

defineClasses(types, where = globalenv(), namespaceDefs = list(), verbose = FALSE, baseClass = "VirtualSOAPClass", force = FALSE)

Arguments

types a list of SOAPType-class objects describing the XML schema types.
where the environment in which the new R class definitions should be defined and assigned. This is passed as the value of the where parameter in the call to setClass.
namespaceDefs a character vector giving the prefix = URI pairs which are used to compare the namespaces in the SOAPType-class objects with those in the standard schema, i.e. XSD.
verbose a logical value indicating whether to emit messages on the console as classes are defined.
baseClass the name of the base class which is added to the contains vector for each new class. This allows all the newly defined classes to have a common base class, perhaps with multiple inheritance. This can be used to define methods for all these classes and instances. For example, we might provide a documentation method that provides the help from the XML schema's annotation nodes.
force a logical value. By default, if there is an existing R class with a name corresponding to a SOAPType-class object, this function does not redefine it. This means that when one runs the function a second time, the classes are not redefined. To override this, use force = TRUE.

Value

A list with the class definitions. This function is run more for its side-effect of defining new classes.

Author(s)

Duncan Temple Lang


[Package XMLSchema version 0.1-0 Index]