def __init__(self,xmlnode_or_node=None):
self.xmlnode=None<EOL>self.xpath_ctxt=None<EOL>if isinstance(xmlnode_or_node,libxml2.xmlNode):<EOL><INDENT>ns=xmlnode_or_node.ns()<EOL>if ns.getContent() != DISCO_ITEMS_NS:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>self.xmlnode=xmlnode_or_node.docCopyNode(common_doc,<NUM_LIT:1>)<EOL>common_root.addChild(self.xmlnode)<EOL>self.ns=self.xmlnode.ns()<EOL><DEDENT>else:<EOL><INDENT>self.xmlnode=common_root.newChild(None,"<STR_LIT>",None)<EOL>self.ns=self.xmlnode.newNs(DISCO_ITEMS_NS,None)<EOL>self.xmlnode.setNs(self.ns)<EOL>self.set_node(xmlnode_or_node)<EOL><DEDENT>self.xpath_ctxt=common_doc.xpathNewContext()<EOL>self.xpath_ctxt.setContextNode(self.xmlnode)<EOL>self.xpath_ctxt.xpathRegisterNs("<STR_LIT:d>",DISCO_ITEMS_NS)<EOL>
Initialize an `DiscoItems` object.

        Wrap an existing disco#items XML element or create a new one.

        :Parameters:
            - `xmlnode_or_node`: XML node to be wrapped into `self` or an item
              node name.
        :Types:
            - `xmlnode_or_node`: `libxml2.xmlNode` or `unicode`