name
is a legitimate tag
to use as a direct sub-element of the within
tag
according to the definition of the within
element in the specified DTD.dtdValidElement(name, within, dtd, pos=NULL)
name
element
can be used inside a within
element.
FALSE indicates that it cannot.within
tag and not tags nested
within children of that tag, i.e. descendants.parseDTD
,
dtdElement
,
dtdElementValidEntry
,dtdFile <- system.file("exampleData", "foo.dtd", package="XML")
foo.dtd <- parseDTD(dtdFile)
# The following are true.
dtdValidElement("variable","variables", dtd = foo.dtd)
dtdValidElement("record","dataset", dtd = foo.dtd)
# This is false.
dtdValidElement("variable","dataset", dtd = foo.dtd)
Run the code above in your browser using DataLab