source: TI12-security/trunk/python/ndg_security_saml/saml/xml/__init__.py @ 6069

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/python/ndg_security_saml/saml/xml/__init__.py@6069
Revision 6069, 2.8 KB checked in by pjkersha, 10 years ago (diff)

Re-release as rc1

Line 
1"""Implementation of SAML 2.0 for NDG Security - XML package
2
3NERC DataGrid Project
4
5This implementation is adapted from the Java OpenSAML implementation.  The
6copyright and licence information are included here:
7
8Copyright [2005] [University Corporation for Advanced Internet Development, Inc.]
9
10Licensed under the Apache License, Version 2.0 (the "License");
11you may not use this file except in compliance with the License.
12You may obtain a copy of the License at
13
14http://www.apache.org/licenses/LICENSE-2.0
15
16Unless required by applicable law or agreed to in writing, software
17distributed under the License is distributed on an "AS IS" BASIS,
18WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19See the License for the specific language governing permissions and
20limitations under the License.
21"""
22__author__ = "P J Kershaw"
23__date__ = "23/07/09"
24__copyright__ = "(C) 2009 Science and Technology Facilities Council"
25__contact__ = "Philip.Kershaw@stfc.ac.uk"
26__license__ = "BSD - see LICENSE file in top-level directory"
27__contact__ = "Philip.Kershaw@stfc.ac.uk"
28__revision__ = "$Id: $"
29import logging
30log = logging.getLogger(__name__)
31   
32class XMLConstants(object):
33    '''XML related constants.'''
34
35    # XML Tooling
36
37    # Configuration namespace
38    XMLTOOLING_CONFIG_NS = "http://www.opensaml.org/xmltooling-config"
39
40    # Configuration namespace prefix
41    XMLTOOLING_CONFIG_PREFIX = "xt"
42   
43    # Name of the object provider used for objects that don't have a registered
44    # object provider
45    XMLTOOLING_DEFAULT_OBJECT_PROVIDER = "DEFAULT"
46
47    # Core XML
48
49    # XML core namespace
50    XML_NS = "http://www.w3.org/XML/1998/namespace"
51   
52    # XML core prefix for xml attributes
53    XML_PREFIX = "xml"
54
55    # XML namespace for xmlns attributes
56    XMLNS_NS = "http://www.w3.org/2000/xmlns/"
57
58    # XML namespace prefix for xmlns attributes
59    XMLNS_PREFIX = "xmlns"
60
61    # XML Schema namespace
62    XSD_NS = "http://www.w3.org/2001/XMLSchema"
63
64    # XML Schema QName prefix
65    XSD_PREFIX = "xs"
66
67    # XML Schema Instance namespace
68    XSI_NS = "http://www.w3.org/2001/XMLSchema-instance"
69
70    # XML Schema Instance QName prefix
71    XSI_PREFIX = "xsi"
72
73    # XML XMLSecSignatureImpl namespace
74    XMLSIG_NS = "http://www.w3.org/2000/09/xmldsig#"
75
76    # XML XMLSecSignatureImpl QName prefix
77    XMLSIG_PREFIX = "ds"
78
79    # XML Encryption namespace
80    XMLENC_NS = "http://www.w3.org/2001/04/xmlenc#"
81
82    # XML Encryption QName prefix
83    XMLENC_PREFIX = "xenc"
84   
85    # Local name of EncryptedData element
86    XMLENC_ENCDATA_LOCAL_NAME = "EncryptedData"
87   
88    # Local name of EncryptedKey element
89    XMLENC_ENCKEY_LOCAL_NAME = "EncryptedKey"
90
91
92class XMLTypeError(Exception):
93    pass
94
95class XMLTypeParseError(XMLTypeError):
96    pass
97
98class UnknownAttrProfile(XMLTypeError):
99    """Raise from Attribute Value factory if attribute type is not recognised
100    """
Note: See TracBrowser for help on using the repository browser.