Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > b77dda48f87d4eda8cc559e40c49a652 > files > 598

python-kde4-doc-4.4.5-0.2mdv2010.2.i586.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!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" lang="en" xml:lang="en">

<head>
  <title>DOM.Attr</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Style-Type" content="text/css" />
  <link rel="stylesheet" type="text/css" href="../common/doxygen.css" />
  <link rel="stylesheet" media="screen" type="text/css" title="KDE Colors" href="../common/kde.css" />
</head>
<body>
<div id="container">
<div id="header">
  <div id="header_top">
    <div>
      <div>
        <img alt ="" src="../common/top-kde.jpg"/>
        KDE 4.4 PyKDE API Reference
      </div>
    </div>
  </div>
  <div id="header_bottom">
    <div id="location">
      <ul>
        <li>KDE's Python API</li>
      </ul>
    </div>

    <div id="menu">
      <ul>
        <li><a href="../modules.html">Overview</a></li>
<li><a href="http://techbase.kde.org/Development/Languages/Python">PyKDE Home</a></li>
<li><a href="http://kde.org/family/">Sitemap</a></li>
<li><a href="http://kde.org/contact/">Contact Us</a></li>
</ul>
    </div>
  </div>
</div>

<div id="body_wrapper">
<div id="body">
<div id="right">
<div class="content">
<div id="main">
<div class="clearer">&nbsp;</div>

<h1>Attr Class Reference</h1>
<code>from PyKDE4.khtml import *</code>
<p>
Inherits: DOM.Node<br />

Namespace: DOM.Attr<br />
<h2>Detailed Description</h2>

<p>The Attr interface represents an attribute in an
Element object. Typically the allowable values for
the attribute are defined in a document type definition.
</p>
<p>
Attr objects inherit the Node
interface, but since they are not actually child nodes of the
element they describe, the DOM does not consider them part of the
document tree. Thus, the Node attributes
parentNode , previousSibling , and
nextSibling have a null value for Attr
objects. The DOM takes the view that attributes are properties of
elements rather than having a separate identity from the elements
they are associated with; this should make it more efficient to
implement such features as default attributes associated with all
elements of a given type. Furthermore, Attr nodes
may not be immediate children of a DocumentFragment
. However, they can be associated with Element nodes
contained within a DocumentFragment . In short,
users and implementors of the DOM need to be aware that Attr
nodes have some things in common with other objects
inheriting the Node interface, but they also are
quite distinct.
</p>
<p>
The attribute's effective value is determined as follows: if this
attribute has been explicitly assigned any value, that value is the
attribute's effective value; otherwise, if there is a declaration
for this attribute, and that declaration includes a default value,
then that default value is the attribute's effective value;
otherwise, the attribute does not exist on this element in the
structure model until it has been explicitly added. Note that the
nodeValue attribute on the Attr
instance can also be used to retrieve the string version of the
attribute's value(s).
</p>
<p>
In XML, where the value of an attribute can contain entity
references, the child nodes of the Attr node provide
a representation in which entity references are not expanded. These
child nodes may be either Text or
EntityReference nodes. Because the attribute type may be
unknown, there are no tokenized attribute values.
</p>
<table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="2"><br><h2>Methods</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#Attr">__init__</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#Attr">__init__</a> (self, <a href="../khtml/DOM.Node.html">DOM.Node</a> other)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#Attr">__init__</a> (self, <a href="../khtml/DOM.Attr.html">DOM.Attr</a> other)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../khtml/DOM.DOMString.html">DOM.DOMString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#name">name</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../khtml/DOM.Element.html">DOM.Element</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ownerElement">ownerElement</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#setValue">setValue</a> (self, <a href="../khtml/DOM.DOMString.html">DOM.DOMString</a> a0)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#specified">specified</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../khtml/DOM.DOMString.html">DOM.DOMString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#value">value</a> (self)</td></tr>
</table>
<hr><h2>Method Documentation</h2><a class="anchor" name="Attr"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">__init__</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"></div></div><a class="anchor" name="Attr"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">__init__</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../khtml/DOM.Node.html">DOM.Node</a>&nbsp;</td>
<td class="paramname"><em>other</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"></div></div><a class="anchor" name="Attr"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">__init__</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../khtml/DOM.Attr.html">DOM.Attr</a>&nbsp;</td>
<td class="paramname"><em>other</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"></div></div><a class="anchor" name="name"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="../khtml/DOM.DOMString.html">DOM.DOMString</a> name</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Returns the name of this attribute.
</p></div></div><a class="anchor" name="ownerElement"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="../khtml/DOM.Element.html">DOM.Element</a> ownerElement</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Introduced in DOM Level 2
</p>
<p>
The Element node this attribute is attached to or null if this attribute
is not in use.
</p></div></div><a class="anchor" name="setValue"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> setValue</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../khtml/DOM.DOMString.html">DOM.DOMString</a>&nbsp;</td>
<td class="paramname"><em>a0</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>see value
</p></div></div><a class="anchor" name="specified"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">bool specified</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>If this attribute was explicitly given a value in the original
document, this is true ; otherwise, it is
false . Note that the implementation is in charge of
this attribute, not the user. If the user changes the value of
the attribute (even if it ends up having the same value as the
default value) then the specified flag is
automatically flipped to true . To re-specify
the attribute as the default value from the DTD, the user must
delete the attribute. The implementation will then make a new
attribute available with specified set to
false and the default value (if one exists).
</p>
<p>
In summary:
<li> If the attribute has an assigned </li>
value in the document then specified is
true , and the value is the assigned value.
</p>
<p>
<li> If the attribute has no assigned value in the </li>
document and has a default value in the DTD, then
specified is false , and the value is
the default value in the DTD.
</p>
<p>
<li> If the attribute has no assigned value in the </li>
document and has a value of #IMPLIED in the DTD, then the
attribute does not appear in the structure model of the
document.
</p></div></div><a class="anchor" name="value"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="../khtml/DOM.DOMString.html">DOM.DOMString</a> value</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>On retrieval, the value of the attribute is returned as a
string. Character and general entity references are replaced
with their values.
</p>
<p>
On setting, this creates a Text node with the
unparsed contents of the string.
</p></div></div>
</div>
</div>
</div>

<div id="left">

<div class="menu_box">
<div class="nav_list">
<ul>
<li><a href="../allclasses.html">Full Index</a></li>
</ul>
</div>

<a name="cp-menu" /><div class="menutitle"><div>
  <h2 id="cp-menu-project">Modules</h2>
</div></div>
<div class="nav_list">
<ul><li><a href="../akonadi/index.html">akonadi</a></li>
<li><a href="../dnssd/index.html">dnssd</a></li>
<li><a href="../kdecore/index.html">kdecore</a></li>
<li><a href="../kdeui/index.html">kdeui</a></li>
<li><a href="../khtml/index.html">khtml</a></li>
<li><a href="../kio/index.html">kio</a></li>
<li><a href="../knewstuff/index.html">knewstuff</a></li>
<li><a href="../kparts/index.html">kparts</a></li>
<li><a href="../kutils/index.html">kutils</a></li>
<li><a href="../nepomuk/index.html">nepomuk</a></li>
<li><a href="../phonon/index.html">phonon</a></li>
<li><a href="../plasma/index.html">plasma</a></li>
<li><a href="../polkitqt/index.html">polkitqt</a></li>
<li><a href="../solid/index.html">solid</a></li>
<li><a href="../soprano/index.html">soprano</a></li>
</ul></div></div>

</div>

</div>
  <div class="clearer"/>
</div>

<div id="end_body"></div>
</div>
<div id="footer"><div id="footer_text">
This documentation is maintained by <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;simon&#64;simonzone&#46;com">Simon Edwards</a>.<br />
        KDE<sup>&#174;</sup> and <a href="../images/kde_gear_black.png">the K Desktop Environment<sup>&#174;</sup> logo</a> are registered trademarks of <a href="http://ev.kde.org/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> |
        <a href="http://www.kde.org/contact/impressum.php">Legal</a>
    </div></div>
</body>
</html>