convertToSName           package:XMLSchema           R Documentation

_U_t_i_l_i_t_y _f_u_n_c_t_i_o_n_s _u_s_e_d _w_h_e_n _g_e_n_e_r_a_t_i_n_g _c_o_d_e

_D_e_s_c_r_i_p_t_i_o_n:

     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.

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

name,x,str: the string to be processed

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

_V_a_l_u_e:

     A string.

_A_u_t_h_o_r(_s):

     Duncan Temple Lang

