/usr/share/doc/python-plastex-doc/html/sect0029.html is in python-plastex-doc 0.9.2-1.2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content="plasTeX" />
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
<title>plasTeX — A Python Framework for Processing LaTeX Documents: plasTeX vs. XML</title>
<link href="sect0030.html" title="Node Objects" rel="next" />
<link href="module-plasTeX-DOM.html" title="plasTeX.DOM — The plasDocument Object Model (DOM)" rel="prev" />
<link href="module-plasTeX-DOM.html" title="plasTeX.DOM — The plasDocument Object Model (DOM)" rel="up" />
<link rel="stylesheet" href="styles/styles.css" />
</head>
<body>
<div class="navigation">
<table cellspacing="2" cellpadding="0" width="100%">
<tr>
<td><a href="module-plasTeX-DOM.html" title="plasTeX.DOM — The plasTeX Document Object Model (DOM)"><img alt="Previous: plasTeX.DOM — The plasTeX Document Object Model (DOM)" border="0" src="icons/previous.gif" width="32" height="32" /></a></td>
<td><a href="module-plasTeX-DOM.html" title="plasTeX.DOM — The plasTeX Document Object Model (DOM)"><img alt="Up: plasTeX.DOM — The plasTeX Document Object Model (DOM)" border="0" src="icons/up.gif" width="32" height="32" /></a></td>
<td><a href="sect0030.html" title="Node Objects"><img alt="Next: Node Objects" border="0" src="icons/next.gif" width="32" height="32" /></a></td>
<td class="navtitle" align="center">plasTeX — A Python Framework for Processing LaTeX Documents</td>
<td><a href="index.html" title="Table of Contents"><img border="0" alt="" src="icons/contents.gif" width="32" height="32" /></a></td>
<td><img border="0" alt="" src="icons/blank.gif" width="32" height="32" /></td>
<td><img border="0" alt="" src="icons/blank.gif" width="32" height="32" /></td>
</tr>
</table>
</div>
<div class="breadcrumbs">
<span>
<span>
<a href="index.html">plasTeX — A Python Framework for Processing LaTeX Documents</a> <b>:</b>
</span>
</span><span>
<span>
<a href="sect0024.html">plasT<sub style="text-transform:uppercase; margin-left:-0.2em">e</sub>X Frameworks and APIs</a> <b>:</b>
</span>
</span><span>
<span>
<a href="module-plasTeX-DOM.html"><tt class="ttfamily">plasTeX.DOM</tt> — The plasT<sub style="text-transform:uppercase; margin-left:-0.2em">e</sub>X Document Object Model (DOM)</a> <b>:</b>
</span>
</span><span>
<span>
<b class="current">plasT<sub style="text-transform:uppercase; margin-left:-0.2em">e</sub>X vs. XML</b>
</span>
</span>
<hr />
</div>
<div><h2 id="a0000000030">6.3.1 plasT<sub style="text-transform:uppercase; margin-left:-0.2em">e</sub>X vs. XML</h2>
<p>The plasT<sub style="text-transform:uppercase; margin-left:-0.2em">e</sub>X DOM and XML DOM have more similarities than differences. This similarity is purely intentional to reduce the learning curve and to prevent reinventing the wheel. However, the XML DOM can be a bit cumbersome especially when you’re used to much simpler and more elegant Python code. Because of this, some Python behaviors were adopted into the plasT<sub style="text-transform:uppercase; margin-left:-0.2em">e</sub>X DOM. The good news is that these extensions do not break compatibility with the XML DOM. There are, however, some differences due to conventions used L<sup style="font-variant:small-caps; margin-left:-0.3em">a</sup>T<sub style="text-transform:uppercase; margin-left:-0.2em">e</sub>X. </p><p>The only significant difference between the plasT<sub style="text-transform:uppercase; margin-left:-0.2em">e</sub>X DOM and the XML DOM is that plasT<sub style="text-transform:uppercase; margin-left:-0.2em">e</sub>X nodes do not have true attributes like in XML. Attributes in XML are more like arguments in L<sup style="font-variant:small-caps; margin-left:-0.3em">a</sup>T<sub style="text-transform:uppercase; margin-left:-0.2em">e</sub>X, because they are similar the plasT<sub style="text-transform:uppercase; margin-left:-0.2em">e</sub>X DOM actually puts the L<sup style="font-variant:small-caps; margin-left:-0.3em">a</sup>T<sub style="text-transform:uppercase; margin-left:-0.2em">e</sub>X macro arguments into the <tt class="ttfamily">attributes</tt> dictionary. This does create an incompatibility though since XML DOM attributes can only be strings whereas L<sup style="font-variant:small-caps; margin-left:-0.3em">a</sup>T<sub style="text-transform:uppercase; margin-left:-0.2em">e</sub>X arguments can contain lots of markup. In addition, plasT<sub style="text-transform:uppercase; margin-left:-0.2em">e</sub>X allows you to convert these arguments into Python strings, lists, dictionaries, etc., so essentially any type of object can occur in the <tt class="ttfamily">attributes</tt> dictionary. </p><p>Other than paying attention to the the attributes dictionary difference, you can use most other XML DOM methods on plasT<sub style="text-transform:uppercase; margin-left:-0.2em">e</sub>X document objects to create nodes, delete nodes, etc. The full API is described below. </p><p>In most cases, you will not need to be concerned with instantiating nodes. The plasT<sub style="text-transform:uppercase; margin-left:-0.2em">e</sub>X framework does this. However, the API can be helpful if you want to modify the document object that plasT<sub style="text-transform:uppercase; margin-left:-0.2em">e</sub>X creates. </p></div>
<div class="navigation">
<table cellspacing="2" cellpadding="0" width="100%">
<tr>
<td><a href="module-plasTeX-DOM.html" title="plasTeX.DOM — The plasTeX Document Object Model (DOM)"><img alt="Previous: plasTeX.DOM — The plasTeX Document Object Model (DOM)" border="0" src="icons/previous.gif" width="32" height="32" /></a></td>
<td><a href="module-plasTeX-DOM.html" title="plasTeX.DOM — The plasTeX Document Object Model (DOM)"><img alt="Up: plasTeX.DOM — The plasTeX Document Object Model (DOM)" border="0" src="icons/up.gif" width="32" height="32" /></a></td>
<td><a href="sect0030.html" title="Node Objects"><img alt="Next: Node Objects" border="0" src="icons/next.gif" width="32" height="32" /></a></td>
<td class="navtitle" align="center">plasTeX — A Python Framework for Processing LaTeX Documents</td>
<td><a href="index.html" title="Table of Contents"><img border="0" alt="" src="icons/contents.gif" width="32" height="32" /></a></td>
<td><img border="0" alt="" src="icons/blank.gif" width="32" height="32" /></td>
<td><img border="0" alt="" src="icons/blank.gif" width="32" height="32" /></td>
</tr>
</table>
</div>
<script language="javascript" src="icons/imgadjust.js" type="text/javascript"></script>
</body>
</html>
|