*** xmldom.tex.old Wed Oct 20 22:55:32 2004 --- xmldom.tex Thu Oct 21 02:22:38 2004 *************** *** 84,91 **** \seetitle[http://pyxml.sourceforge.net]{PyXML}{Users that require a full-featured implementation of DOM should use the PyXML package.} ! \seetitle[http://cgi.omg.org/cgi-bin/doc?orbos/99-08-02.pdf]{CORBA ! Scripting with Python} {This specifies the mapping from OMG IDL to Python.} \end{seealso} --- 84,91 ---- \seetitle[http://pyxml.sourceforge.net]{PyXML}{Users that require a full-featured implementation of DOM should use the PyXML package.} ! \seetitle[http://www.omg.org/docs/formal/02-11-05.pdf]{Python ! Language Mapping Specification} {This specifies the mapping from OMG IDL to Python.} \end{seealso} *************** *** 213,218 **** --- 213,236 ---- \class{DOMImplementation} as well. \begin{methoddesc}[DOMImplementation]{hasFeature}{feature, version} + Return true if the feature identified by the pair of strings + \var{feature} and \var{version} is implemented. + \end{methoddesc} + + \begin{methoddesc}[DOMImplementation]{createDocument}{namespaceUri, qualifiedName, doctype} + Return a new \class{Document} object (the root of the DOM), with a + child \class{Element} object having the given \var{namespaceUri} and + \var{qualifiedName}. The \var{doctype} must be a \class{DocumentType} + object created by \method{createDocumentType()}, or \code{None}. + In the Python DOM API, the first two arguments can also be \code{None} + in order to indicate that no \class{Element} child is to be created. + \end{methoddesc} + + \begin{methoddesc}[DOMImplementation]{createDocumentType}{qualifiedName, publicId, systemId} + Return a new \class{DocumentType} object that encapsulates the given + \var{qualifiedName}, \var{publicId}, and \var{systemId} strings, + representing the information contained in an XML document type + declaration. \end{methoddesc} *************** *** 543,550 **** Same as equivalent method in the \class{Document} class. \end{methoddesc} \begin{methoddesc}[Element]{getAttribute}{attname} ! Return an attribute value as a string. \end{methoddesc} \begin{methoddesc}[Element]{getAttributeNode}{attrname} --- 561,579 ---- Same as equivalent method in the \class{Document} class. \end{methoddesc} + \begin{methoddesc}[Element]{hasAttribute}{attname} + Returns true if the element has an attribute named by \var{attname}. + \end{methoddesc} + + \begin{methoddesc}[Element]{hasAttributeNS}{namespaceURI, localName} + Returns true if the element has an attribute named by + \var{namespaceURI} and \var{localName}. + \end{methoddesc} + \begin{methoddesc}[Element]{getAttribute}{attname} ! Return the value of the attribute named by \var{attname} as a ! string. If no such attribute exists, an empty string is returned, ! as if the attribute had no value. \end{methoddesc} \begin{methoddesc}[Element]{getAttributeNode}{attrname} *************** *** 553,560 **** \end{methoddesc} \begin{methoddesc}[Element]{getAttributeNS}{namespaceURI, localName} ! Return an attribute value as a string, given a \var{namespaceURI} and ! \var{localName}. \end{methoddesc} \begin{methoddesc}[Element]{getAttributeNodeNS}{namespaceURI, localName} --- 582,590 ---- \end{methoddesc} \begin{methoddesc}[Element]{getAttributeNS}{namespaceURI, localName} ! Return the value of the attribute named by \var{namespaceURI} and ! \var{localName} as a string. If no such attribute exists, an empty ! string is returned, as if the attribute had no value. \end{methoddesc} \begin{methoddesc}[Element]{getAttributeNodeNS}{namespaceURI, localName} *************** *** 884,891 **** \keyword{readonly} may not restrict write access in all DOM implementations. ! Additionally, the 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 \keyword{readonly} attributes. --- 914,926 ---- \keyword{readonly} may not restrict write access in all DOM implementations. ! 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 \keyword{readonly} attributes. + + 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 + \method{getElementsByTagName()}, being ``live''. The Python DOM API + does not require implementations to enforce such requirements.