[Zope3-checkins] CVS: zopeproducts/xml/interfaces/dom - __init__.py:1.1 core.py:1.1 loadsave.py:1.1 traversal.py:1.1 xmlextended.py:1.1

Philipp von Weitershausen philikon@philikon.de
Fri, 20 Jun 2003 11:11:42 -0400


Update of /cvs-repository/zopeproducts/xml/interfaces/dom
In directory cvs.zope.org:/tmp/cvs-serv15767/xml/interfaces/dom

Added Files:
	__init__.py core.py loadsave.py traversal.py xmlextended.py 
Log Message:
Moved the xml_examples, xslt, xslt_examples and xmldom products to one
xml product.


=== Added File zopeproducts/xml/interfaces/dom/__init__.py ===
# this is a package 


=== Added File zopeproducts/xml/interfaces/dom/core.py ===
##############################################################################
#
# Copyright (c) 2003 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""
DOM core interfaces

See the W3C DOM Level 3 specification for detailled documentation:
http://www.w3.org/TR/DOM-Level-3-Core/core.html

$Id: core.py,v 1.1 2003/06/20 15:11:41 philikon Exp $
"""

from zope.interface import Interface, Attribute
from zope.app.interfaces.xml.source import IXMLSource

class IDOMStringList(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-3-Core/core.html
    """
    # introduced in DOM Level 3

    length = Attribute(
        "length",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    def item(index):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

class INameList(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-3-Core/core.html
    """
    # introduced in DOM Level 3

    length = Attribute(
        "length",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    def getName(index):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def getNamespaceURI(index):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

class IDOMImplementationList(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-3-Core/core.html
    """
    # introduced in DOM Level 3

    length = Attribute(
        "length",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    def item(index):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

class IDOMImplementationSource(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-3-Core/core.html
    """
    # introduced in DOM Level 3

    def getDOMImplementation(features):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def getDOMImplementations(features):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

class IDOMImplementation(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-3-Core/core.html
    """

    def createDocument(namespaceURI, qualifiedName, doctype):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def createDocumentType(qualifiedName, publicId, systemId):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def getFeature(feature, version):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """
        # introduced in DOM Level 3

    def hasFeature(feature, version):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

class INode(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-3-Core/core.html
    """

    #
    # Definition group NodeType
    #

    ELEMENT_NODE                = Attribute("ELEMENT_NODE")
    ATTRIBUTE_NODE              = Attribute("ATTRIBUTE_NODE")
    TEXT_NODE                   = Attribute("TEXT_NODE")
    CDATA_SECTION_NODE          = Attribute("CDATA_SECTION_NODE")
    ENTITY_REFERENCE_NODE       = Attribute("ENTITY_REFERENCE_NODE")
    ENTITY_NODE                 = Attribute("ENTITY_NODE")
    PROCESSING_INSTRUCTION_NODE = Attribute("PROCESSING_INSTRUCTION_NODE")
    COMMENT_NODE                = Attribute("COMMENT_NODE")
    DOCUMENT_NODE               = Attribute("DOCUMENT_NODE")
    DOCUMENT_TYPE_NODE          = Attribute("DOCUMENT_TYPE_NODE")
    DOCUMENT_FRAGMENT_NODE      = Attribute("DOCUMENT_FRAGMENT_NODE")
    NOTATION_NODE               = Attribute("NOTATION_NODE")

    #
    # Definition group DocumentPosition
    #

    DOCUMENT_POSITION_DISCONNECTED = Attribute("DOCUMENT_POSITION_DISCONNECTED")
    DOCUMENT_POSITION_PRECEDING    = Attribute("DOCUMENT_POSITION_PRECEDING")
    DOCUMENT_POSITION_FOLLOWING    = Attribute("DOCUMENT_POSITION_FOLLOWING")
    DOCUMENT_POSITION_CONTAINS     = Attribute("DOCUMENT_POSITION_CONTAINS")
    DOCUMENT_POSITION_CONTAINED_BY = Attribute("DOCUMENT_POSITION_CONTAINED_BY")
    DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = Attribute(
        "DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC")

    #
    # Attributes
    #

    attributes = Attribute(
        "attributes",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    baseURI = Attribute(
        "baseURI",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        # introduced in DOM Level 3
        )

    childNodes = Attribute(
        "childNodes",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    firstChild = Attribute(
        "firstChild",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    lastChild = Attribute(
        "lastChild",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    localName = Attribute(
        "localName",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    namespaceURI = Attribute(
        "namespaceURI",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    nextSibling = Attribute(
        "nextSibling",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    nodeName = Attribute(
        "nodeName",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    nodeType = Attribute(
        "nodeType",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    nodeValue = Attribute(
        "nodeValue",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    ownerDocument = Attribute(
        "ownerDocument",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    parentNode = Attribute(
        "parentNode",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    prefix = Attribute(
        "prefix",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    previousSibling = Attribute(
        "previousSibling",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    textContent = Attribute(
        "textContent",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        # introduced in DOM Level 3
        )

    #
    # Methods
    #

    def appendChild(newChild):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def cloneNode(deep):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def compareDocumentPosition(other):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """
        # introduced in DOM Level 3

    def getFeature(feature, version):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """
        # introduced in DOM Level 3

    def getUserData(key):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """
        # introduced in DOM Level 3

    def hasAttributes():
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def hasChildNodes():
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def insertBefore(newChild, refChild):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def isDefaultNamespace(namespaceURI):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """
        # introduced in DOM Level 3

    def isEqualNode(arg):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """
        # introduced in DOM Level 3

    def isSameNode(other):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """
        # introduced in DOM Level 3

    def isSupported(feature, version):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def lookupNamespaceURI(prefix):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """
        # introduced in DOM Level 3

    def lookupPrefix(namespaceURI):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """
        # introduced in DOM Level 3

    def normalize():
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def removeChild(oldChild):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def replaceChild(newChild, oldChild):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def setUserData(key, data, handler):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """
        # introduced in DOM Level 3

class IDocument(INode, IXMLSource):
    """
    See http://www.w3.org/TR/DOM-Level-3-Core/core.html
    """

    #
    # Attributes
    #

    actualEncoding = Attribute(
        "actualEncoding",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        # introduced in DOM Level 3
        )

    config = Attribute(
        "config",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        # introduced in DOM Level 3
        )

    doctype = Attribute(
        "doctype",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    documentElement = Attribute(
        "documentElement",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    documentURI = Attribute(
        "documentURI",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        # introduced in DOM Level 3
        )

    implementation = Attribute(
        "implementation",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    strictErrorChecking = Attribute(
        "strictErrorChecking",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        # introduced in DOM Level 3
        )

    xmlEncoding = Attribute(
        "xmlEncoding",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        # introduced in DOM Level 3
        )

    xmlStandalone = Attribute(
        "xmlStandalone",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        # introduced in DOM Level 3
        )

    xmlVersion = Attribute(
        "xmlVersion",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        # introduced in DOM Level 3
        )

    #
    # Methods
    #

    def adoptNode(source):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """
        # introduced in DOM Level 3

    def createAttribute(name):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def createAttributeNS(namespaceURI, qualifiedName):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def createCDATASection(data):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def createComment(data):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def createDocumentFragment():
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def createElement(tagElement):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def createElementNS(namespaceURI, qualifiedName):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def createEntityReference(name):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def createProcessingInstruction(target, data):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def createTextNode(data):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def getElementById(elementId):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def getElementsByTagName(tagname):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def getElementsByTagNameNS(namespaceURI, localName):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def importNode(importedNode, deep):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def normalizeDocument():
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """
        # introduced in DOM Level 3

    def renameNode(n, namespaceURI, qualifiedName):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """
        # introduced in DOM Level 3

class IDocumentFragment(INode):
    """
    See http://www.w3.org/TR/DOM-Level-3-Core/core.html
    """

class INodeList(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-3-Core/core.html
    """

    length = Attribute(
        "length",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    def item(index):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

class INamedNodeMap(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-3-Core/core.html
    """

    length = Attribute(
        "length",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    def getNamedItem(name):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def getNamedItemNS(namespaceURI, qualifiedName):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def item(index):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def removeNamedItem(name):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def removeNamedItemNS(namespaceURI, qualifiedName):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def setNamedItem(arg):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def setNamedItemNS(arg):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

class ICharacterData(INode):
    """
    See http://www.w3.org/TR/DOM-Level-3-Core/core.html
    """

    #
    # Attributes
    #

    data = Attribute(
        "data",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    length = Attribute(
        "length",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    #
    # Methods
    #

    def appendData(arg):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def deleteData(offset, count):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def insertData(offset, arg):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def replaceData(offset, count, arg):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def substringData(offset, count):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

class IAttr(INode):
    """
    See http://www.w3.org/TR/DOM-Level-3-Core/core.html
    """

    name = Attribute(
        "name",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    ownerElement = Attribute(
        "ownerElement",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    schemaTypeInfo = Attribute(
        "schemaTypeInfo",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        # introduced in DOM Level 3
        )

    specified = Attribute(
        "specified",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    value = Attribute(
        "value",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    def isId():
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """
        # introduced in DOM Level 3

class IElement(INode):
    """
    See http://www.w3.org/TR/DOM-Level-3-Core/core.html
    """

    #
    # Attributes
    #

    schemaTypeInfo = Attribute(
        "schemaTypeInfo",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        # introduced in DOM Level 3
        )

    tagName = Attribute(
        "tagName",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    #
    # Methods
    #

    def getAttribute(name):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def getAttributeNS(namespaceURI, localName):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def getAttributeNode(name):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def getAttributeNodeNS(namespaceURI, localName):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def getElementsByTagName(name):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def getElementsByTagNameNS(namespaceURI, localName):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def hasAttribute(name):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def hasAttributeNS(namespaceURI, localName):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def removeAttribute(name):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def removeAttributeNS(namespaceURI, localName):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def removeAttributeNode(oldAttr):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def setAttribute(name, value):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def setAttributeNS(namespaceURI, qualifiedName, value):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def setAttributeNode(newAttr):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def setAttributeNodeNS(newAttr):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def setIdAttribute(name, isId):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """
        # introduced in DOM Level 3

    def setIdAttributeNS(namespaceURI, localName, isId):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """
        # introduced in DOM Level 3

    def setIdAttributeNode(idAttr, isId):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

class IText(ICharacterData):
    """
    See http://www.w3.org/TR/DOM-Level-3-Core/core.html
    """

    wholeText = Attribute(
        "wholeText",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        # introduced in DOM Level 3
        )

    def isWhitespaceInElementContent():
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """
        # introduced in DOM Level 3

    def replaceWholeText(content):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """
        # introduced in DOM Level 3

    def splitText(offset):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

class IComment(ICharacterData):
    """
    See http://www.w3.org/TR/DOM-Level-3-Core/core.html
    """

class ITypeInfo(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-3-Core/core.html
    """
    # introduced in DOM Level 3

    typeName = Attribute(
        "typeName",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    typeNameSpace = Attribute(
        "typeNameSpace",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

class IUserDataHandler(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-3-Core/core.html
    """
    # introduced in DOM Level 3

    #
    # Definition group OperationType
    #

    NODE_CLONED   = Attribute("NODE_CLONED")
    NODE_DELETED  = Attribute("NODE_DELETED")
    NODE_IMPORTED = Attribute("NODE_IMPORTED")
    NODE_RENAMED  = Attribute("NODE_RENAMED")

    #
    # Methods
    #

    def handle(operations, key, data, src, dst):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

class IDOMErrorHandler(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-3-Core/core.html
    """
    # introduced in DOM Level 3

    def handleError(error):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

class IDOMLocator(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-3-Core/core.html
    """
    # introduced in DOM Level 3

    columnNumber = Attribute(
        "columnNumber",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    lineNumber = Attribute(
        "lineNumber",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    offset = Attribute(
        "offset",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    relatedNode = Attribute(
        "relatedNode",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    uri = Attribute(
        "uri",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

class IDOMConfiguration(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-3-Core/core.html
    """
    # introduced in DOM Level 3

    def canSetParameter(name, value):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def getParemeter(name):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """

    def setParameter(name, value):
        """
        See http://www.w3.org/TR/DOM-Level-3-Core/core.html
        """


=== Added File zopeproducts/xml/interfaces/dom/loadsave.py ===
##############################################################################
#
# Copyright (c) 2003 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""
DOM interfaces for the DOM Level 3 'Load and Save' feature

See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html for more
detailled information

$Id: loadsave.py,v 1.1 2003/06/20 15:11:41 philikon Exp $
"""

from zope.interface import Interface, Attribute

class IDOMImplementationLS(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
    """

    #
    # Definition Group DOMImplementationLSMode
    #

    MODE_ASYNCHRONOUS = Attribute("MODE_ASYNCHRONOUS")
    MODE_SYNCHRONOUS  = Attribute("MODE_ASYNCHRONOUS")

    #
    # Methods
    #

    def createDOMInput():
        """
        See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
        """

    def createDOMParser(mode, schemaType):
        """
        See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
        """

    def createDOMSerializer():
        """
        See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
        """

class IDOMParser(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
    """

    #
    # Definition Group ACTION_TYPES
    #

    ACTION_APPEND_AS_CHILDREN = Attribute("ACTION_APPEND_AS_CHILDREN")
    ACTION_INSERT_AFTER       = Attribute("ACTION_INSERT_AFTER")
    ACTION_INSERT_BEFORE      = Attribute("ACTION_INSERT_BEFORE")
    ACTION_REPLACE            = Attribute("ACTION_REPLACE")
    ACTION_REPLACE_CHILDREN   = Attribute("ACTION_REPLACE_CHILDREN")

    #
    # Attributes
    #

    async = Attribute(
        "async",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )

    busy = Attribute(
        "busy",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )

    config = Attribute(
        "config",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )

    filter = Attribute(
        "filter",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )

    #
    # Methods
    #

    def abort():
        """
        See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
        """

    def parse(inputsource):
        """
        See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
        """

    def parseURI(uri):
        """
        See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
        """

    def parseWithContext(input, context, action):
        """
        See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
        """

class IDOMInput(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
    """

    baseURI = Attribute(
        "baseURI",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )

    byteStream = Attribute(
        "byteStream",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )

    certified = Attribute(
        "certified",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )

    #XXX the spec says "Depending on the language binding in use, this
    #attribute may not be available." about this attribute.    
    characterStream = Attribute(
        "characterStream",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )

    encoding = Attribute(
        "encoding",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )

    publicId = Attribute(
        "publicId",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )

    stringData = Attribute(
        "stringData",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )

    systemId = Attribute(
        "systemId",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )

class IDOMResourceResolver(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
    """

    def resolveResource(publicId, systemId, baseURI):
        """
        See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
        """

class IDOMParserFilter(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
    """

    #
    # Definition group Constants returned by startElement and acceptNode
    #

    FILTER_ACCEPT    = Attribute("FILTER_ACCEPT")
    FILTER_INTERRUPT = Attribute("FILTER_INTERRUPT")
    FILTER_REJECT    = Attribute("FILTER_REJECT")
    FILTER_SKIP      = Attribute("FILTER_SKIP")

    #
    # Attributes
    #

    whatToShow = Attribute(
        "whatToShow",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )

    #
    # Methods
    #

    def acceptNode(node):
        """
        See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
        """

    def startElement(element):
        """
        See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
        """

class ILSProgressEvent(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
    """

    input = Attribute(
        "input",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )

    position = Attribute(
        "position",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )

    totalSize = Attribute(
        "totalSize",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )

class ILSLoadEvent(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
    """

    input = Attribute(
        "input",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )

    newDocument = Attribute(
        "newDocument",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )

class IDOMSerializer(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
    """

    #
    # Attributes
    #

    config = Attribute(
        "config",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )

    filter = Attribute(
        "filter",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )

    newLine = Attribute(
        "newLine",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )

    #
    # Methods
    #

    def write(node, destination):
        """
        See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
        """

    def writeToSTring(node):
        """
        See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
        """

    def writeURI(node, URI):
        """
        See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
        """

class IDOMOutput(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
    """

    byteStream = Attribute(
        "byteStream",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )

    #XXX the spec says "Depending on the language binding in use, this
    #attribute may not be available." about this attribute.    
    characterStream = Attribute(
        "characterStream",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )

    encoding = Attribute(
        "encoding",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )

    systemId = Attribute(
        "systemId",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )

class IDOMSerializerFilter(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
    """

    whatToShow = Attribute(
        "whatToShow",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )

#
# Convenience Interfaces
#
# The spec (http://www.w3.org/TR/DOM-Level-3-LS/load-save.html) says:
#
# "The interfaces defined in this section provide no direct
# functionality that cannot be achieved with the load and save
# interfaces defined in the earlier sections of this
# specification. These interfaces are defined for developer
# convenience only, and supporting them is optional."
#

class IDocumentLS(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
    """

    async = Attribute(
        "async",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )

    def abort():
        """
        See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
        """

    def load(uri):
        """
        See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
        """

    def loadXML(source):
        """
        See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
        """

    def saveXML(node):
        """
        See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
        """

class IElementLS(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html
    """

    markupContent = Attribute(
        "markupContent",
        "See http://www.w3.org/TR/DOM-Level-3-LS/load-save.html"
        )


=== Added File zopeproducts/xml/interfaces/dom/traversal.py ===
##############################################################################
#
# Copyright (c) 2003 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""
DOM interfaces for the DOM Level 2 Traversal feature

See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html for more
detailled information

$Id: traversal.py,v 1.1 2003/06/20 15:11:41 philikon Exp $
"""

from zope.interface import Interface, Attribute

class INodeIterator(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html
    """

    #
    # Attributes
    #

    expandEntityReferences = Attribute(
        "expandEntityReferences",
        "See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html"
        )

    filter = Attribute(
        "filter",
        "See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html"
        )

    root = Attribute(
        "root",
        "See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html"
        )

    whatToShow = Attribute(
        "whatToShow",
        "See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html"
        )

    #
    # Methods
    #

    def detach():
        """
        See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html
        """

    def nextNode():
        """
        See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html
        """

    def previousNode():
        """
        See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html
        """

class INodeFilter(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html
    """

    #
    # Definition group Constants returned by acceptNode
    #

    FILTER_ACCEPT = Attribute("FILTER_ACCEPT")
    FILTER_REJECT = Attribute("FILTER_REJECT")
    FILTER_SKIP   = Attribute("FILTER_SKIP")

    #
    # Definition group Constants for whatToShow
    #

    SHOW_ALL                    = Attribute("SHOW_ALL")
    SHOW_ATTRIBUTE              = Attribute("SHOW_ATTRIBUTE")
    SHOW_CDATA_SECTION          = Attribute("SHOW_CDATA_SECTION")
    SHOW_COMMENT                = Attribute("SHOW_COMMENT")
    SHOW_DOCUMENT               = Attribute("SHOW_DOCUMENT")
    SHOW_DOCUMENT_FRAGMENT      = Attribute("SHOW_DOCUMENT_FRAGMENT")
    SHOW_DOCUMENT_TYPE          = Attribute("SHOW_DOCUMENT_TYPE")
    SHOW_ELEMENT                = Attribute("SHOW_ELEMENT")
    SHOW_ENTITY                 = Attribute("SHOW_ENTITY")
    SHOW_ENTITY_REFERENCE       = Attribute("SHOW_ENTITY_REFERENCE")
    SHOW_NOTATION               = Attribute("SHOW_NOTATION")
    SHOW_PROCESSING_INSTRUCTION = Attribute("SHOW_PROCESSING_INSTRUCTION")
    SHOW_TEXT                   = Attribute("SHOW_TEXT")

    #
    # Methods
    #

    def acceptNode(n):
        """
        See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html
        """

class ITreeWalker(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html
    """

    #
    # Attributes
    #

    currentNode = Attribute(
        "currentNode",
        "See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html"
        )

    expandEntityReferences = Attribute(
        "expandEntityReferences",
        "See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html"
        )

    filter = Attribute(
        "filter",
        "See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html"
        )

    root = Attribute(
        "root",
        "See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html"
        )

    whatToShow = Attribute(
        "whatToShow",
        "See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html"
        )

    #
    # Methods
    #

    def firstChild():
        """
        See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html
        """

    def lastChild():
        """
        See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html
        """

    def nextNode():
        """
        See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html
        """

    def nextSibling():
        """
        See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html
        """

    def parentNode():
        """
        See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html
        """

    def previousNode():
        """
        See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html
        """

    def previousSibling():
        """
        See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html
        """

class IDocumentTraversal(Interface):
    """
    See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html
    """

    def createNodeIterator(root, whatToShow, filter, entityReferenceExpansion):
        """
        See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html
        """

    def createTreeWalker(root, whatToShow, filter, entityReferenceExpansion):
        """
        See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html
        """


=== Added File zopeproducts/xml/interfaces/dom/xmlextended.py ===
##############################################################################
#
# Copyright (c) 2003 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""
DOM XML extended interfaces

See the W3C DOM Level 3 specification for detailled documentation:
http://www.w3.org/TR/DOM-Level-3-Core/core.html

$Id: xmlextended.py,v 1.1 2003/06/20 15:11:41 philikon Exp $
"""

from zope.interface import Attribute
from core import INode, IText

class ICDATASection(IText):
    """
    See http://www.w3.org/TR/DOM-Level-3-Core/core.html
    """

class IDocumentType(INode):
    """
    See http://www.w3.org/TR/DOM-Level-3-Core/core.html
    """

    entities = Attribute(
        "entities",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    internalSubset = Attribute(
        "internalSubset",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    name = Attribute(
        "name",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    notations = Attribute(
        "notations",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    publicId = Attribute(
        "publicId",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    systemId = Attribute(
        "systemId",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

class INotation(INode):
    """
    See http://www.w3.org/TR/DOM-Level-3-Core/core.html
    """

    publicId = Attribute(
        "publicId",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    systemId = Attribute(
        "systemId",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

class IEntity(INode):
    """
    See http://www.w3.org/TR/DOM-Level-3-Core/core.html
    """

    actualEncoding = Attribute(
        "actualEncoding",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    notationName = Attribute(
        "notationName",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    publicId = Attribute(
        "publicId",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    systemId = Attribute(
        "systemId",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    xmlEncoding = Attribute(
        "xmlEncoding",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    xmlVersion = Attribute(
        "xmlVersion",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

class IEntityReference(INode):
    """
    See http://www.w3.org/TR/DOM-Level-3-Core/core.html
    """

class IProcessingInstruction(INode):
    """
    See http://www.w3.org/TR/DOM-Level-3-Core/core.html
    """

    data = Attribute(
        "data",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )

    target = Attribute(
        "target",
        "See http://www.w3.org/TR/DOM-Level-3-Core/core.html"
        )