EVOLUTION-MANAGER
Edit File: dtdValidElement.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Determines whether an XML tag is valid within another.</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for dtdValidElement {XML}"><tr><td>dtdValidElement {XML}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Determines whether an XML tag is valid within another.</h2> <h3>Description</h3> <p>This tests whether <code>name</code> is a legitimate tag to use as a direct sub-element of the <code>within</code> tag according to the definition of the <code>within</code> element in the specified DTD. </p> <h3>Usage</h3> <pre> dtdValidElement(name, within, dtd, pos=NULL) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>name</code></td> <td> <p>The name of the tag which is to be inserted inside the <code>within</code> tag.</p> </td></tr> <tr valign="top"><td><code>within</code></td> <td> <p>The name of the parent tag the definition of which we are checking to determine if it contains <code>name</code>.</p> </td></tr> <tr valign="top"><td><code>dtd</code></td> <td> <p>The DTD in which the elements <code>name</code> and <code>within</code> are defined. </p> </td></tr> <tr valign="top"><td><code>pos</code></td> <td> <p> An optional position at which we might add the <code>name</code> element inside <code>within</code>. If this is specified, we have a stricter test that accounds for sequences in which elements must appear in order. These are comma-separated entries in the element definition.</p> </td></tr> </table> <h3>Details</h3> <p>This applies to direct sub-elements or children of the <code>within</code> tag and not tags nested within children of that tag, i.e. descendants. </p> <h3>Value</h3> <p>Returns a logical value. TRUE indicates that a <code>name</code> element can be used inside a <code>within</code> element. FALSE indicates that it cannot. </p> <h3>Author(s)</h3> <p> Duncan Temple Lang </p> <h3>References</h3> <p><a href="http://www.w3.org/XML">http://www.w3.org/XML</a>, <a href="http://www.jclark.com/xml">http://www.jclark.com/xml</a>, <a href="http://www.omegahat.net">http://www.omegahat.net</a> </p> <h3>See Also</h3> <p><code><a href="parseDTD.html">parseDTD</a></code>, <code><a href="dtdElement.html">dtdElement</a></code>, <code><a href="dtdElementValidEntry.html">dtdElementValidEntry</a></code>, </p> <h3>Examples</h3> <pre> 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) </pre> <hr /><div style="text-align: center;">[Package <em>XML</em> version 3.99-0.3 <a href="00Index.html">Index</a>]</div> </body></html>