Sophie

Sophie

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

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="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.namespace_scope</title>
</head>
<body>
<div class="navbar">&nbsp;<a class="up" href="Pxp_dtd.html" title="Pxp_dtd">Up</a>
&nbsp;</div>
<h1>Class type <a href="type_Pxp_dtd.namespace_scope.html">Pxp_dtd.namespace_scope</a></h1>
<pre><span id="TYPEnamespace_scope"><span class="keyword">class type</span> namespace_scope</span> = <code class="code"><span class="keyword">object</span></code> <a href="Pxp_dtd.namespace_scope-c.html">..</a> <code class="code"><span class="keyword">end</span></code></pre>The recursive class type <code class="code">namespace_scope</code> represents the original
 namespace declarations found in the XML text. A single <code class="code">namespace_scope</code>
 object contains a list of declared namespaces
 <code class="code">&nbsp;[&nbsp;(dp1,&nbsp;uri1);&nbsp;(dp2;&nbsp;uri2);&nbsp;...&nbsp;]&nbsp;</code>
 corresponding to the "xmlns"-type declarations found in a single
 XML element:
 <code class="code">&nbsp;&lt;element&nbsp;xmlns:dp1=<span class="string">"uri1"</span>&nbsp;xmlns:dp2=<span class="string">"uri2"</span>&nbsp;...&nbsp;&gt;&nbsp;</code>
 For the declaration of a default namespace <code class="code">xmlns=<span class="string">"uri"</span></code> the pair
 <code class="code">(<span class="string">""</span>,uri)</code> must be included in the list. The special pair <code class="code">(<span class="string">""</span>,<span class="string">""</span>)</code>
 means that the former default namespace is "undeclared".
<p>

 Furthermore, the <code class="code">namespace_scope</code> object may have a parent 
 <code class="code">namespace_scope</code>, representing the namespace declarations in the
 surrounding XML text. <code class="code">namespace_scope</code> objects are intentionally
 immutable. When some XML subtree is cut out of a document
 and inserted into another document, the original <code class="code">namespace_scope</code>
 declarations (including
 all parents) are still applied to the subtree when it is in the
 new document. Further changes in the old document cannot break this
 assertion because of the immutability.
<p>

 The <code class="code">namespace_scope</code> objects are connected with the <code class="code">namespace_manager</code>
 to allow translations from the namespace prefixes found in the XML
 text (also called "display prefixes" from now on) to the normalized
 prefixes stored in the <code class="code">namespace_manager</code>, and vice versa.
<p>

 Call <a href="Pxp_dtd.html#VALcreate_namespace_scope"><code class="code"><span class="constructor">Pxp_dtd</span>.create_namespace_scope</code></a> to create a scope object using
 the default implementation.
<p>

 See <a href="Intro_namespaces.html"><code class="code"><span class="constructor">Intro_namespaces</span></code></a> for an introduction to namespaces and more
 links to other explanations about scopes.<br>
<hr width="100%">
<pre><span id="METHODnamespace_manager"><span class="keyword">method</span> namespace_manager</span> : <code class="type"><a href="Pxp_dtd.namespace_manager-c.html">namespace_manager</a></code></pre><div class="info">
Returns the <code class="code">namespace_manager</code> to which this scope object is
 connected<br>
</div>
<pre><span id="METHODparent_scope"><span class="keyword">method</span> parent_scope</span> : <code class="type"><a href="Pxp_dtd.namespace_scope-c.html">namespace_scope</a> option</code></pre><div class="info">
Returns the parent object, if any<br>
</div>
<pre><span id="METHODdeclaration"><span class="keyword">method</span> declaration</span> : <code class="type">(string * string) list</code></pre><div class="info">
Returns the list of namespace declarations of this scope (i.e.
 the declarations in parent objects are not considered). The
 list contains pairs <code class="code"> (display_prefix, uri) </code>.<br>
</div>
<pre><span id="METHODeffective_declaration"><span class="keyword">method</span> effective_declaration</span> : <code class="type">(string * string) list</code></pre><div class="info">
Returns the list of namespace declarations of this scope and
 all parent scopes. The list contains pairs <code class="code"> (display_prefix, uri) </code>.
 Prefixes hidden by earlier declarations are suppressed in the list<br>
</div>
<pre><span id="METHODdisplay_prefix_of_uri"><span class="keyword">method</span> display_prefix_of_uri</span> : <code class="type">string -> string</code></pre><div class="info">
Translates the URI to the corresponding display prefix as declared
 in this object or any parent object. Raises <code class="code"><span class="constructor">Namespace_not_in_scope</span></code>
 when the declaration cannot be found.<br>
</div>
<pre><span id="METHODdisplay_prefix_of_normprefix"><span class="keyword">method</span> display_prefix_of_normprefix</span> : <code class="type">string -> string</code></pre><div class="info">
Translates the normalized prefix to the corresponding display
 prefix as declared in this object or any parent object. Raises
 <code class="code"><span class="constructor">Namespace_not_in_scope</span></code> when the declaration cannot be found, and
 <code class="code"><span class="constructor">Namespace_prefix_not_managed</span></code> when the
 normalized prefix is unknown to the namespace manager.<br>
</div>
<pre><span id="METHODuri_of_display_prefix"><span class="keyword">method</span> uri_of_display_prefix</span> : <code class="type">string -> string</code></pre><div class="info">
Translates the display prefix to the corresponding URI as
 declared in this object or any parent object. Raises
 <code class="code"><span class="constructor">Not_found</span></code> when the declaration cannot be found.<br>
</div>
<pre><span id="METHODnormprefix_of_display_prefix"><span class="keyword">method</span> normprefix_of_display_prefix</span> : <code class="type">string -> string</code></pre><div class="info">
Translates the display prefix to the corresponding normalized
 prefix as declared in this object or any parent object. Raises
 <code class="code"><span class="constructor">Not_found</span></code> when the declaration cannot be found, and
 <code class="code"><span class="constructor">Namespace_not_managed</span></code> when the
 namespace manager does not know the namespace.<br>
</div>
</body></html>