resolve: Lookup the definition of a type by name

Description Usage Arguments Value Author(s) See Also

Description

This takes the name of a XML schema type and looks through the schema information to find that type and return an R description for that type.

Usage

1
2
resolve(obj, context, namespaces = character(), recursive = TRUE,
        raiseError = TRUE, xrefInfo = NULL, type = NA, depth = 1L, ...)

Arguments

obj

the name of the type to search for

context

the overall schema/set of type information in which to lookup the name.

namespaces

a character vector of prefix = URI pairs allowing the name spaces from the XML nodes and type definitions to be resolved correctly

recursive

a logical value controlling whether sub-elements or slots within the resolved type are also resolved or left as names/references.

raiseError

a logical value controlling whether failure to find the type leads to an error or just NULL being returned. This gives the caller control when a type is not in the schema.

xrefInfo

an object representing the cross-references between data types. This is almost never specified by the R user but passed recursively within the calls to resolve and from higher-level functions that call resolve.

type

either a function or one of NULL or NA. If this is a function, this is used to filter possible matches. The primary purpose is to avoid matching Element objects with the same name as a data type definition in the schema. Without this, we would get into infinite loops. More generally, this allows us to select a particular entry in a schema in preference to others all with the same names. See XMLSchema:::notElementFun.

depth

an integer that indicates the depth of the recursion. This is used for aiding debugging infinite loops.

...

additional parameters to resolve that the methods can add

Value

An object of class SchemaType-class.

Author(s)

Duncan Temple Lang

See Also

processSchemaTypes


sckott/XMLSchema documentation built on May 29, 2019, 3:46 p.m.