home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_2862 (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2010-08-06  |  5.1 KB  |  126 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4.  
  5. class Node:
  6.     ELEMENT_NODE = 1
  7.     ATTRIBUTE_NODE = 2
  8.     TEXT_NODE = 3
  9.     CDATA_SECTION_NODE = 4
  10.     ENTITY_REFERENCE_NODE = 5
  11.     ENTITY_NODE = 6
  12.     PROCESSING_INSTRUCTION_NODE = 7
  13.     COMMENT_NODE = 8
  14.     DOCUMENT_NODE = 9
  15.     DOCUMENT_TYPE_NODE = 10
  16.     DOCUMENT_FRAGMENT_NODE = 11
  17.     NOTATION_NODE = 12
  18.  
  19. INDEX_SIZE_ERR = 1
  20. DOMSTRING_SIZE_ERR = 2
  21. HIERARCHY_REQUEST_ERR = 3
  22. WRONG_DOCUMENT_ERR = 4
  23. INVALID_CHARACTER_ERR = 5
  24. NO_DATA_ALLOWED_ERR = 6
  25. NO_MODIFICATION_ALLOWED_ERR = 7
  26. NOT_FOUND_ERR = 8
  27. NOT_SUPPORTED_ERR = 9
  28. INUSE_ATTRIBUTE_ERR = 10
  29. INVALID_STATE_ERR = 11
  30. SYNTAX_ERR = 12
  31. INVALID_MODIFICATION_ERR = 13
  32. NAMESPACE_ERR = 14
  33. INVALID_ACCESS_ERR = 15
  34. VALIDATION_ERR = 16
  35.  
  36. class DOMException(Exception):
  37.     
  38.     def __init__(self, *args, **kw):
  39.         if self.__class__ is DOMException:
  40.             raise RuntimeError('DOMException should not be instantiated directly')
  41.         self.__class__ is DOMException
  42.         Exception.__init__(self, *args, **kw)
  43.  
  44.     
  45.     def _get_code(self):
  46.         return self.code
  47.  
  48.  
  49.  
  50. class IndexSizeErr(DOMException):
  51.     code = INDEX_SIZE_ERR
  52.  
  53.  
  54. class DomstringSizeErr(DOMException):
  55.     code = DOMSTRING_SIZE_ERR
  56.  
  57.  
  58. class HierarchyRequestErr(DOMException):
  59.     code = HIERARCHY_REQUEST_ERR
  60.  
  61.  
  62. class WrongDocumentErr(DOMException):
  63.     code = WRONG_DOCUMENT_ERR
  64.  
  65.  
  66. class InvalidCharacterErr(DOMException):
  67.     code = INVALID_CHARACTER_ERR
  68.  
  69.  
  70. class NoDataAllowedErr(DOMException):
  71.     code = NO_DATA_ALLOWED_ERR
  72.  
  73.  
  74. class NoModificationAllowedErr(DOMException):
  75.     code = NO_MODIFICATION_ALLOWED_ERR
  76.  
  77.  
  78. class NotFoundErr(DOMException):
  79.     code = NOT_FOUND_ERR
  80.  
  81.  
  82. class NotSupportedErr(DOMException):
  83.     code = NOT_SUPPORTED_ERR
  84.  
  85.  
  86. class InuseAttributeErr(DOMException):
  87.     code = INUSE_ATTRIBUTE_ERR
  88.  
  89.  
  90. class InvalidStateErr(DOMException):
  91.     code = INVALID_STATE_ERR
  92.  
  93.  
  94. class SyntaxErr(DOMException):
  95.     code = SYNTAX_ERR
  96.  
  97.  
  98. class InvalidModificationErr(DOMException):
  99.     code = INVALID_MODIFICATION_ERR
  100.  
  101.  
  102. class NamespaceErr(DOMException):
  103.     code = NAMESPACE_ERR
  104.  
  105.  
  106. class InvalidAccessErr(DOMException):
  107.     code = INVALID_ACCESS_ERR
  108.  
  109.  
  110. class ValidationErr(DOMException):
  111.     code = VALIDATION_ERR
  112.  
  113.  
  114. class UserDataHandler:
  115.     NODE_CLONED = 1
  116.     NODE_IMPORTED = 2
  117.     NODE_DELETED = 3
  118.     NODE_RENAMED = 4
  119.  
  120. XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace'
  121. XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/'
  122. XHTML_NAMESPACE = 'http://www.w3.org/1999/xhtml'
  123. EMPTY_NAMESPACE = None
  124. EMPTY_PREFIX = None
  125. from domreg import getDOMImplementation, registerDOMImplementation
  126.