Sophie

Sophie

distrib > Mageia > 3 > x86_64 > by-pkgid > 334c73eb2cbee096307b926bf8d6e67a > files > 122

ocaml-pxp-devel-1.2.3-5.mga3.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="Pxp_dtd.dtd-c.html">
<link rel="next" href="Pxp_dtd.dtd_notation-c.html">
<link rel="Up" href="Pxp_dtd.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of classes" rel=Appendix href="index_classes.html">
<link title="Index of class types" rel=Appendix href="index_class_types.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="Pxp_types" rel="Chapter" href="Pxp_types.html">
<link title="Pxp_document" rel="Chapter" href="Pxp_document.html">
<link title="Pxp_dtd" rel="Chapter" href="Pxp_dtd.html">
<link title="Pxp_tree_parser" rel="Chapter" href="Pxp_tree_parser.html">
<link title="Pxp_core_types" rel="Chapter" href="Pxp_core_types.html">
<link title="Pxp_ev_parser" rel="Chapter" href="Pxp_ev_parser.html">
<link title="Pxp_event" rel="Chapter" href="Pxp_event.html">
<link title="Pxp_dtd_parser" rel="Chapter" href="Pxp_dtd_parser.html">
<link title="Pxp_codewriter" rel="Chapter" href="Pxp_codewriter.html">
<link title="Pxp_marshal" rel="Chapter" href="Pxp_marshal.html">
<link title="Pxp_yacc" rel="Chapter" href="Pxp_yacc.html">
<link title="Pxp_reader" rel="Chapter" href="Pxp_reader.html">
<link title="Intro_trees" rel="Chapter" href="Intro_trees.html">
<link title="Intro_extensions" rel="Chapter" href="Intro_extensions.html">
<link title="Intro_namespaces" rel="Chapter" href="Intro_namespaces.html">
<link title="Intro_events" rel="Chapter" href="Intro_events.html">
<link title="Intro_resolution" rel="Chapter" href="Intro_resolution.html">
<link title="Intro_getting_started" rel="Chapter" href="Intro_getting_started.html">
<link title="Intro_advanced" rel="Chapter" href="Intro_advanced.html">
<link title="Intro_preprocessor" rel="Chapter" href="Intro_preprocessor.html">
<link title="Example_readme" rel="Chapter" href="Example_readme.html"><title>PXP Reference : Pxp_dtd.dtd_element</title>
</head>
<body>
<div class="navbar"><a class="pre" href="Pxp_dtd.dtd-c.html" title="Pxp_dtd.dtd">Previous</a>
&nbsp;<a class="up" href="Pxp_dtd.html" title="Pxp_dtd">Up</a>
&nbsp;<a class="post" href="Pxp_dtd.dtd_notation-c.html" title="Pxp_dtd.dtd_notation">Next</a>
</div>
<h1>Class <a href="type_Pxp_dtd.dtd_element.html">Pxp_dtd.dtd_element</a></h1>
<pre><span name="TYPEdtd_element"><span class="keyword">class</span> dtd_element</span> : <code class="type"><a href="Pxp_dtd.dtd-c.html">dtd</a> -> string -> </code><code class="code"><span class="keyword">object</span></code> <a href="Pxp_dtd.dtd_element-c.html">..</a> <code class="code"><span class="keyword">end</span></code></pre>A single element declaration that can be added to the DTD object.
 Element declarations are created by
   <code class="code">&nbsp;<span class="keyword">new</span>&nbsp;dtd_element&nbsp;init_dtd&nbsp;init_name&nbsp;</code>
 This creates a new <code class="code">dtd_element</code> object for <code class="code">init_dtd</code> with <code class="code">init_name</code>.
 The strings are represented in the same encoding as <code class="code">init_dtd</code>.<br>
<hr width="100%">
<pre><span id="METHODname"><span class="keyword">method</span> name</span> : <code class="type">string</code></pre><div class="info">
returns the name of the declared element<br>
</div>
<pre><span id="METHODexternally_declared"><span class="keyword">method</span> externally_declared</span> : <code class="type">bool</code></pre><div class="info">
returns whether the element declaration occurs in an external
 entity.<br>
</div>
<pre><span id="METHODcontent_model"><span class="keyword">method</span> content_model</span> : <code class="type">Pxp_core_types.I.content_model_type</code></pre><div class="info">
get the content model of this element declaration, or <code class="code"><span class="constructor">Unspecified</span></code><br>
</div>
<pre><span id="METHODcontent_dfa"><span class="keyword">method</span> content_dfa</span> : <code class="type">Pxp_dfa.dfa_definition option</code></pre><div class="info">
return the DFA of the content model if there is a DFA, or <code class="code"><span class="constructor">None</span></code>.
 A DFA exists only for regexp style content models which are
 deterministic.<br>
</div>
<pre><span id="METHODset_cm_and_extdecl"><span class="keyword">method</span> set_cm_and_extdecl</span> : <code class="type">Pxp_core_types.I.content_model_type -> bool -> unit</code></pre><div class="info">
<code class="code">set_cm_and_extdecl cm extdecl</code>:
 set the content model to <code class="code">cm</code>. Once the content model is not 
 <code class="code"><span class="constructor">Unspecified</span></code>, it cannot be set to a different value again.
 Furthermore, it is set whether the element occurs in an external
 entity (<code class="code">extdecl</code>).<br>
</div>
<pre><span id="METHODencoding"><span class="keyword">method</span> encoding</span> : <code class="type">Pxp_core_types.I.rep_encoding</code></pre><div class="info">
Return the encoding of the strings<br>
</div>
<pre><span id="METHODallow_arbitrary"><span class="keyword">method</span> allow_arbitrary</span> : <code class="type">unit</code></pre><div class="info">
This method sets the <code class="code">arbitrary_allowed</code> flag for this element.
 The effect of this flag is to ignore the validation constraint
 that attributes for this element needs to be declared. Note that
 this mode is not required for implementing the well-formedness
 mode, because for this it is already sufficient to set the
 same-named flag in the global DTD object. Setting this flag for
 certain elements may still be useful, however. It is then possible
 to allow arbitrary attributes for certain elements only.
<p>

 Technically, the <code class="code">arbitrary_allowed</code> flag changes the behaviour of
 the <code class="code">attribute</code> method defined below so that it
 raises <code class="code"><span class="constructor">Undeclared</span></code> instead of <code class="code"><span class="constructor">Validation_error</span></code> when an unknown
 attribute name is encountered.<br>
</div>
<pre><span id="METHODdisallow_arbitrary"><span class="keyword">method</span> disallow_arbitrary</span> : <code class="type">unit</code></pre><div class="info">
Clears the <code class="code">arbitrary_allowed</code> flag<br>
</div>
<pre><span id="METHODarbitrary_allowed"><span class="keyword">method</span> arbitrary_allowed</span> : <code class="type">bool</code></pre><div class="info">
Returns whether arbitrary attributes are allowed or not.<br>
</div>
<pre><span id="METHODattribute"><span class="keyword">method</span> attribute</span> : <code class="type">string -> Pxp_core_types.I.att_type * Pxp_core_types.I.att_default</code></pre><div class="info">
get the type and default value of a declared attribute, or raise
 <code class="code"><span class="constructor">Validation_error</span></code> if the attribute does not exist.
 If the <code class="code">arbitrary_allowed</code> flag is set, the exception <code class="code"><span class="constructor">Undeclared</span></code> 
 is raised instead of <code class="code"><span class="constructor">Validation_error</span></code>.<br>
</div>
<pre><span id="METHODattribute_violates_standalone_declaration"><span class="keyword">method</span> attribute_violates_standalone_declaration</span> : <code class="type">string -> string option -> bool</code></pre><div class="info">
<code class="code">attribute_violates_standalone_declaration name v</code>:
 Checks whether the attribute <code class="code">name</code> violates the standalone
 declaration if it has value <code class="code">v</code>.
 The method returns true if:<ul>
<li>The attribute declaration occurs in an external entity,</li>
</ul>

 and if one of the two conditions holds:<ul>
<li><code class="code">v = <span class="constructor">None</span></code>, and there is a default for the attribute value</li>
<li><code class="code">v = <span class="constructor">Some</span> s</code>, and the type of the attribute is not CDATA,
   and <code class="code">s</code> changes if normalized according to the rules of the
   attribute type.</li>
</ul>

 The method raises <code class="code"><span class="constructor">Validation_error</span></code> if the attribute does not exist.
 If the <code class="code">arbitrary_allowed</code> flag is set, the exception <code class="code"><span class="constructor">Undeclared</span></code> 
 is raised instead of <code class="code"><span class="constructor">Validation_error</span></code>.<br>
</div>
<pre><span id="METHODattribute_names"><span class="keyword">method</span> attribute_names</span> : <code class="type">string list</code></pre><div class="info">
get the list of all declared attributes<br>
</div>
<pre><span id="METHODnames_of_required_attributes"><span class="keyword">method</span> names_of_required_attributes</span> : <code class="type">string list</code></pre><div class="info">
get the list of all attributes that are specified as required 
 attributes<br>
</div>
<pre><span id="METHODid_attribute_name"><span class="keyword">method</span> id_attribute_name</span> : <code class="type">string option</code></pre><div class="info">
Returns the name of the attribute with type ID, or <code class="code"><span class="constructor">None</span></code>.<br>
</div>
<pre><span id="METHODidref_attribute_names"><span class="keyword">method</span> idref_attribute_names</span> : <code class="type">string list</code></pre><div class="info">
Returns the names of the attributes with type IDREF or IDREFS.<br>
</div>
<pre><span id="METHODadd_attribute"><span class="keyword">method</span> add_attribute</span> : <code class="type">string -><br>       Pxp_core_types.I.att_type -> Pxp_core_types.I.att_default -> bool -> unit</code></pre><div class="info">
<code class="code">add_attribute name <span class="keyword">type</span> default extdecl</code>:
 add an attribute declaration for an attribute with the given name,
 type, and default value. If there is more than one declaration for
 an attribute name, the first declaration counts; the other declarations
 are ignored.
<p>

 <code class="code">extdecl</code>: if true, the attribute declaration occurs in an external
 entity. This property is used to check the "standalone" attribute.<br>
</div>
<pre><span id="METHODvalidate"><span class="keyword">method</span> validate</span> : <code class="type">unit</code></pre><div class="info">
checks whether this element declaration (i.e. the content model and
 all attribute declarations) is valid for the associated DTD.
 Raises mostly <code class="code"><span class="constructor">Validation_error</span></code> if the validation fails.<br>
</div>
</body></html>