forked from AFPy/python-docs-fr
1345 lines
43 KiB
Plaintext
1345 lines
43 KiB
Plaintext
# SOME DESCRIPTIVE TITLE.
|
|
# Copyright (C) 1990-2016, Python Software Foundation
|
|
# This file is distributed under the same license as the Python package.
|
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
|
#
|
|
#, fuzzy
|
|
msgid ""
|
|
msgstr ""
|
|
"Project-Id-Version: Python 2.7\n"
|
|
"Report-Msgid-Bugs-To: \n"
|
|
"POT-Creation-Date: 2016-10-30 10:44+0100\n"
|
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|
"MIME-Version: 1.0\n"
|
|
"Content-Type: text/plain; charset=UTF-8\n"
|
|
"Content-Transfer-Encoding: 8bit\n"
|
|
|
|
#: ../Doc/library/xml.dom.rst:3
|
|
msgid ":mod:`xml.dom` --- The Document Object Model API"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:13
|
|
msgid ""
|
|
"The Document Object Model, or \"DOM,\" is a cross-language API from the "
|
|
"World Wide Web Consortium (W3C) for accessing and modifying XML documents. "
|
|
"A DOM implementation presents an XML document as a tree structure, or allows "
|
|
"client code to build such a structure from scratch. It then gives access to "
|
|
"the structure through a set of objects which provided well-known interfaces."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:19
|
|
msgid ""
|
|
"The DOM is extremely useful for random-access applications. SAX only allows "
|
|
"you a view of one bit of the document at a time. If you are looking at one "
|
|
"SAX element, you have no access to another. If you are looking at a text "
|
|
"node, you have no access to a containing element. When you write a SAX "
|
|
"application, you need to keep track of your program's position in the "
|
|
"document somewhere in your own code. SAX does not do it for you. Also, if "
|
|
"you need to look ahead in the XML document, you are just out of luck."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:27
|
|
msgid ""
|
|
"Some applications are simply impossible in an event driven model with no "
|
|
"access to a tree. Of course you could build some sort of tree yourself in "
|
|
"SAX events, but the DOM allows you to avoid writing that code. The DOM is a "
|
|
"standard tree representation for XML data."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:32
|
|
msgid ""
|
|
"The Document Object Model is being defined by the W3C in stages, or \"levels"
|
|
"\" in their terminology. The Python mapping of the API is substantially "
|
|
"based on the DOM Level 2 recommendation."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:51
|
|
msgid ""
|
|
"DOM applications typically start by parsing some XML into a DOM. How this "
|
|
"is accomplished is not covered at all by DOM Level 1, and Level 2 provides "
|
|
"only limited improvements: There is a :class:`DOMImplementation` object "
|
|
"class which provides access to :class:`Document` creation methods, but no "
|
|
"way to access an XML reader/parser/Document builder in an implementation-"
|
|
"independent way. There is also no well-defined way to access these methods "
|
|
"without an existing :class:`Document` object. In Python, each DOM "
|
|
"implementation will provide a function :func:`getDOMImplementation`. DOM "
|
|
"Level 3 adds a Load/Store specification, which defines an interface to the "
|
|
"reader, but this is not yet available in the Python standard library."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:62
|
|
msgid ""
|
|
"Once you have a DOM document object, you can access the parts of your XML "
|
|
"document through its properties and methods. These properties are defined "
|
|
"in the DOM specification; this portion of the reference manual describes the "
|
|
"interpretation of the specification in Python."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:67
|
|
msgid ""
|
|
"The specification provided by the W3C defines the DOM API for Java, "
|
|
"ECMAScript, and OMG IDL. The Python mapping defined here is based in large "
|
|
"part on the IDL version of the specification, but strict compliance is not "
|
|
"required (though implementations are free to support the strict mapping from "
|
|
"IDL). See section :ref:`dom-conformance` for a detailed discussion of "
|
|
"mapping requirements."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:77
|
|
msgid ""
|
|
"`Document Object Model (DOM) Level 2 Specification <https://www.w3.org/TR/"
|
|
"DOM-Level-2-Core/>`_"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:77
|
|
msgid "The W3C recommendation upon which the Python DOM API is based."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:80
|
|
msgid ""
|
|
"`Document Object Model (DOM) Level 1 Specification <https://www.w3.org/TR/"
|
|
"REC-DOM-Level-1/>`_"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:80
|
|
msgid "The W3C recommendation for the DOM supported by :mod:`xml.dom.minidom`."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:82
|
|
msgid ""
|
|
"`Python Language Mapping Specification <http://www.omg.org/spec/PYTH/1.2/"
|
|
"PDF>`_"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:83
|
|
msgid "This specifies the mapping from OMG IDL to Python."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:87
|
|
msgid "Module Contents"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:89
|
|
msgid "The :mod:`xml.dom` contains the following functions:"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:94
|
|
msgid ""
|
|
"Register the *factory* function with the name *name*. The factory function "
|
|
"should return an object which implements the :class:`DOMImplementation` "
|
|
"interface. The factory function can return the same object every time, or a "
|
|
"new one for each call, as appropriate for the specific implementation (e.g. "
|
|
"if that implementation supports some customization)."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:103
|
|
msgid ""
|
|
"Return a suitable DOM implementation. The *name* is either well-known, the "
|
|
"module name of a DOM implementation, or ``None``. If it is not ``None``, "
|
|
"imports the corresponding module and returns a :class:`DOMImplementation` "
|
|
"object if the import succeeds. If no name is given, and if the environment "
|
|
"variable :envvar:`PYTHON_DOM` is set, this variable is used to find the "
|
|
"implementation."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:109
|
|
msgid ""
|
|
"If name is not given, this examines the available implementations to find "
|
|
"one with the required feature set. If no implementation can be found, raise "
|
|
"an :exc:`ImportError`. The features list must be a sequence of ``(feature, "
|
|
"version)`` pairs which are passed to the :meth:`hasFeature` method on "
|
|
"available :class:`DOMImplementation` objects."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:115
|
|
msgid "Some convenience constants are also provided:"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:120
|
|
msgid ""
|
|
"The value used to indicate that no namespace is associated with a node in "
|
|
"the DOM. This is typically found as the :attr:`namespaceURI` of a node, or "
|
|
"used as the *namespaceURI* parameter to a namespaces-specific method."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:129
|
|
msgid ""
|
|
"The namespace URI associated with the reserved prefix ``xml``, as defined by "
|
|
"`Namespaces in XML <https://www.w3.org/TR/REC-xml-names/>`_ (section 4)."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:137
|
|
msgid ""
|
|
"The namespace URI for namespace declarations, as defined by `Document Object "
|
|
"Model (DOM) Level 2 Core Specification <https://www.w3.org/TR/DOM-Level-2-"
|
|
"Core/core.html>`_ (section 1.1.8)."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:146
|
|
msgid ""
|
|
"The URI of the XHTML namespace as defined by `XHTML 1.0: The Extensible "
|
|
"HyperText Markup Language <https://www.w3.org/TR/xhtml1/>`_ (section 3.1.1)."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:151
|
|
msgid ""
|
|
"In addition, :mod:`xml.dom` contains a base :class:`Node` class and the DOM "
|
|
"exception classes. The :class:`Node` class provided by this module does not "
|
|
"implement any of the methods or attributes defined by the DOM specification; "
|
|
"concrete DOM implementations must provide those. The :class:`Node` class "
|
|
"provided as part of this module does provide the constants used for the :"
|
|
"attr:`nodeType` attribute on concrete :class:`Node` objects; they are "
|
|
"located within the class rather than at the module level to conform with the "
|
|
"DOM specifications."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:166
|
|
msgid "Objects in the DOM"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:168
|
|
msgid ""
|
|
"The definitive documentation for the DOM is the DOM specification from the "
|
|
"W3C."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:170
|
|
msgid ""
|
|
"Note that DOM attributes may also be manipulated as nodes instead of as "
|
|
"simple strings. It is fairly rare that you must do this, however, so this "
|
|
"usage is not yet documented."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:175
|
|
msgid "Interface"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:175
|
|
msgid "Section"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:175
|
|
msgid "Purpose"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:177
|
|
msgid ":class:`DOMImplementation`"
|
|
msgstr ":class:`DOMImplementation`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:177
|
|
msgid ":ref:`dom-implementation-objects`"
|
|
msgstr ":ref:`dom-implementation-objects`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:177
|
|
msgid "Interface to the underlying implementation."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:180
|
|
msgid ":class:`Node`"
|
|
msgstr ":class:`Node`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:180
|
|
msgid ":ref:`dom-node-objects`"
|
|
msgstr ":ref:`dom-node-objects`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:180
|
|
msgid "Base interface for most objects in a document."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:183
|
|
msgid ":class:`NodeList`"
|
|
msgstr ":class:`NodeList`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:183
|
|
msgid ":ref:`dom-nodelist-objects`"
|
|
msgstr ":ref:`dom-nodelist-objects`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:183
|
|
msgid "Interface for a sequence of nodes."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:186
|
|
msgid ":class:`DocumentType`"
|
|
msgstr ":class:`DocumentType`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:186
|
|
msgid ":ref:`dom-documenttype-objects`"
|
|
msgstr ":ref:`dom-documenttype-objects`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:186
|
|
msgid "Information about the declarations needed to process a document."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:190
|
|
msgid ":class:`Document`"
|
|
msgstr ":class:`Document`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:190
|
|
msgid ":ref:`dom-document-objects`"
|
|
msgstr ":ref:`dom-document-objects`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:190
|
|
msgid "Object which represents an entire document."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:193
|
|
msgid ":class:`Element`"
|
|
msgstr ":class:`Element`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:193
|
|
msgid ":ref:`dom-element-objects`"
|
|
msgstr ":ref:`dom-element-objects`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:193
|
|
msgid "Element nodes in the document hierarchy."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:196
|
|
msgid ":class:`Attr`"
|
|
msgstr ":class:`Attr`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:196
|
|
msgid ":ref:`dom-attr-objects`"
|
|
msgstr ":ref:`dom-attr-objects`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:196
|
|
msgid "Attribute value nodes on element nodes."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:199
|
|
msgid ":class:`Comment`"
|
|
msgstr ":class:`Comment`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:199
|
|
msgid ":ref:`dom-comment-objects`"
|
|
msgstr ":ref:`dom-comment-objects`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:199
|
|
msgid "Representation of comments in the source document."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:202
|
|
msgid ":class:`Text`"
|
|
msgstr ":class:`Text`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:202
|
|
msgid ":ref:`dom-text-objects`"
|
|
msgstr ":ref:`dom-text-objects`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:202
|
|
msgid "Nodes containing textual content from the document."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:205
|
|
msgid ":class:`ProcessingInstruction`"
|
|
msgstr ":class:`ProcessingInstruction`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:205
|
|
msgid ":ref:`dom-pi-objects`"
|
|
msgstr ":ref:`dom-pi-objects`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:205
|
|
msgid "Processing instruction representation."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:209
|
|
msgid ""
|
|
"An additional section describes the exceptions defined for working with the "
|
|
"DOM in Python."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:216
|
|
msgid "DOMImplementation Objects"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:218
|
|
msgid ""
|
|
"The :class:`DOMImplementation` interface provides a way for applications to "
|
|
"determine the availability of particular features in the DOM they are using. "
|
|
"DOM Level 2 added the ability to create new :class:`Document` and :class:"
|
|
"`DocumentType` objects using the :class:`DOMImplementation` as well."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:226
|
|
msgid ""
|
|
"Return true if the feature identified by the pair of strings *feature* and "
|
|
"*version* is implemented."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:232
|
|
msgid ""
|
|
"Return a new :class:`Document` object (the root of the DOM), with a child :"
|
|
"class:`Element` object having the given *namespaceUri* and *qualifiedName*. "
|
|
"The *doctype* must be a :class:`DocumentType` object created by :meth:"
|
|
"`createDocumentType`, or ``None``. In the Python DOM API, the first two "
|
|
"arguments can also be ``None`` in order to indicate that no :class:`Element` "
|
|
"child is to be created."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:242
|
|
msgid ""
|
|
"Return a new :class:`DocumentType` object that encapsulates the given "
|
|
"*qualifiedName*, *publicId*, and *systemId* strings, representing the "
|
|
"information contained in an XML document type declaration."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:250
|
|
msgid "Node Objects"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:252
|
|
msgid ""
|
|
"All of the components of an XML document are subclasses of :class:`Node`."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:257
|
|
msgid ""
|
|
"An integer representing the node type. Symbolic constants for the types are "
|
|
"on the :class:`Node` object: :const:`ELEMENT_NODE`, :const:"
|
|
"`ATTRIBUTE_NODE`, :const:`TEXT_NODE`, :const:`CDATA_SECTION_NODE`, :const:"
|
|
"`ENTITY_NODE`, :const:`PROCESSING_INSTRUCTION_NODE`, :const:`COMMENT_NODE`, :"
|
|
"const:`DOCUMENT_NODE`, :const:`DOCUMENT_TYPE_NODE`, :const:`NOTATION_NODE`. "
|
|
"This is a read-only attribute."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:267
|
|
msgid ""
|
|
"The parent of the current node, or ``None`` for the document node. The value "
|
|
"is always a :class:`Node` object or ``None``. For :class:`Element` nodes, "
|
|
"this will be the parent element, except for the root element, in which case "
|
|
"it will be the :class:`Document` object. For :class:`Attr` nodes, this is "
|
|
"always ``None``. This is a read-only attribute."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:276
|
|
msgid ""
|
|
"A :class:`NamedNodeMap` of attribute objects. Only elements have actual "
|
|
"values for this; others provide ``None`` for this attribute. This is a read-"
|
|
"only attribute."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:283
|
|
msgid ""
|
|
"The node that immediately precedes this one with the same parent. For "
|
|
"instance the element with an end-tag that comes just before the *self* "
|
|
"element's start-tag. Of course, XML documents are made up of more than just "
|
|
"elements so the previous sibling could be text, a comment, or something "
|
|
"else. If this node is the first child of the parent, this attribute will be "
|
|
"``None``. This is a read-only attribute."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:293
|
|
msgid ""
|
|
"The node that immediately follows this one with the same parent. See also :"
|
|
"attr:`previousSibling`. If this is the last child of the parent, this "
|
|
"attribute will be ``None``. This is a read-only attribute."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:300
|
|
msgid ""
|
|
"A list of nodes contained within this node. This is a read-only attribute."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:305
|
|
msgid ""
|
|
"The first child of the node, if there are any, or ``None``. This is a read-"
|
|
"only attribute."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:311
|
|
msgid ""
|
|
"The last child of the node, if there are any, or ``None``. This is a read-"
|
|
"only attribute."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:317
|
|
msgid ""
|
|
"The part of the :attr:`tagName` following the colon if there is one, else "
|
|
"the entire :attr:`tagName`. The value is a string."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:323
|
|
msgid ""
|
|
"The part of the :attr:`tagName` preceding the colon if there is one, else "
|
|
"the empty string. The value is a string, or ``None``."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:329
|
|
msgid ""
|
|
"The namespace associated with the element name. This will be a string or "
|
|
"``None``. This is a read-only attribute."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:335
|
|
msgid ""
|
|
"This has a different meaning for each node type; see the DOM specification "
|
|
"for details. You can always get the information you would get here from "
|
|
"another property such as the :attr:`tagName` property for elements or the :"
|
|
"attr:`name` property for attributes. For all node types, the value of this "
|
|
"attribute will be either a string or ``None``. This is a read-only "
|
|
"attribute."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:344
|
|
msgid ""
|
|
"This has a different meaning for each node type; see the DOM specification "
|
|
"for details. The situation is similar to that with :attr:`nodeName`. The "
|
|
"value is a string or ``None``."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:351
|
|
msgid "Returns true if the node has any attributes."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:356
|
|
msgid "Returns true if the node has any child nodes."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:361
|
|
msgid ""
|
|
"Returns true if *other* refers to the same node as this node. This is "
|
|
"especially useful for DOM implementations which use any sort of proxy "
|
|
"architecture (because more than one object can refer to the same node)."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:367
|
|
msgid ""
|
|
"This is based on a proposed DOM Level 3 API which is still in the \"working "
|
|
"draft\" stage, but this particular interface appears uncontroversial. "
|
|
"Changes from the W3C will not necessarily affect this method in the Python "
|
|
"DOM interface (though any new W3C API for this would also be supported)."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:375
|
|
msgid ""
|
|
"Add a new child node to this node at the end of the list of children, "
|
|
"returning *newChild*. If the node was already in the tree, it is removed "
|
|
"first."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:382
|
|
msgid ""
|
|
"Insert a new child node before an existing child. It must be the case that "
|
|
"*refChild* is a child of this node; if not, :exc:`ValueError` is raised. "
|
|
"*newChild* is returned. If *refChild* is ``None``, it inserts *newChild* at "
|
|
"the end of the children's list."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:390
|
|
msgid ""
|
|
"Remove a child node. *oldChild* must be a child of this node; if not, :exc:"
|
|
"`ValueError` is raised. *oldChild* is returned on success. If *oldChild* "
|
|
"will not be used further, its :meth:`unlink` method should be called."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:397
|
|
msgid ""
|
|
"Replace an existing node with a new node. It must be the case that "
|
|
"*oldChild* is a child of this node; if not, :exc:`ValueError` is raised."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:403
|
|
msgid ""
|
|
"Join adjacent text nodes so that all stretches of text are stored as single :"
|
|
"class:`Text` instances. This simplifies processing text from a DOM tree for "
|
|
"many applications."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:412
|
|
msgid ""
|
|
"Clone this node. Setting *deep* means to clone all child nodes as well. "
|
|
"This returns the clone."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:419
|
|
msgid "NodeList Objects"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:421
|
|
msgid ""
|
|
"A :class:`NodeList` represents a sequence of nodes. These objects are used "
|
|
"in two ways in the DOM Core recommendation: an :class:`Element` object "
|
|
"provides one as its list of child nodes, and the :meth:"
|
|
"`getElementsByTagName` and :meth:`getElementsByTagNameNS` methods of :class:"
|
|
"`Node` return objects with this interface to represent query results."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:427
|
|
msgid ""
|
|
"The DOM Level 2 recommendation defines one method and one attribute for "
|
|
"these objects:"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:433
|
|
msgid ""
|
|
"Return the *i*'th item from the sequence, if there is one, or ``None``. The "
|
|
"index *i* is not allowed to be less than zero or greater than or equal to "
|
|
"the length of the sequence."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:440
|
|
msgid "The number of nodes in the sequence."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:442
|
|
msgid ""
|
|
"In addition, the Python DOM interface requires that some additional support "
|
|
"is provided to allow :class:`NodeList` objects to be used as Python "
|
|
"sequences. All :class:`NodeList` implementations must include support for :"
|
|
"meth:`~object.__len__` and :meth:`~object.__getitem__`; this allows "
|
|
"iteration over the :class:`NodeList` in :keyword:`for` statements and proper "
|
|
"support for the :func:`len` built-in function."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:450
|
|
msgid ""
|
|
"If a DOM implementation supports modification of the document, the :class:"
|
|
"`NodeList` implementation must also support the :meth:`~object.__setitem__` "
|
|
"and :meth:`~object.__delitem__` methods."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:458
|
|
msgid "DocumentType Objects"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:460
|
|
msgid ""
|
|
"Information about the notations and entities declared by a document "
|
|
"(including the external subset if the parser uses it and can provide the "
|
|
"information) is available from a :class:`DocumentType` object. The :class:"
|
|
"`DocumentType` for a document is available from the :class:`Document` "
|
|
"object's :attr:`doctype` attribute; if there is no ``DOCTYPE`` declaration "
|
|
"for the document, the document's :attr:`doctype` attribute will be set to "
|
|
"``None`` instead of an instance of this interface."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:468
|
|
msgid ""
|
|
":class:`DocumentType` is a specialization of :class:`Node`, and adds the "
|
|
"following attributes:"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:474
|
|
msgid ""
|
|
"The public identifier for the external subset of the document type "
|
|
"definition. This will be a string or ``None``."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:480
|
|
msgid ""
|
|
"The system identifier for the external subset of the document type "
|
|
"definition. This will be a URI as a string, or ``None``."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:486
|
|
msgid ""
|
|
"A string giving the complete internal subset from the document. This does "
|
|
"not include the brackets which enclose the subset. If the document has no "
|
|
"internal subset, this should be ``None``."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:493
|
|
msgid ""
|
|
"The name of the root element as given in the ``DOCTYPE`` declaration, if "
|
|
"present."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:499
|
|
msgid ""
|
|
"This is a :class:`NamedNodeMap` giving the definitions of external entities. "
|
|
"For entity names defined more than once, only the first definition is "
|
|
"provided (others are ignored as required by the XML recommendation). This "
|
|
"may be ``None`` if the information is not provided by the parser, or if no "
|
|
"entities are defined."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:508
|
|
msgid ""
|
|
"This is a :class:`NamedNodeMap` giving the definitions of notations. For "
|
|
"notation names defined more than once, only the first definition is provided "
|
|
"(others are ignored as required by the XML recommendation). This may be "
|
|
"``None`` if the information is not provided by the parser, or if no "
|
|
"notations are defined."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:518
|
|
msgid "Document Objects"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:520
|
|
msgid ""
|
|
"A :class:`Document` represents an entire XML document, including its "
|
|
"constituent elements, attributes, processing instructions, comments etc. "
|
|
"Remember that it inherits properties from :class:`Node`."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:527
|
|
msgid "The one and only root element of the document."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:532
|
|
msgid ""
|
|
"Create and return a new element node. The element is not inserted into the "
|
|
"document when it is created. You need to explicitly insert it with one of "
|
|
"the other methods such as :meth:`insertBefore` or :meth:`appendChild`."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:539
|
|
msgid ""
|
|
"Create and return a new element with a namespace. The *tagName* may have a "
|
|
"prefix. The element is not inserted into the document when it is created. "
|
|
"You need to explicitly insert it with one of the other methods such as :meth:"
|
|
"`insertBefore` or :meth:`appendChild`."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:547
|
|
msgid ""
|
|
"Create and return a text node containing the data passed as a parameter. As "
|
|
"with the other creation methods, this one does not insert the node into the "
|
|
"tree."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:554
|
|
msgid ""
|
|
"Create and return a comment node containing the data passed as a parameter. "
|
|
"As with the other creation methods, this one does not insert the node into "
|
|
"the tree."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:561
|
|
msgid ""
|
|
"Create and return a processing instruction node containing the *target* and "
|
|
"*data* passed as parameters. As with the other creation methods, this one "
|
|
"does not insert the node into the tree."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:568
|
|
msgid ""
|
|
"Create and return an attribute node. This method does not associate the "
|
|
"attribute node with any particular element. You must use :meth:"
|
|
"`setAttributeNode` on the appropriate :class:`Element` object to use the "
|
|
"newly created attribute instance."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:576
|
|
msgid ""
|
|
"Create and return an attribute node with a namespace. The *tagName* may "
|
|
"have a prefix. This method does not associate the attribute node with any "
|
|
"particular element. You must use :meth:`setAttributeNode` on the "
|
|
"appropriate :class:`Element` object to use the newly created attribute "
|
|
"instance."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:584
|
|
msgid ""
|
|
"Search for all descendants (direct children, children's children, etc.) with "
|
|
"a particular element type name."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:590
|
|
msgid ""
|
|
"Search for all descendants (direct children, children's children, etc.) with "
|
|
"a particular namespace URI and localname. The localname is the part of the "
|
|
"namespace after the prefix."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:598
|
|
msgid "Element Objects"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:600
|
|
msgid ""
|
|
":class:`Element` is a subclass of :class:`Node`, so inherits all the "
|
|
"attributes of that class."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:606
|
|
msgid ""
|
|
"The element type name. In a namespace-using document it may have colons in "
|
|
"it. The value is a string."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:612 ../Doc/library/xml.dom.rst:617
|
|
msgid "Same as equivalent method in the :class:`Document` class."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:622
|
|
msgid "Returns true if the element has an attribute named by *name*."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:627
|
|
msgid ""
|
|
"Returns true if the element has an attribute named by *namespaceURI* and "
|
|
"*localName*."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:633
|
|
msgid ""
|
|
"Return the value of the attribute named by *name* as a string. If no such "
|
|
"attribute exists, an empty string is returned, as if the attribute had no "
|
|
"value."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:639
|
|
msgid "Return the :class:`Attr` node for the attribute named by *attrname*."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:644
|
|
msgid ""
|
|
"Return the value of the attribute named by *namespaceURI* and *localName* as "
|
|
"a string. If no such attribute exists, an empty string is returned, as if "
|
|
"the attribute had no value."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:651
|
|
msgid ""
|
|
"Return an attribute value as a node, given a *namespaceURI* and *localName*."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:656
|
|
msgid ""
|
|
"Remove an attribute by name. If there is no matching attribute, a :exc:"
|
|
"`NotFoundErr` is raised."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:662
|
|
msgid ""
|
|
"Remove and return *oldAttr* from the attribute list, if present. If "
|
|
"*oldAttr* is not present, :exc:`NotFoundErr` is raised."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:668
|
|
msgid ""
|
|
"Remove an attribute by name. Note that it uses a localName, not a qname. "
|
|
"No exception is raised if there is no matching attribute."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:674
|
|
msgid "Set an attribute value from a string."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:679
|
|
msgid ""
|
|
"Add a new attribute node to the element, replacing an existing attribute if "
|
|
"necessary if the :attr:`name` attribute matches. If a replacement occurs, "
|
|
"the old attribute node will be returned. If *newAttr* is already in use, :"
|
|
"exc:`InuseAttributeErr` will be raised."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:687
|
|
msgid ""
|
|
"Add a new attribute node to the element, replacing an existing attribute if "
|
|
"necessary if the :attr:`namespaceURI` and :attr:`localName` attributes "
|
|
"match. If a replacement occurs, the old attribute node will be returned. If "
|
|
"*newAttr* is already in use, :exc:`InuseAttributeErr` will be raised."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:695
|
|
msgid ""
|
|
"Set an attribute value from a string, given a *namespaceURI* and a *qname*. "
|
|
"Note that a qname is the whole attribute name. This is different than above."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:702
|
|
msgid "Attr Objects"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:704
|
|
msgid ""
|
|
":class:`Attr` inherits from :class:`Node`, so inherits all its attributes."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:709
|
|
msgid ""
|
|
"The attribute name. In a namespace-using document it may include a colon."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:715
|
|
msgid ""
|
|
"The part of the name following the colon if there is one, else the entire "
|
|
"name. This is a read-only attribute."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:722
|
|
msgid ""
|
|
"The part of the name preceding the colon if there is one, else the empty "
|
|
"string."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:728
|
|
msgid ""
|
|
"The text value of the attribute. This is a synonym for the :attr:"
|
|
"`nodeValue` attribute."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:735
|
|
msgid "NamedNodeMap Objects"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:737
|
|
msgid ":class:`NamedNodeMap` does *not* inherit from :class:`Node`."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:742
|
|
msgid "The length of the attribute list."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:747
|
|
msgid ""
|
|
"Return an attribute with a particular index. The order you get the "
|
|
"attributes in is arbitrary but will be consistent for the life of a DOM. "
|
|
"Each item is an attribute node. Get its value with the :attr:`value` "
|
|
"attribute."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:751
|
|
msgid ""
|
|
"There are also experimental methods that give this class more mapping "
|
|
"behavior. You can use them or you can use the standardized :meth:"
|
|
"`getAttribute\\*` family of methods on the :class:`Element` objects."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:759
|
|
msgid "Comment Objects"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:761
|
|
msgid ""
|
|
":class:`Comment` represents a comment in the XML document. It is a subclass "
|
|
"of :class:`Node`, but cannot have child nodes."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:767
|
|
msgid ""
|
|
"The content of the comment as a string. The attribute contains all "
|
|
"characters between the leading ``<!-``\\ ``-`` and trailing ``-``\\ ``->``, "
|
|
"but does not include them."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:775
|
|
msgid "Text and CDATASection Objects"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:777
|
|
msgid ""
|
|
"The :class:`Text` interface represents text in the XML document. If the "
|
|
"parser and DOM implementation support the DOM's XML extension, portions of "
|
|
"the text enclosed in CDATA marked sections are stored in :class:"
|
|
"`CDATASection` objects. These two interfaces are identical, but provide "
|
|
"different values for the :attr:`nodeType` attribute."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:783
|
|
msgid ""
|
|
"These interfaces extend the :class:`Node` interface. They cannot have child "
|
|
"nodes."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:789
|
|
msgid "The content of the text node as a string."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:793
|
|
msgid ""
|
|
"The use of a :class:`CDATASection` node does not indicate that the node "
|
|
"represents a complete CDATA marked section, only that the content of the "
|
|
"node was part of a CDATA section. A single CDATA section may be represented "
|
|
"by more than one node in the document tree. There is no way to determine "
|
|
"whether two adjacent :class:`CDATASection` nodes represent different CDATA "
|
|
"marked sections."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:803
|
|
msgid "ProcessingInstruction Objects"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:805
|
|
msgid ""
|
|
"Represents a processing instruction in the XML document; this inherits from "
|
|
"the :class:`Node` interface and cannot have child nodes."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:811
|
|
msgid ""
|
|
"The content of the processing instruction up to the first whitespace "
|
|
"character. This is a read-only attribute."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:817
|
|
msgid ""
|
|
"The content of the processing instruction following the first whitespace "
|
|
"character."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:824
|
|
msgid "Exceptions"
|
|
msgstr "Les exceptions"
|
|
|
|
#: ../Doc/library/xml.dom.rst:828
|
|
msgid ""
|
|
"The DOM Level 2 recommendation defines a single exception, :exc:"
|
|
"`DOMException`, and a number of constants that allow applications to "
|
|
"determine what sort of error occurred. :exc:`DOMException` instances carry "
|
|
"a :attr:`code` attribute that provides the appropriate value for the "
|
|
"specific exception."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:833
|
|
msgid ""
|
|
"The Python DOM interface provides the constants, but also expands the set of "
|
|
"exceptions so that a specific exception exists for each of the exception "
|
|
"codes defined by the DOM. The implementations must raise the appropriate "
|
|
"specific exception, each of which carries the appropriate value for the :"
|
|
"attr:`code` attribute."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:842
|
|
msgid ""
|
|
"Base exception class used for all specific DOM exceptions. This exception "
|
|
"class cannot be directly instantiated."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:848
|
|
msgid ""
|
|
"Raised when a specified range of text does not fit into a string. This is "
|
|
"not known to be used in the Python DOM implementations, but may be received "
|
|
"from DOM implementations not written in Python."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:855
|
|
msgid ""
|
|
"Raised when an attempt is made to insert a node where the node type is not "
|
|
"allowed."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:861
|
|
msgid ""
|
|
"Raised when an index or size parameter to a method is negative or exceeds "
|
|
"the allowed values."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:867
|
|
msgid ""
|
|
"Raised when an attempt is made to insert an :class:`Attr` node that is "
|
|
"already present elsewhere in the document."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:873
|
|
msgid ""
|
|
"Raised if a parameter or an operation is not supported on the underlying "
|
|
"object."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:878
|
|
msgid ""
|
|
"This exception is raised when a string parameter contains a character that "
|
|
"is not permitted in the context it's being used in by the XML 1.0 "
|
|
"recommendation. For example, attempting to create an :class:`Element` node "
|
|
"with a space in the element type name will cause this error to be raised."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:886
|
|
msgid "Raised when an attempt is made to modify the type of a node."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:891
|
|
msgid ""
|
|
"Raised when an attempt is made to use an object that is not defined or is no "
|
|
"longer usable."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:897
|
|
msgid ""
|
|
"If an attempt is made to change any object in a way that is not permitted "
|
|
"with regard to the `Namespaces in XML <https://www.w3.org/TR/REC-xml-names/"
|
|
">`_ recommendation, this exception is raised."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:904
|
|
msgid ""
|
|
"Exception when a node does not exist in the referenced context. For "
|
|
"example, :meth:`NamedNodeMap.removeNamedItem` will raise this if the node "
|
|
"passed in does not exist in the map."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:911
|
|
msgid ""
|
|
"Raised when the implementation does not support the requested type of object "
|
|
"or operation."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:917
|
|
msgid ""
|
|
"This is raised if data is specified for a node which does not support data."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:924
|
|
msgid ""
|
|
"Raised on attempts to modify an object where modifications are not allowed "
|
|
"(such as for read-only nodes)."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:930
|
|
msgid "Raised when an invalid or illegal string is specified."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:937
|
|
msgid ""
|
|
"Raised when a node is inserted in a different document than it currently "
|
|
"belongs to, and the implementation does not support migrating the node from "
|
|
"one document to the other."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:941
|
|
msgid ""
|
|
"The exception codes defined in the DOM recommendation map to the exceptions "
|
|
"described above according to this table:"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:945
|
|
msgid "Constant"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:945
|
|
msgid "Exception"
|
|
msgstr "Exception"
|
|
|
|
#: ../Doc/library/xml.dom.rst:947
|
|
msgid ":const:`DOMSTRING_SIZE_ERR`"
|
|
msgstr ":const:`DOMSTRING_SIZE_ERR`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:947
|
|
msgid ":exc:`DomstringSizeErr`"
|
|
msgstr ":exc:`DomstringSizeErr`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:949
|
|
msgid ":const:`HIERARCHY_REQUEST_ERR`"
|
|
msgstr ":const:`HIERARCHY_REQUEST_ERR`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:949
|
|
msgid ":exc:`HierarchyRequestErr`"
|
|
msgstr ":exc:`HierarchyRequestErr`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:951
|
|
msgid ":const:`INDEX_SIZE_ERR`"
|
|
msgstr ":const:`INDEX_SIZE_ERR`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:951
|
|
msgid ":exc:`IndexSizeErr`"
|
|
msgstr ":exc:`IndexSizeErr`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:953
|
|
msgid ":const:`INUSE_ATTRIBUTE_ERR`"
|
|
msgstr ":const:`INUSE_ATTRIBUTE_ERR`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:953
|
|
msgid ":exc:`InuseAttributeErr`"
|
|
msgstr ":exc:`InuseAttributeErr`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:955
|
|
msgid ":const:`INVALID_ACCESS_ERR`"
|
|
msgstr ":const:`INVALID_ACCESS_ERR`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:955
|
|
msgid ":exc:`InvalidAccessErr`"
|
|
msgstr ":exc:`InvalidAccessErr`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:957
|
|
msgid ":const:`INVALID_CHARACTER_ERR`"
|
|
msgstr ":const:`INVALID_CHARACTER_ERR`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:957
|
|
msgid ":exc:`InvalidCharacterErr`"
|
|
msgstr ":exc:`InvalidCharacterErr`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:959
|
|
msgid ":const:`INVALID_MODIFICATION_ERR`"
|
|
msgstr ":const:`INVALID_MODIFICATION_ERR`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:959
|
|
msgid ":exc:`InvalidModificationErr`"
|
|
msgstr ":exc:`InvalidModificationErr`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:961
|
|
msgid ":const:`INVALID_STATE_ERR`"
|
|
msgstr ":const:`INVALID_STATE_ERR`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:961
|
|
msgid ":exc:`InvalidStateErr`"
|
|
msgstr ":exc:`InvalidStateErr`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:963
|
|
msgid ":const:`NAMESPACE_ERR`"
|
|
msgstr ":const:`NAMESPACE_ERR`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:963
|
|
msgid ":exc:`NamespaceErr`"
|
|
msgstr ":exc:`NamespaceErr`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:965
|
|
msgid ":const:`NOT_FOUND_ERR`"
|
|
msgstr ":const:`NOT_FOUND_ERR`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:965
|
|
msgid ":exc:`NotFoundErr`"
|
|
msgstr ":exc:`NotFoundErr`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:967
|
|
msgid ":const:`NOT_SUPPORTED_ERR`"
|
|
msgstr ":const:`NOT_SUPPORTED_ERR`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:967
|
|
msgid ":exc:`NotSupportedErr`"
|
|
msgstr ":exc:`NotSupportedErr`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:969
|
|
msgid ":const:`NO_DATA_ALLOWED_ERR`"
|
|
msgstr ":const:`NO_DATA_ALLOWED_ERR`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:969
|
|
msgid ":exc:`NoDataAllowedErr`"
|
|
msgstr ":exc:`NoDataAllowedErr`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:971
|
|
msgid ":const:`NO_MODIFICATION_ALLOWED_ERR`"
|
|
msgstr ":const:`NO_MODIFICATION_ALLOWED_ERR`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:971
|
|
msgid ":exc:`NoModificationAllowedErr`"
|
|
msgstr ":exc:`NoModificationAllowedErr`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:973
|
|
msgid ":const:`SYNTAX_ERR`"
|
|
msgstr ":const:`SYNTAX_ERR`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:973
|
|
msgid ":exc:`SyntaxErr`"
|
|
msgstr ":exc:`SyntaxErr`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:975
|
|
msgid ":const:`WRONG_DOCUMENT_ERR`"
|
|
msgstr ":const:`WRONG_DOCUMENT_ERR`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:975
|
|
msgid ":exc:`WrongDocumentErr`"
|
|
msgstr ":exc:`WrongDocumentErr`"
|
|
|
|
#: ../Doc/library/xml.dom.rst:982
|
|
msgid "Conformance"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:984
|
|
msgid ""
|
|
"This section describes the conformance requirements and relationships "
|
|
"between the Python DOM API, the W3C DOM recommendations, and the OMG IDL "
|
|
"mapping for Python."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:992
|
|
msgid "Type Mapping"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:994
|
|
msgid ""
|
|
"The primitive IDL types used in the DOM specification are mapped to Python "
|
|
"types according to the following table."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:998
|
|
msgid "IDL Type"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:998
|
|
msgid "Python Type"
|
|
msgstr "Type Python"
|
|
|
|
#: ../Doc/library/xml.dom.rst:1000
|
|
msgid "``boolean``"
|
|
msgstr "``boolean``"
|
|
|
|
#: ../Doc/library/xml.dom.rst:1000
|
|
msgid "``IntegerType`` (with a value of ``0`` or ``1``)"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:1003
|
|
msgid "``int``"
|
|
msgstr "``int``"
|
|
|
|
#: ../Doc/library/xml.dom.rst:1003 ../Doc/library/xml.dom.rst:1005
|
|
#: ../Doc/library/xml.dom.rst:1007
|
|
msgid "``IntegerType``"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:1005
|
|
msgid "``long int``"
|
|
msgstr "``long int``"
|
|
|
|
#: ../Doc/library/xml.dom.rst:1007
|
|
msgid "``unsigned int``"
|
|
msgstr "``unsigned int``"
|
|
|
|
#: ../Doc/library/xml.dom.rst:1010
|
|
msgid ""
|
|
"Additionally, the :class:`DOMString` defined in the recommendation is mapped "
|
|
"to a Python string or Unicode string. Applications should be able to handle "
|
|
"Unicode whenever a string is returned from the DOM."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:1014
|
|
msgid ""
|
|
"The IDL ``null`` value is mapped to ``None``, which may be accepted or "
|
|
"provided by the implementation whenever ``null`` is allowed by the API."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:1021
|
|
msgid "Accessor Methods"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:1023
|
|
msgid ""
|
|
"The mapping from OMG IDL to Python defines accessor functions for IDL "
|
|
"``attribute`` declarations in much the way the Java mapping does. Mapping "
|
|
"the IDL declarations ::"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:1030
|
|
msgid ""
|
|
"yields three accessor functions: a \"get\" method for :attr:`someValue` (:"
|
|
"meth:`_get_someValue`), and \"get\" and \"set\" methods for :attr:"
|
|
"`anotherValue` (:meth:`_get_anotherValue` and :meth:`_set_anotherValue`). "
|
|
"The mapping, in particular, does not require that the IDL attributes are "
|
|
"accessible as normal Python attributes: ``object.someValue`` is *not* "
|
|
"required to work, and may raise an :exc:`AttributeError`."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:1037
|
|
msgid ""
|
|
"The Python DOM API, however, *does* require that normal attribute access "
|
|
"work. This means that the typical surrogates generated by Python IDL "
|
|
"compilers are not likely to work, and wrapper objects may be needed on the "
|
|
"client if the DOM objects are accessed via CORBA. While this does require "
|
|
"some additional consideration for CORBA DOM clients, the implementers with "
|
|
"experience using DOM over CORBA from Python do not consider this a problem. "
|
|
"Attributes that are declared ``readonly`` may not restrict write access in "
|
|
"all DOM implementations."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:1046
|
|
msgid ""
|
|
"In the Python DOM API, accessor functions are not required. If provided, "
|
|
"they should take the form defined by the Python IDL mapping, but these "
|
|
"methods are considered unnecessary since the attributes are accessible "
|
|
"directly from Python. \"Set\" accessors should never be provided for "
|
|
"``readonly`` attributes."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/xml.dom.rst:1051
|
|
msgid ""
|
|
"The IDL definitions do not fully embody the requirements of the W3C DOM API, "
|
|
"such as the notion of certain objects, such as the return value of :meth:"
|
|
"`getElementsByTagName`, being \"live\". The Python DOM API does not require "
|
|
"implementations to enforce such requirements."
|
|
msgstr ""
|