Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

ns.py 6.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. """NS module -- XML Namespace constants
  2. This module contains the definitions of namespaces (and sometimes other
  3. URI's) used by a variety of XML standards. Each class has a short
  4. all-uppercase name, which should follow any (emerging) convention for
  5. how that standard is commonly used. For example, ds is almost always
  6. used as the namespace prefixes for items in XML Signature, so DS is the
  7. class name. Attributes within that class, all uppercase, define symbolic
  8. names (hopefully evocative) for "constants" used in that standard.
  9. """
  10. class XMLNS:
  11. """XMLNS, Namespaces in XML
  12. XMLNS (14-Jan-1999) is a W3C Recommendation. It is specified in
  13. http://www.w3.org/TR/REC-xml-names
  14. BASE -- the basic namespace defined by the specification
  15. XML -- the namespace for XML 1.0
  16. HTML -- the namespace for HTML4.0
  17. """
  18. BASE = "http://www.w3.org/2000/xmlns/"
  19. XML = "http://www.w3.org/XML/1998/namespace"
  20. HTML = "http://www.w3.org/TR/REC-html40"
  21. class SOAP:
  22. """SOAP, the Simple Object Access Protocol
  23. SOAP (v1.1, 8-May-2000) is a W3C note. It is specified in
  24. http://www.w3.org/TR/SOAP
  25. ENV -- namespace for the SOAP envelope
  26. ENC -- namespace for the SOAP encoding in section 5
  27. ACTOR_NEXT -- the URI for the "next" actor
  28. (Note that no BASE is defined.)
  29. """
  30. ENV = "http://schemas.xmlsoap.org/soap/envelope/"
  31. ENC = "http://schemas.xmlsoap.org/soap/encoding/"
  32. ACTOR_NEXT = "http://schemas.xmlsoap.org/soap/actor/next"
  33. class DSIG:
  34. """DSIG, XML-Signature Syntax and Processing
  35. DSIG (19-Apr-2001) is a W3C Candidate Recommendation. It is specified
  36. in http://www.w3.org/TR/xmldsig-core/
  37. BASE -- the basic namespace defined by the specification
  38. DIGEST_SHA1 -- The SHA-1 digest method
  39. DIGEST_MD2 -- The MD2 digest method
  40. DIGEST_MD5 -- The MD5 digest method
  41. SIG_DSA_SHA1 -- The DSA/DHA-1 signature method
  42. SIG_RSA_SHA1 -- The RSA/DHA-1 signature method
  43. HMAC_SHA1 -- The SHA-1 HMAC method
  44. ENC_BASE64 -- The Base64 encoding method
  45. ENVELOPED -- an enveloped XML signature
  46. C14N -- XML canonicalization
  47. C14N_COMM -- XML canonicalization, retaining comments
  48. """
  49. BASE = "http://www.w3.org/2000/09/xmldsig#"
  50. DIGEST_SHA1 = BASE + "sha1"
  51. DIGEST_MD2 = BASE + "md2"
  52. DIGEST_MD5 = BASE + "md5"
  53. SIG_DSA_SHA1= BASE + "dsa-sha1"
  54. SIG_RSA_SHA1= BASE + "rsa-sha1"
  55. HMAC_SHA1 = BASE + "hmac-sha1"
  56. ENC_BASE64 = BASE + "base64"
  57. ENVELOPED = BASE + "enveloped-signature"
  58. C14N = "http://www.w3.org/TR/2000/CR-xml-c14n-20010315"
  59. C14N_COMM = C14N + "#WithComments"
  60. class ENCRYPTION:
  61. """ENCRYPTION, XML-Encryption Syntax and Processing
  62. ENCRYPTION (26-Jun-2001) is a W3C Working Draft. It is specified in
  63. http://www.w3.org/TR/xmlenc-core/
  64. BASE -- the basic namespace defined by the specification
  65. BLOCK_3DES -- The triple-DES symmetric encryption method
  66. BLOCK_AES128 -- The 128-bit AES symmetric encryption method
  67. BLOCK_AES256 -- The 256-bit AES symmetric encryption method
  68. BLOCK_AES192 -- The 192-bit AES symmetric encryption method
  69. STREAM_ARCFOUR -- The ARCFOUR symmetric encryption method
  70. KT_RSA_1_5 -- The RSA v1.5 key transport method
  71. KT_RSA_OAEP -- The RSA OAEP key transport method
  72. KA_DH -- The Diffie-Hellman key agreement method
  73. WRAP_3DES -- The triple-DES symmetric key wrap method
  74. WRAP_AES128 -- The 128-bit AES symmetric key wrap method
  75. WRAP_AES256 -- The 256-bit AES symmetric key wrap method
  76. WRAP_AES192 -- The 192-bit AES symmetric key wrap method
  77. DIGEST_SHA256 -- The SHA-256 digest method
  78. DIGEST_SHA512 -- The SHA-512 digest method
  79. DIGEST_RIPEMD160 -- The RIPEMD-160 digest method
  80. """
  81. BASE = "http://www.w3.org/2001/04/xmlenc#"
  82. BLOCK_3DES = BASE + "des-cbc"
  83. BLOCK_AES128 = BASE + "aes128-cbc"
  84. BLOCK_AES256 = BASE + "aes256-cbc"
  85. BLOCK_AES192 = BASE + "aes192-cbc"
  86. STREAM_ARCFOUR = BASE + "arcfour"
  87. KT_RSA_1_5 = BASE + "rsa-1_5"
  88. KT_RSA_OAEP = BASE + "rsa-oaep-mgf1p"
  89. KA_DH = BASE + "dh"
  90. WRAP_3DES = BASE + "kw-3des"
  91. WRAP_AES128 = BASE + "kw-aes128"
  92. WRAP_AES256 = BASE + "kw-aes256"
  93. WRAP_AES192 = BASE + "kw-aes192"
  94. DIGEST_SHA256 = BASE + "sha256"
  95. DIGEST_SHA512 = BASE + "sha512"
  96. DIGEST_RIPEMD160 = BASE + "ripemd160"
  97. class SCHEMA:
  98. """SCHEMA, XML Schema
  99. XML Schema (30-Mar-2001) is a W3C candidate recommendation. It is
  100. specified in http://www.w3.org/TR/xmlschema-1 (Structures) and
  101. http://www.w3.org/TR/xmlschema-2 (Datatypes). Schema has been under
  102. development for a comparitively long time, and other standards have
  103. at times used earlier drafts. This class defines the most-used, and
  104. sets BASE to the latest.
  105. BASE -- the basic namespace (2001)
  106. XSD1, XSI1 -- schema and schema-instance for 1999
  107. XSD2, XSI2 -- schema and schema-instance for October 2000
  108. XSD3, XSI3 -- schema and schema-instance for 2001
  109. XSD_LIST -- a sequence of the XSDn values
  110. XSI_LIST -- a sequence of the XSIn values
  111. """
  112. XSD1 = "http://www.w3.org/1999/XMLSchema"
  113. XSD2 = "http://www.w3.org/2000/10/XMLSchema"
  114. XSD3 = "http://www.w3.org/2001/XMLSchema"
  115. XSD_LIST = [ XSD1, XSD2, XSD3 ]
  116. XSI1 = "http://www.w3.org/1999/XMLSchema-instance"
  117. XSI2 = "http://www.w3.org/2000/10/XMLSchema-instance"
  118. XSI3 = "http://www.w3.org/2001/XMLSchema-instance"
  119. XSI_LIST = [ XSI1, XSI2, XSI3 ]
  120. BASE = XSD3
  121. class XSLT:
  122. """XSLT, XSL Transformations
  123. XSLT (16-Nov-1999) is a W3C Recommendation. It is specified in
  124. http://www.w3.org/TR/xslt/
  125. BASE -- the basic namespace defined by this specification
  126. """
  127. BASE = "http://www.w3.org/1999/XSL/Transform"
  128. class XPATH:
  129. """XPATH, XML Path Language
  130. XPATH (16-Nov-1999) is a W3C Recommendation. It is specified in
  131. http://www.w3.org/TR/xpath. This class is currently empty.
  132. """
  133. pass
  134. class WSDL:
  135. """WSDL, Web Services Description Language
  136. WSDL (V1.1, 15-Mar-2001) is a W3C Note. It is specified in
  137. http://www.w3.org/TR/wsdl
  138. BASE -- the basic namespace defined by this specification
  139. BIND_SOAP -- SOAP binding for WSDL
  140. BIND_HTTP -- HTTP GET and POST binding for WSDL
  141. BIND_MIME -- MIME binding for WSDL
  142. """
  143. BASE = "http://schemas.xmlsoap.org/wsdl/"
  144. BIND_SOAP = BASE + "soap/"
  145. BIND_HTTP = BASE + "http/"
  146. BIND_MIME = BASE + "mime/"