File: dtdIsAttribute.Rd

package info (click to toggle)
r-cran-xml 3.99-0.19-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,688 kB
  • sloc: ansic: 6,659; xml: 2,890; asm: 486; sh: 12; makefile: 2
file content (50 lines) | stat: -rw-r--r-- 1,350 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
\name{dtdIsAttribute}
\alias{dtdIsAttribute}
\title{Query if a name is a valid attribute of a DTD element.}
\description{
  Examines the definition of the DTD element definition identified
by \code{element} to see if it supports an attribute named
\code{name}.
}
\usage{
dtdIsAttribute(name, element, dtd)
}
%- maybe also `usage' for other objects documented here.
\arguments{
  \item{name}{The name of the attribute being queried}
  \item{element}{The name of the element whose definition is to be used
to obtain the list of valid attributes.}
  \item{dtd}{The DTD containing the definition of the elements,
specifically \code{element}.}
}

\value{
 A logical value indicating if the
list of attributes suppported by the 
specified element has an entry named
\code{name}.
This does indicate what type of value
that attribute has, whether it is required, implied,
fixed, etc.
}
\references{\url{https://www.w3.org/XML/}, \url{http://www.jclark.com/xml/},
\url{https://www.omegahat.net}  }
\author{ Duncan Temple Lang }

\seealso{
\code{\link{parseDTD}},
\code{\link{dtdElement}},
\code{\link{xmlAttrs}}
}

\examples{
 dtdFile <- system.file("exampleData", "foo.dtd", package="XML")
 foo.dtd <- parseDTD(dtdFile)

    # true
  dtdIsAttribute("numRecords", "dataset", foo.dtd)

    # false
  dtdIsAttribute("date", "dataset", foo.dtd)
}
\keyword{file}