Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 73e8ebf

Browse files
committed
Revise text about the level of DOM support, and provide pointers to
the work of the XML-SIG in the main body of the text. Modify the markup in a few places to avoid wrapping lines in bad places, and just general cleanliness.
1 parent 0606791 commit 73e8ebf

1 file changed

Lines changed: 32 additions & 23 deletions

File tree

Doc/lib/xmldom.tex

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,25 @@ \section{\module{xml.dom} ---
3939

4040
The Document Object Model is being defined by the W3C in stages, or
4141
``levels'' in their terminology. The Python mapping of the API is
42-
substantially based on the DOM Level 2 recommendation. Some aspects
43-
of the API will only become available in future Python releases, or
44-
may only be available in particular DOM implementations.
42+
substantially based on the DOM Level~2 recommendation. The mapping of
43+
the Level~3 specification, currently only available in draft form, is
44+
being developed by the \ulink{Python XML Special Interest
45+
Group}{http://www.python.org/sigs/xml-sig/} as part of the
46+
\ulink{PyXML package}{http://pyxml.sourceforge.net/}. Refer to the
47+
documentation bundled with that package for information on the current
48+
state of DOM Level~3 support.
4549

4650
DOM applications typically start by parsing some XML into a DOM. How
47-
this is accomplished is not covered at all by DOM Level 1, and Level 2
51+
this is accomplished is not covered at all by DOM Level~1, and Level~2
4852
provides only limited improvements: There is a
4953
\class{DOMImplementation} object class which provides access to
5054
\class{Document} creation methods, but no way to access an XML
5155
reader/parser/Document builder in an implementation-independent way.
5256
There is also no well-defined way to access these methods without an
5357
existing \class{Document} object. In Python, each DOM implementation
54-
will provide a function \function{getDOMImplementation}. DOM Level 3
58+
will provide a function \function{getDOMImplementation()}. DOM Level~3
5559
adds a Load/Store specification, which defines an interface to the
56-
reader, but this is not implemented in Python.
60+
reader, but this is not yet available in the Python standard library.
5761

5862
Once you have a DOM document object, you can access the parts of your
5963
XML document through its properties and methods. These properties are
@@ -70,11 +74,11 @@ \section{\module{xml.dom} ---
7074

7175
\begin{seealso}
7276
\seetitle[http://www.w3.org/TR/DOM-Level-2-Core/]{Document Object
73-
Model (DOM) Level 2 Specification}
77+
Model (DOM) Level~2 Specification}
7478
{The W3C recommendation upon which the Python DOM API is
7579
based.}
7680
\seetitle[http://www.w3.org/TR/REC-DOM-Level-1/]{Document Object
77-
Model (DOM) Level 1 Specification}
81+
Model (DOM) Level~1 Specification}
7882
{The W3C recommendation for the
7983
DOM supported by \module{xml.dom.minidom}.}
8084
\seetitle[http://pyxml.sourceforge.net]{PyXML}{Users that require a
@@ -137,7 +141,7 @@ \subsection{Module Contents}
137141
\begin{datadesc}{XMLNS_NAMESPACE}
138142
The namespace URI for namespace declarations, as defined by
139143
\citetitle[http://www.w3.org/TR/DOM-Level-2-Core/core.html]{Document
140-
Object Model (DOM) Level 2 Core Specification} (section~1.1.8).
144+
Object Model (DOM) Level~2 Core Specification} (section~1.1.8).
141145
\versionadded{2.2}
142146
\end{datadesc}
143147

@@ -204,7 +208,7 @@ \subsubsection{DOMImplementation Objects
204208

205209
The \class{DOMImplementation} interface provides a way for
206210
applications to determine the availability of particular features in
207-
the DOM they are using. DOM Level 2 added the ability to create new
211+
the DOM they are using. DOM Level~2 added the ability to create new
208212
\class{Document} and \class{DocumentType} objects using the
209213
\class{DOMImplementation} as well.
210214

@@ -319,11 +323,13 @@ \subsubsection{Node Objects \label{dom-node-objects}}
319323
of proxy architecture (because more than one object can refer to the
320324
same node).
321325

322-
\note{This is based on a proposed DOM Level 3 API which is
323-
still in the ``working draft'' stage, but this particular interface
324-
appears uncontroversial. Changes from the W3C will not necessarily
325-
affect this method in the Python DOM interface (though any new W3C
326-
API for this would also be supported).}
326+
\begin{notice}
327+
This is based on a proposed DOM Level~3 API which is still in the
328+
``working draft'' stage, but this particular interface appears
329+
uncontroversial. Changes from the W3C will not necessarily affect
330+
this method in the Python DOM interface (though any new W3C API for
331+
this would also be supported).
332+
\end{notice}
327333
\end{methoddesc}
328334

329335
\begin{methoddesc}[Node]{appendChild}{newChild}
@@ -372,7 +378,7 @@ \subsubsection{NodeList Objects \label{dom-nodelist-objects}}
372378
\method{getElementsByTagNameNS()} methods of \class{Node} return
373379
objects with this interface to represent query results.
374380

375-
The DOM Level 2 recommendation defines one method and one attribute
381+
The DOM Level~2 recommendation defines one method and one attribute
376382
for these objects:
377383

378384
\begin{methoddesc}[NodeList]{item}{i}
@@ -667,12 +673,15 @@ \subsubsection{Text and CDATASection Objects \label{dom-text-objects}}
667673
The content of the text node as a string.
668674
\end{memberdesc}
669675

670-
\note{The use of a \class{CDATASection} node does not
671-
indicate that the node represents a complete CDATA marked section,
672-
only that the content of the node was part of a CDATA section. A
673-
single CDATA section may be represented by more than one node in the
674-
document tree. There is no way to determine whether two adjacent
675-
\class{CDATASection} nodes represent different CDATA marked sections.}
676+
\begin{notice}
677+
The use of a \class{CDATASection} node does not indicate that the
678+
node represents a complete CDATA marked section, only that the
679+
content of the node was part of a CDATA section. A single CDATA
680+
section may be represented by more than one node in the document
681+
tree. There is no way to determine whether two adjacent
682+
\class{CDATASection} nodes represent different CDATA marked
683+
sections.
684+
\end{notice}
676685

677686

678687
\subsubsection{ProcessingInstruction Objects \label{dom-pi-objects}}
@@ -695,7 +704,7 @@ \subsubsection{Exceptions \label{dom-exceptions}}
695704

696705
\versionadded{2.1}
697706

698-
The DOM Level 2 recommendation defines a single exception,
707+
The DOM Level~2 recommendation defines a single exception,
699708
\exception{DOMException}, and a number of constants that allow
700709
applications to determine what sort of error occurred.
701710
\exception{DOMException} instances carry a \member{code} attribute

0 commit comments

Comments
 (0)