processSchemaType: Assemble R descriptions of XML Schema types

processSchemaTypeR Documentation

Assemble R descriptions of XML Schema types

Description

These functions take an XML document or node and process the details in the XML schema to create an R description of the information about the types or type described with the schema.

Usage

processSchemaType(type, types, substitutionGroups = NULL, namespaceDefs = list(),
                   targetNamespace = character(), elementFormDefault = NA,
                    localElements = FALSE)
processSchemaTypes(node, doc = xmlDoc(node), namespaceDefs = gatherNamespaceDefs(node),
                    createConverters = FALSE, verbose = FALSE, types = NULL,
                     elementFormDefault = TRUE, targetNamespace = findTargetNamespace(node),
                      substitutionGroups = getSubstitutionGroups(doc),
                       checkCircularTypes = TRUE, ...)

Arguments

type

an XML node describing the schema type to be processed

types

the collection of all XML nodes in the schema which are used to to find/resolve references in type and its sub-nodes to other types within the schema.

node

the top-leve XML node of the schema to be processed.

doc

the parsed XML document in which the schema are defined. This is a reference to a C-level document. See the XML package and xmlParse.

substitutionGroups

XXX

namespaceDefs

the name space prefix = URI pairs that are in effect for the document and its nodes. This can be a named character vector or it might also be a list of XMLNamespaceDefinition objects The nodes may (re)define prefixes, but these give us the top-level pairs.

createConverters

a logical value indicating whether, for each type in the schema, to create the functions that convert an XML node to a corresponding R object.

verbose

a logical value indicating whether to emit information about the element currently being processed. This is passed to processSchemaTypes.

targetNamespace

the name of the default namespace for the schema. This is used when creating the nodes for elements coming from this schema.

elementFormDefault

a logical value or string such as "qualified" that comes from the schema-level node and indicates whether the elements should use the targetNamespace or not.

localElements

a logical value that controls whether element terms in the schema are considered to be global or local (TRUE). Local elements are those that are not at the top-level of the schema.

...

additional arguments passed on to readSchema.

checkCircularTypes

a logical value that controls whether we check for circular references in the defitions of data types, e.g. where type B has a field of type A and type A has a field of type B or perhaps more indirectly via a separate type C.

Value

processSchemaType returns an object derived from SchemaType.

processSchemaTypes returns a list.

Author(s)

Duncan Temple Lang

References

The XML schema specification at http://www.w3.org/XML/Schema. A tutorial at http://www.w3schools.com/Schema/default.asp. Book “The definitive XML Schema”, Priscilla Walmsley, Prentice Hall.

See Also

readSchema The SSOAP package and processing a WSDL document.


omegahat/XMLSchema documentation built on Jan. 17, 2024, 7:08 p.m.