convertToSName: Utility functions used when generating code

convertToSNameR Documentation

Utility functions used when generating code

Description

These are simple utility functions that we use when processing types and Web service operations, etc. to create corresponding R code. These are exported for use in other packages such as SSOAP but are quite trivial.

convertToSName can be used to change the name of a variable to camel-back notation, i.e. removing \_ characters and capitalizing the first letter of the next "word".

simple.dQuote merely surrounds the string with quotes (\"). It avoids using fancyQuotes which can happen with dQuote in base.

discardNamespace ensures that the name from the XML element or attribute is the regular name with no namespace prefix.

Usage

convertToSName(name,
               useDash = if("UseDashInSOAPNames" %in% names(options()))
                             getOption("UseDashInSOAPNames")
                         else
                             TRUE)
discardNamespace(str)
simple.dQuote(x)

Arguments

name,x,str

the string to be processed

useDash

a logical value, and if TRUE then name is returned unaltered.

Value

A string.

Author(s)

Duncan Temple Lang


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