16c709d1fe899e52d916738ba0e8125e9bf12688
[platform/upstream/python-lxml.git] / doc / html / api / lxml.etree.RelaxNG-class.html
1 <?xml version="1.0" encoding="ascii"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3           "DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5 <head>
6   <title>lxml.etree.RelaxNG</title>
7   <link rel="stylesheet" href="epydoc.css" type="text/css" />
8   <script type="text/javascript" src="epydoc.js"></script>
9 </head>
10
11 <body bgcolor="white" text="black" link="blue" vlink="#204080"
12       alink="#204080">
13 <!-- ==================== NAVIGATION BAR ==================== -->
14 <table class="navbar" border="0" width="100%" cellpadding="0"
15        bgcolor="#a0c0ff" cellspacing="0">
16   <tr valign="middle">
17   <!-- Home link -->
18       <th>&nbsp;&nbsp;&nbsp;<a
19         href="lxml-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
20
21   <!-- Tree link -->
22       <th>&nbsp;&nbsp;&nbsp;<a
23         href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
24
25   <!-- Index link -->
26       <th>&nbsp;&nbsp;&nbsp;<a
27         href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
28
29   <!-- Help link -->
30       <th>&nbsp;&nbsp;&nbsp;<a
31         href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
32
33   <!-- Project homepage -->
34       <th class="navbar" align="right" width="100%">
35         <table border="0" cellpadding="0" cellspacing="0">
36           <tr><th class="navbar" align="center"
37             ><a class="navbar" target="_top" href="/">lxml API</a></th>
38           </tr></table></th>
39   </tr>
40 </table>
41 <table width="100%" cellpadding="0" cellspacing="0">
42   <tr valign="top">
43     <td width="100%">
44       <span class="breadcrumbs">
45         <a href="lxml-module.html">Package&nbsp;lxml</a> ::
46         <a href="lxml.etree-module.html">Module&nbsp;etree</a> ::
47         Class&nbsp;RelaxNG
48       </span>
49     </td>
50     <td>
51       <table cellpadding="0" cellspacing="0">
52         <!-- hide/show private -->
53         <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
54     onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
55         <tr><td align="right"><span class="options"
56             >[<a href="frames.html" target="_top">frames</a
57             >]&nbsp;|&nbsp;<a href="lxml.etree.RelaxNG-class.html"
58             target="_top">no&nbsp;frames</a>]</span></td></tr>
59       </table>
60     </td>
61   </tr>
62 </table>
63 <!-- ==================== CLASS DESCRIPTION ==================== -->
64 <h1 class="epydoc">Class RelaxNG</h1><p class="nomargin-top"></p>
65 <pre class="base-tree">
66 object --+    
67          |    
68 <a href="lxml.etree._Validator-class.html" onclick="show_private();">_Validator</a> --+
69              |
70             <strong class="uidshort">RelaxNG</strong>
71 </pre>
72
73 <hr />
74 <p>RelaxNG(self, etree=None, file=None)
75 Turn a document into a Relax NG validator.</p>
76 <p>Either pass a schema as Element or ElementTree, or pass a file or
77 filename through the <tt class="rst-docutils literal">file</tt> keyword argument.</p>
78
79 <!-- ==================== INSTANCE METHODS ==================== -->
80 <a name="section-InstanceMethods"></a>
81 <table class="summary" border="1" cellpadding="3"
82        cellspacing="0" width="100%" bgcolor="white">
83 <tr bgcolor="#70b0f0" class="table-header">
84   <td colspan="2" class="table-header">
85     <table border="0" cellpadding="0" cellspacing="0" width="100%">
86       <tr valign="top">
87         <td align="left"><span class="table-header">Instance Methods</span></td>
88         <td align="right" valign="top"
89          ><span class="options">[<a href="#section-InstanceMethods"
90          class="privatelink" onclick="toggle_private();"
91          >hide private</a>]</span></td>
92       </tr>
93     </table>
94   </td>
95 </tr>
96 <tr>
97     <td width="15%" align="right" valign="top" class="summary">
98       <span class="summary-type">&nbsp;</span>
99     </td><td class="summary">
100       <table width="100%" cellpadding="0" cellspacing="0" border="0">
101         <tr>
102           <td><span class="summary-sig"><a href="lxml.etree.RelaxNG-class.html#__call__" class="summary-sig-name">__call__</a>(<span class="summary-sig-arg">self</span>,
103         <span class="summary-sig-arg">etree</span>)</span><br />
104       Validate doc using Relax NG.</td>
105           <td align="right" valign="top">
106             
107             
108           </td>
109         </tr>
110       </table>
111       
112     </td>
113   </tr>
114 <tr>
115     <td width="15%" align="right" valign="top" class="summary">
116       <span class="summary-type">&nbsp;</span>
117     </td><td class="summary">
118       <table width="100%" cellpadding="0" cellspacing="0" border="0">
119         <tr>
120           <td><span class="summary-sig"><a href="lxml.etree.RelaxNG-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
121         <span class="summary-sig-arg">etree</span>=<span class="summary-sig-default">None</span>,
122         <span class="summary-sig-arg">file</span>=<span class="summary-sig-default">None</span>)</span><br />
123       x.__init__(...) initializes x; see help(type(x)) for signature</td>
124           <td align="right" valign="top">
125             
126             
127           </td>
128         </tr>
129       </table>
130       
131     </td>
132   </tr>
133 <tr>
134     <td width="15%" align="right" valign="top" class="summary">
135       <span class="summary-type">a new object with type S, a subtype of T</span>
136     </td><td class="summary">
137       <table width="100%" cellpadding="0" cellspacing="0" border="0">
138         <tr>
139           <td><span class="summary-sig"><a href="lxml.etree.RelaxNG-class.html#__new__" class="summary-sig-name">__new__</a>(<span class="summary-sig-arg">T</span>,
140         <span class="summary-sig-arg">S</span>,
141         <span class="summary-sig-arg">...</span>)</span></td>
142           <td align="right" valign="top">
143             
144             
145           </td>
146         </tr>
147       </table>
148       
149     </td>
150   </tr>
151   <tr>
152     <td colspan="2" class="summary">
153     <p class="indent-wrapped-lines"><b>Inherited from <code><a href="lxml.etree._Validator-class.html" onclick="show_private();">_Validator</a></code></b>:
154       <code><a href="lxml.etree._Validator-class.html#assertValid">assertValid</a></code>,
155       <code><a href="lxml.etree._Validator-class.html#assert_">assert_</a></code>,
156       <code><a href="lxml.etree._Validator-class.html#validate">validate</a></code>
157       </p>
158     <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="lxml.etree._Validator-class.html" onclick="show_private();">_Validator</a></code></b> (private):
159       <code><a href="lxml.etree._Validator-class.html#_append_log_message" onclick="show_private();">_append_log_message</a></code>,
160       <code><a href="lxml.etree._Validator-class.html#_clear_error_log" onclick="show_private();">_clear_error_log</a></code>
161       </p></div>
162     <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
163       <code>__delattr__</code>,
164       <code>__format__</code>,
165       <code>__getattribute__</code>,
166       <code>__hash__</code>,
167       <code>__reduce__</code>,
168       <code>__reduce_ex__</code>,
169       <code>__repr__</code>,
170       <code>__setattr__</code>,
171       <code>__sizeof__</code>,
172       <code>__str__</code>,
173       <code>__subclasshook__</code>
174       </p>
175     </td>
176   </tr>
177 </table>
178 <!-- ==================== CLASS METHODS ==================== -->
179 <a name="section-ClassMethods"></a>
180 <table class="summary" border="1" cellpadding="3"
181        cellspacing="0" width="100%" bgcolor="white">
182 <tr bgcolor="#70b0f0" class="table-header">
183   <td colspan="2" class="table-header">
184     <table border="0" cellpadding="0" cellspacing="0" width="100%">
185       <tr valign="top">
186         <td align="left"><span class="table-header">Class Methods</span></td>
187         <td align="right" valign="top"
188          ><span class="options">[<a href="#section-ClassMethods"
189          class="privatelink" onclick="toggle_private();"
190          >hide private</a>]</span></td>
191       </tr>
192     </table>
193   </td>
194 </tr>
195 <tr>
196     <td width="15%" align="right" valign="top" class="summary">
197       <span class="summary-type">&nbsp;</span>
198     </td><td class="summary">
199       <table width="100%" cellpadding="0" cellspacing="0" border="0">
200         <tr>
201           <td><span class="summary-sig"><a href="lxml.etree.RelaxNG-class.html#from_rnc_string" class="summary-sig-name">from_rnc_string</a>(<span class="summary-sig-arg">...</span>)</span><br />
202       Parse a RelaxNG schema in compact syntax from a text string</td>
203           <td align="right" valign="top">
204             
205             
206           </td>
207         </tr>
208       </table>
209       
210     </td>
211   </tr>
212 </table>
213 <!-- ==================== PROPERTIES ==================== -->
214 <a name="section-Properties"></a>
215 <table class="summary" border="1" cellpadding="3"
216        cellspacing="0" width="100%" bgcolor="white">
217 <tr bgcolor="#70b0f0" class="table-header">
218   <td colspan="2" class="table-header">
219     <table border="0" cellpadding="0" cellspacing="0" width="100%">
220       <tr valign="top">
221         <td align="left"><span class="table-header">Properties</span></td>
222         <td align="right" valign="top"
223          ><span class="options">[<a href="#section-Properties"
224          class="privatelink" onclick="toggle_private();"
225          >hide private</a>]</span></td>
226       </tr>
227     </table>
228   </td>
229 </tr>
230   <tr>
231     <td colspan="2" class="summary">
232     <p class="indent-wrapped-lines"><b>Inherited from <code><a href="lxml.etree._Validator-class.html" onclick="show_private();">_Validator</a></code></b>:
233       <code><a href="lxml.etree._Validator-class.html#error_log">error_log</a></code>
234       </p>
235     <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
236       <code>__class__</code>
237       </p>
238     </td>
239   </tr>
240 </table>
241 <!-- ==================== METHOD DETAILS ==================== -->
242 <a name="section-MethodDetails"></a>
243 <table class="details" border="1" cellpadding="3"
244        cellspacing="0" width="100%" bgcolor="white">
245 <tr bgcolor="#70b0f0" class="table-header">
246   <td colspan="2" class="table-header">
247     <table border="0" cellpadding="0" cellspacing="0" width="100%">
248       <tr valign="top">
249         <td align="left"><span class="table-header">Method Details</span></td>
250         <td align="right" valign="top"
251          ><span class="options">[<a href="#section-MethodDetails"
252          class="privatelink" onclick="toggle_private();"
253          >hide private</a>]</span></td>
254       </tr>
255     </table>
256   </td>
257 </tr>
258 </table>
259 <a name="__call__"></a>
260 <div>
261 <table class="details" border="1" cellpadding="3"
262        cellspacing="0" width="100%" bgcolor="white">
263 <tr><td>
264   <table width="100%" cellpadding="0" cellspacing="0" border="0">
265   <tr valign="top"><td>
266   <h3 class="epydoc"><span class="sig"><span class="sig-name">__call__</span>(<span class="sig-arg">self</span>,
267         <span class="sig-arg">etree</span>)</span>
268     <br /><em class="fname">(Call operator)</em>
269   </h3>
270   </td><td align="right" valign="top"
271     >&nbsp;
272     </td>
273   </tr></table>
274   
275   <p>Validate doc using Relax NG.</p>
276 <p>Returns true if document is valid, false if not.</p>
277   <dl class="fields">
278   </dl>
279 </td></tr></table>
280 </div>
281 <a name="__init__"></a>
282 <div>
283 <table class="details" border="1" cellpadding="3"
284        cellspacing="0" width="100%" bgcolor="white">
285 <tr><td>
286   <table width="100%" cellpadding="0" cellspacing="0" border="0">
287   <tr valign="top"><td>
288   <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
289         <span class="sig-arg">etree</span>=<span class="sig-default">None</span>,
290         <span class="sig-arg">file</span>=<span class="sig-default">None</span>)</span>
291     <br /><em class="fname">(Constructor)</em>
292   </h3>
293   </td><td align="right" valign="top"
294     >&nbsp;
295     </td>
296   </tr></table>
297   
298   x.__init__(...) initializes x; see help(type(x)) for signature
299   <dl class="fields">
300     <dt>Overrides:
301         object.__init__
302     </dt>
303   </dl>
304 </td></tr></table>
305 </div>
306 <a name="__new__"></a>
307 <div>
308 <table class="details" border="1" cellpadding="3"
309        cellspacing="0" width="100%" bgcolor="white">
310 <tr><td>
311   <table width="100%" cellpadding="0" cellspacing="0" border="0">
312   <tr valign="top"><td>
313   <h3 class="epydoc"><span class="sig"><span class="sig-name">__new__</span>(<span class="sig-arg">T</span>,
314         <span class="sig-arg">S</span>,
315         <span class="sig-arg">...</span>)</span>
316   </h3>
317   </td><td align="right" valign="top"
318     >&nbsp;
319     </td>
320   </tr></table>
321   
322   
323   <dl class="fields">
324     <dt>Returns: a new object with type S, a subtype of T</dt>
325     <dt>Overrides:
326         object.__new__
327     </dt>
328   </dl>
329 </td></tr></table>
330 </div>
331 <a name="from_rnc_string"></a>
332 <div>
333 <table class="details" border="1" cellpadding="3"
334        cellspacing="0" width="100%" bgcolor="white">
335 <tr><td>
336   <table width="100%" cellpadding="0" cellspacing="0" border="0">
337   <tr valign="top"><td>
338   <h3 class="epydoc"><span class="sig"><span class="sig-name">from_rnc_string</span>(<span class="sig-arg">...</span>)</span>
339     <br /><em class="fname">Class Method</em>
340   </h3>
341   </td><td align="right" valign="top"
342     >&nbsp;
343     </td>
344   </tr></table>
345   
346   <p>Parse a RelaxNG schema in compact syntax from a text string</p>
347 <p>Requires the rnc2rng package to be installed.</p>
348 <p>Passing the source URL or file path of the source as 'base_url'
349 will enable resolving resource references relative to the source.</p>
350   <dl class="fields">
351   </dl>
352 </td></tr></table>
353 </div>
354 <br />
355 <!-- ==================== NAVIGATION BAR ==================== -->
356 <table class="navbar" border="0" width="100%" cellpadding="0"
357        bgcolor="#a0c0ff" cellspacing="0">
358   <tr valign="middle">
359   <!-- Home link -->
360       <th>&nbsp;&nbsp;&nbsp;<a
361         href="lxml-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
362
363   <!-- Tree link -->
364       <th>&nbsp;&nbsp;&nbsp;<a
365         href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
366
367   <!-- Index link -->
368       <th>&nbsp;&nbsp;&nbsp;<a
369         href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
370
371   <!-- Help link -->
372       <th>&nbsp;&nbsp;&nbsp;<a
373         href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
374
375   <!-- Project homepage -->
376       <th class="navbar" align="right" width="100%">
377         <table border="0" cellpadding="0" cellspacing="0">
378           <tr><th class="navbar" align="center"
379             ><a class="navbar" target="_top" href="/">lxml API</a></th>
380           </tr></table></th>
381   </tr>
382 </table>
383 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
384   <tr>
385     <td align="left" class="footer">
386     Generated by Epydoc 3.0.1
387     on Wed Jan 29 12:26:21 2020
388     </td>
389     <td align="right" class="footer">
390       <a target="mainFrame" href="http://epydoc.sourceforge.net"
391         >http://epydoc.sourceforge.net</a>
392     </td>
393   </tr>
394 </table>
395
396 <script type="text/javascript">
397   <!--
398   // Private objects are initially displayed (because if
399   // javascript is turned off then we want them to be
400   // visible); but by default, we want to hide them.  So hide
401   // them unless we have a cookie that says to show them.
402   checkCookie();
403   // -->
404 </script>
405 </body>
406 </html>