Doctype                 package:XML                 R Documentation

_C_o_n_s_t_r_u_c_t_o_r _f_o_r _D_T_D _r_e_f_e_r_e_n_c_e

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

     This is a constructor for the 'Doctype' class that can be provided
     at the top of an XML document to provide information about the
     class of document, i.e. its DTD or schema. Also, there is a method
     for converting such a 'Doctype' object to a character string.

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

     Doctype(system = character(), public = character(), name = "")

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

  system: the system URI that locates the DTD. 

  public: the identifier for locating the DTD in a catalog, for
          example. This should be a character vector of length 2,
          giving the public identifier and a URI.  If just the public
          identifier is given and a string is given for 'system'
          argument, the 'system' value is used as the second element of
          'public'. The public identifer should be of the form
          '+//creator//name//language' where the first element is
          either + or -, and the language is described by a code in the
          ISO 639 document. 

    name: the name of the root element in the document. This should be
          the first parameter, but is left this way for backward
          compatability.  And 

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

     An object of class 'Doctype'.

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

     Duncan Temple Lang

_R_e_f_e_r_e_n_c_e_s:

     <URL: http://www.w3.org/XML> XML Elements of Style, Simon St.
     Laurent.

_S_e_e _A_l_s_o:

     'saveXML'

_E_x_a_m_p_l_e_s:

       d = Doctype(name = "section", public = c("-//OASIS//DTD DocBook XML V4.2//EN", "http://oasis-open.org/docbook/xml/4.2/docbookx.dtd"))
       as(d, "character")

        # this call switches the system to the URI associated with the PUBLIC element.
       d = Doctype(name = "section", public = c("-//OASIS//DTD DocBook XML V4.2//EN"), system = "http://oasis-open.org/docbook/xml/4.2/docbookx.dtd")

