convertToSName: Utility functions used when generating code

Description Usage Arguments Value Author(s)

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

1
2
3
4
5
6
7
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


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