Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Doctype

Constructor for DTD reference


Description

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.

Usage

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

Arguments

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

Value

An object of class Doctype.

Author(s)

Duncan Temple Lang

References

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

See Also

Examples

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")

XML

Tools for Parsing and Generating XML Within R and S-Plus

v3.99-0.10
BSD_3_clause + file LICENSE
Authors
CRAN Team [ctb, cre] (de facto maintainer since 2013), Duncan Temple Lang [aut] (<https://orcid.org/0000-0003-0159-1546>), Tomas Kalibera [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.