
Last chance! 50% off unlimited learning
Sale ends in
This tests whether name
is a legitimate tag to use as a
direct sub-element of the element
tag according to the
definition of the element
element in the specified DTD. This
is a generic function that dispatches on the element type, so that
different version take effect for XMLSequenceContent
,
XMLOrContent
, XMLElementContent
.
dtdElementValidEntry(element, name, pos=NULL)
Logical value indicating whether the sub-element
can appear in an element
tag or not.
The XMLElementDef
defining the tag
in which we are asking whether the sub-element can be used.
The name of the sub-element about which we are
querying the list of sub-tags within element
.
An optional argument which, if supplied,
queries whether the name
sub-element is valid
as the pos
-th child of element
.
Duncan Temple Lang
This is not intended to be called directly, but
indirectly by the
dtdValidElement
function.
https://www.w3.org/XML/, http://www.jclark.com/xml/, https://www.omegahat.net
parseDTD
,
dtdValidElement
,
dtdElement
dtdFile <- system.file("exampleData", "foo.dtd",package="XML")
dtd <- parseDTD(dtdFile)
dtdElementValidEntry(dtdElement("variables",dtd), "variable")
Run the code above in your browser using DataLab