Multi-line svn commit, see body.
[shibboleth/cpp-opensaml.git] / saml / saml2 / core / impl / Assertions20Impl.cpp
1 /*
2  *  Copyright 2001-2007 Internet2
3  * 
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 /**
18  * Assertions20Impl.cpp
19  * 
20  * Implementation classes for SAML 2.0 Assertions schema
21  */
22
23 #include "internal.h"
24 #include "exceptions.h"
25 #include "saml/encryption/EncryptedKeyResolver.h"
26 #include "saml2/core/Assertions.h"
27
28 #include <xmltooling/AbstractComplexElement.h>
29 #include <xmltooling/AbstractSimpleElement.h>
30 #include <xmltooling/impl/AnyElement.h>
31 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
32 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
33 #include <xmltooling/util/XMLHelper.h>
34
35 #include <ctime>
36 #include <xercesc/util/XMLUniDefs.hpp>
37
38 using namespace opensaml::saml2;
39 using namespace xmlencryption;
40 using namespace xmlsignature;
41 using namespace xmltooling;
42 using namespace std;
43 using xmlconstants::XMLSIG_NS;
44 using xmlconstants::XMLENC_NS;
45 using samlconstants::SAML20_NS;
46
47 #if defined (_MSC_VER)
48     #pragma warning( push )
49     #pragma warning( disable : 4250 4251 )
50 #endif
51
52 namespace opensaml {
53     namespace saml2 {
54
55         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AssertionIDRef);
56         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AssertionURIRef);
57         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Audience);
58         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AuthnContextClassRef);
59         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AuthnContextDeclRef);
60         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AuthenticatingAuthority);
61
62         class SAML_DLLLOCAL NameIDTypeImpl : public virtual NameIDType,
63             public AbstractSimpleElement,
64             public AbstractDOMCachingXMLObject,
65             public AbstractXMLObjectMarshaller,
66             public AbstractXMLObjectUnmarshaller
67         {
68             void init() {
69                 m_Format=m_SPProvidedID=m_NameQualifier=m_SPNameQualifier=NULL;
70             }
71             
72         protected:
73             NameIDTypeImpl() {
74                 init();
75             }
76             
77         public:
78             virtual ~NameIDTypeImpl() {
79                 XMLString::release(&m_NameQualifier);
80                 XMLString::release(&m_SPNameQualifier);
81                 XMLString::release(&m_Format);
82                 XMLString::release(&m_SPProvidedID);
83             }
84     
85             NameIDTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
86                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
87                 init();
88             }
89                 
90             NameIDTypeImpl(const NameIDTypeImpl& src)
91                     : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
92                 init();
93                 setNameQualifier(src.getNameQualifier());
94                 setSPNameQualifier(src.getSPNameQualifier());
95                 setFormat(src.getFormat());
96                 setSPProvidedID(src.getSPProvidedID());
97             }
98             
99             IMPL_XMLOBJECT_CLONE(NameIDType);
100             IMPL_STRING_ATTRIB(NameQualifier);
101             IMPL_STRING_ATTRIB(SPNameQualifier);
102             IMPL_STRING_ATTRIB(Format);
103             IMPL_STRING_ATTRIB(SPProvidedID);
104     
105         protected:
106             void marshallAttributes(DOMElement* domElement) const {
107                 MARSHALL_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL);
108                 MARSHALL_STRING_ATTRIB(SPNameQualifier,SPNAMEQUALIFIER,NULL);
109                 MARSHALL_STRING_ATTRIB(Format,FORMAT,NULL);
110                 MARSHALL_STRING_ATTRIB(SPProvidedID,SPPROVIDEDID,NULL);
111             }
112
113             void processAttribute(const DOMAttr* attribute) {
114                 PROC_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL);
115                 PROC_STRING_ATTRIB(SPNameQualifier,SPNAMEQUALIFIER,NULL);
116                 PROC_STRING_ATTRIB(Format,FORMAT,NULL);
117                 PROC_STRING_ATTRIB(SPProvidedID,SPPROVIDEDID,NULL);
118                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
119             }
120         };
121
122         class SAML_DLLLOCAL NameIDImpl : public virtual NameID, public NameIDTypeImpl
123         {
124         public:
125             virtual ~NameIDImpl() {}
126     
127             NameIDImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
128                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
129                 
130             NameIDImpl(const NameIDImpl& src) : AbstractXMLObject(src), NameIDTypeImpl(src) {}
131             
132             IMPL_XMLOBJECT_CLONE(NameID);
133             NameIDType* cloneNameIDType() const {
134                 return new NameIDImpl(*this);
135             }
136         };
137
138         class SAML_DLLLOCAL IssuerImpl : public virtual Issuer, public NameIDTypeImpl
139         {
140         public:
141             virtual ~IssuerImpl() {}
142     
143             IssuerImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
144                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
145                 
146             IssuerImpl(const IssuerImpl& src) : AbstractXMLObject(src), NameIDTypeImpl(src) {}
147             
148             IMPL_XMLOBJECT_CLONE(Issuer);
149             NameIDType* cloneNameIDType() const {
150                 return new IssuerImpl(*this);
151             }
152         };
153
154         //TODO unit test for this
155         //  - need to test encryption/decryption too, or already done in xmltooling ?
156         class SAML_DLLLOCAL EncryptedElementTypeImpl : public virtual EncryptedElementType,
157             public AbstractComplexElement,
158             public AbstractDOMCachingXMLObject,
159             public AbstractXMLObjectMarshaller,
160             public AbstractXMLObjectUnmarshaller
161         {
162             void init() {
163                 m_EncryptedData=NULL;
164                 m_children.push_back(NULL);
165                 m_pos_EncryptedData=m_children.begin();
166             }
167             
168         protected:
169             EncryptedElementTypeImpl() {
170                 init();
171             }
172             
173         public:
174             virtual ~EncryptedElementTypeImpl() {}
175     
176             EncryptedElementTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
177                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
178                 init();
179             }
180                 
181             EncryptedElementTypeImpl(const EncryptedElementTypeImpl& src)
182                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
183                 init();
184                 if (src.getEncryptedData())
185                     setEncryptedData(src.getEncryptedData()->cloneEncryptedData());
186                 VectorOf(EncryptedKey) v=getEncryptedKeys();
187                 for (vector<EncryptedKey*>::const_iterator i=src.m_EncryptedKeys.begin(); i!=src.m_EncryptedKeys.end(); i++) {
188                     if (*i) {
189                         v.push_back((*i)->cloneEncryptedKey());
190                     }
191                 }
192             }
193         
194             IMPL_XMLOBJECT_CLONE(EncryptedElementType);
195             IMPL_TYPED_FOREIGN_CHILD(EncryptedData,xmlencryption);
196             IMPL_TYPED_FOREIGN_CHILDREN(EncryptedKey,xmlencryption,m_children.end());
197     
198         protected:
199             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
200                 PROC_TYPED_FOREIGN_CHILD(EncryptedData,xmlencryption,XMLENC_NS,false);
201                 PROC_TYPED_FOREIGN_CHILDREN(EncryptedKey,xmlencryption,XMLENC_NS,false);
202                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
203             }
204         };
205
206         class SAML_DLLLOCAL EncryptedIDImpl : public virtual EncryptedID, public EncryptedElementTypeImpl
207         {
208         public:
209             virtual ~EncryptedIDImpl() {}
210     
211             EncryptedIDImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
212                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
213                 
214             EncryptedIDImpl(const EncryptedIDImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
215             
216             IMPL_XMLOBJECT_CLONE(EncryptedID);
217             EncryptedElementType* cloneEncryptedElementType() const {
218                 return new EncryptedIDImpl(*this);
219             }
220         };
221
222         class SAML_DLLLOCAL AudienceRestrictionImpl : public virtual AudienceRestriction,
223             public AbstractComplexElement,
224             public AbstractDOMCachingXMLObject,
225             public AbstractXMLObjectMarshaller,
226             public AbstractXMLObjectUnmarshaller
227         {
228         public:
229             virtual ~AudienceRestrictionImpl() {}
230     
231             AudienceRestrictionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
232                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
233             }
234                 
235             AudienceRestrictionImpl(const AudienceRestrictionImpl& src)
236                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
237                 VectorOf(Audience) v=getAudiences();
238                 for (vector<Audience*>::const_iterator i=src.m_Audiences.begin(); i!=src.m_Audiences.end(); i++) {
239                     if (*i) {
240                         v.push_back((*i)->cloneAudience());
241                     }
242                 }
243             }
244             
245             IMPL_XMLOBJECT_CLONE(AudienceRestriction);
246             Condition* cloneCondition() const {
247                 return cloneAudienceRestriction();
248             }
249             IMPL_TYPED_CHILDREN(Audience,m_children.end());
250     
251         protected:
252             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
253                 PROC_TYPED_CHILDREN(Audience,SAML20_NS,false);
254                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
255             }
256         };
257
258         class SAML_DLLLOCAL OneTimeUseImpl : public virtual OneTimeUse,
259             public AbstractSimpleElement,
260             public AbstractDOMCachingXMLObject,
261             public AbstractXMLObjectMarshaller,
262             public AbstractXMLObjectUnmarshaller
263         {
264         public:
265             virtual ~OneTimeUseImpl() {}
266     
267             OneTimeUseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
268                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
269             }
270                 
271             OneTimeUseImpl(const OneTimeUseImpl& src)
272                 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
273             }
274             
275             IMPL_XMLOBJECT_CLONE(OneTimeUse);
276             Condition* cloneCondition() const {
277                 return cloneOneTimeUse();
278             }
279         };
280
281         class SAML_DLLLOCAL ProxyRestrictionImpl : public virtual ProxyRestriction,
282             public AbstractComplexElement,
283             public AbstractDOMCachingXMLObject,
284             public AbstractXMLObjectMarshaller,
285             public AbstractXMLObjectUnmarshaller
286         {
287         public:
288             virtual ~ProxyRestrictionImpl() {
289                 XMLString::release(&m_Count);
290             }
291     
292             ProxyRestrictionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
293                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
294                 m_Count=NULL;
295             }
296                 
297             ProxyRestrictionImpl(const ProxyRestrictionImpl& src)
298                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
299                 setCount(src.m_Count);
300                 VectorOf(Audience) v=getAudiences();
301                 for (vector<Audience*>::const_iterator i=src.m_Audiences.begin(); i!=src.m_Audiences.end(); i++) {
302                     if (*i) {
303                         v.push_back((*i)->cloneAudience());
304                     }
305                 }
306             }
307             
308             IMPL_XMLOBJECT_CLONE(ProxyRestriction);
309             Condition* cloneCondition() const {
310                 return cloneProxyRestriction();
311             }
312             IMPL_TYPED_CHILDREN(Audience,m_children.end());
313             IMPL_INTEGER_ATTRIB(Count);
314     
315         protected:
316             void marshallAttributes(DOMElement* domElement) const {
317                 MARSHALL_INTEGER_ATTRIB(Count,COUNT,NULL);
318             }
319
320             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
321                 PROC_TYPED_CHILDREN(Audience,SAML20_NS,false);
322                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
323             }
324
325             void processAttribute(const DOMAttr* attribute) {
326                 PROC_INTEGER_ATTRIB(Count,COUNT,NULL);
327                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
328             }
329         };
330
331
332         class SAML_DLLLOCAL ConditionsImpl : public virtual Conditions,
333             public AbstractComplexElement,
334             public AbstractDOMCachingXMLObject,
335             public AbstractXMLObjectMarshaller,
336             public AbstractXMLObjectUnmarshaller
337         {
338             void init() {
339                 m_NotBefore=m_NotOnOrAfter=NULL;
340             }
341         public:
342             virtual ~ConditionsImpl() {
343                 delete m_NotBefore;
344                 delete m_NotOnOrAfter;
345             }
346     
347             ConditionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
348                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
349                 init();
350             }
351                 
352             ConditionsImpl(const ConditionsImpl& src)
353                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
354                 init();
355                 setNotBefore(src.getNotBefore());
356                 setNotOnOrAfter(src.getNotOnOrAfter());
357
358                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
359                     if (*i) {
360                         AudienceRestriction* arc=dynamic_cast<AudienceRestriction*>(*i);
361                         if (arc) {
362                             getAudienceRestrictions().push_back(arc->cloneAudienceRestriction());
363                             continue;
364                         }
365     
366                         OneTimeUse* dncc=dynamic_cast<OneTimeUse*>(*i);
367                         if (dncc) {
368                             getOneTimeUses().push_back(dncc->cloneOneTimeUse());
369                             continue;
370                         }
371     
372                         ProxyRestriction* prc=dynamic_cast<ProxyRestriction*>(*i);
373                         if (prc) {
374                             getProxyRestrictions().push_back(prc->cloneProxyRestriction());
375                             continue;
376                         }
377
378                         Condition* c=dynamic_cast<Condition*>(*i);
379                         if (c) {
380                             getConditions().push_back(c->cloneCondition());
381                             continue;
382                         }
383                     }
384                 }
385             }
386                         
387             IMPL_XMLOBJECT_CLONE(Conditions);
388             IMPL_DATETIME_ATTRIB(NotBefore,0);
389             IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
390             IMPL_TYPED_CHILDREN(AudienceRestriction, m_children.end());
391             IMPL_TYPED_CHILDREN(OneTimeUse,m_children.end());
392             IMPL_TYPED_CHILDREN(ProxyRestriction, m_children.end());
393             IMPL_TYPED_CHILDREN(Condition,m_children.end());
394     
395         protected:
396             void marshallAttributes(DOMElement* domElement) const {
397                 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
398                 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
399             }
400     
401             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
402                 PROC_TYPED_CHILDREN(AudienceRestriction,SAML20_NS,false);
403                 PROC_TYPED_CHILDREN(OneTimeUse,SAML20_NS,false);
404                 PROC_TYPED_CHILDREN(ProxyRestriction,SAML20_NS,false);
405                 PROC_TYPED_CHILDREN(Condition,SAML20_NS,false);
406                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
407             }
408     
409             void processAttribute(const DOMAttr* attribute) {
410                 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
411                 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
412                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
413             }
414         };
415
416         class SAML_DLLLOCAL SubjectConfirmationDataTypeImpl : public virtual SubjectConfirmationDataType,
417             public AbstractDOMCachingXMLObject,
418             public AbstractXMLObjectMarshaller,
419             public AbstractXMLObjectUnmarshaller
420         {
421             void init() {
422                 m_NotBefore=m_NotOnOrAfter=NULL;
423                 m_Recipient=m_InResponseTo=m_Address=NULL;
424             }
425
426         protected:
427             SubjectConfirmationDataTypeImpl() {
428                 init();
429             }
430
431         public:
432             virtual ~SubjectConfirmationDataTypeImpl() {
433                 delete m_NotBefore;
434                 delete m_NotOnOrAfter;
435                 XMLString::release(&m_Recipient);
436                 XMLString::release(&m_InResponseTo);
437                 XMLString::release(&m_Address);
438             }
439     
440             SubjectConfirmationDataTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
441                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
442                 init();
443             }
444                 
445             SubjectConfirmationDataTypeImpl(const SubjectConfirmationDataTypeImpl& src) : AbstractDOMCachingXMLObject(src) {
446                 init();
447                 setNotBefore(src.getNotBefore());
448                 setNotOnOrAfter(src.getNotOnOrAfter());
449                 setRecipient(src.getRecipient());
450                 setInResponseTo(src.getInResponseTo());
451                 setAddress(src.getAddress());
452             }
453             
454             IMPL_DATETIME_ATTRIB(NotBefore,0);
455             IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
456             IMPL_STRING_ATTRIB(Recipient);
457             IMPL_STRING_ATTRIB(InResponseTo);
458             IMPL_STRING_ATTRIB(Address);
459             
460         protected:
461             void marshallAttributes(DOMElement* domElement) const {
462                 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
463                 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
464                 MARSHALL_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
465                 MARSHALL_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
466                 MARSHALL_STRING_ATTRIB(Address,ADDRESS,NULL);
467             }
468             
469             void processAttribute(const DOMAttr* attribute) {
470                 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
471                 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
472                 PROC_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
473                 PROC_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
474                 PROC_STRING_ATTRIB(Address,ADDRESS,NULL);
475                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
476             }
477         };
478
479         class SAML_DLLLOCAL SubjectConfirmationDataImpl : public SubjectConfirmationData,
480             public SubjectConfirmationDataTypeImpl, public AnyElementImpl
481         {
482         public:
483             virtual ~SubjectConfirmationDataImpl() {}
484     
485             SubjectConfirmationDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
486                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
487             }
488                 
489             SubjectConfirmationDataImpl(const SubjectConfirmationDataImpl& src)
490                     : SubjectConfirmationDataTypeImpl(src), AnyElementImpl(src) {
491             }
492
493             IMPL_XMLOBJECT_CLONE(SubjectConfirmationData);
494             SubjectConfirmationDataType* cloneSubjectConfirmationDataType() const {
495                 return new SubjectConfirmationDataImpl(*this);
496             }
497
498             void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
499                 if (!qualifiedName.hasNamespaceURI()) {
500                     if (XMLString::equals(qualifiedName.getLocalPart(),NOTBEFORE_ATTRIB_NAME)) {
501                         setNotBefore(value);
502                         return;
503                     }
504                     else if (XMLString::equals(qualifiedName.getLocalPart(),NOTONORAFTER_ATTRIB_NAME)) {
505                         setNotOnOrAfter(value);
506                         return;
507                     }
508                     else if (XMLString::equals(qualifiedName.getLocalPart(),RECIPIENT_ATTRIB_NAME)) {
509                         setRecipient(value);
510                         return;
511                     }
512                     else if (XMLString::equals(qualifiedName.getLocalPart(),INRESPONSETO_ATTRIB_NAME)) {
513                         setInResponseTo(value);
514                         return;
515                     }
516                     else if (XMLString::equals(qualifiedName.getLocalPart(),ADDRESS_ATTRIB_NAME)) {
517                         setAddress(value);
518                         return;
519                     }
520                 }
521                 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
522             }
523
524         protected:
525             void marshallAttributes(DOMElement* domElement) const {
526                 SubjectConfirmationDataTypeImpl::marshallAttributes(domElement);
527                 AnyElementImpl::marshallAttributes(domElement);
528             }
529         };
530
531         class SAML_DLLLOCAL KeyInfoConfirmationDataTypeImpl : public virtual KeyInfoConfirmationDataType,
532                 public SubjectConfirmationDataTypeImpl,
533                 public AbstractComplexElement,
534                 public AbstractAttributeExtensibleXMLObject
535         {
536         public:
537             virtual ~KeyInfoConfirmationDataTypeImpl() {}
538     
539             KeyInfoConfirmationDataTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
540                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
541             }
542                 
543             KeyInfoConfirmationDataTypeImpl(const KeyInfoConfirmationDataTypeImpl& src)
544                     : AbstractXMLObject(src), SubjectConfirmationDataTypeImpl(src), AbstractComplexElement(src),
545                         AbstractAttributeExtensibleXMLObject(src) {
546                 VectorOf(KeyInfo) v=getKeyInfos();
547                 for (vector<KeyInfo*>::const_iterator i=src.m_KeyInfos.begin(); i!=src.m_KeyInfos.end(); ++i)
548                     v.push_back((*i)->cloneKeyInfo());
549             }
550             
551             IMPL_XMLOBJECT_CLONE(KeyInfoConfirmationDataType);
552             SubjectConfirmationDataType* cloneSubjectConfirmationDataType() const {
553                 return new KeyInfoConfirmationDataTypeImpl(*this);
554             }
555
556             IMPL_TYPED_CHILDREN(KeyInfo,m_children.end());
557             
558         public:
559             void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
560                 if (!qualifiedName.hasNamespaceURI()) {
561                     if (XMLString::equals(qualifiedName.getLocalPart(),NOTBEFORE_ATTRIB_NAME)) {
562                         setNotBefore(value);
563                         return;
564                     }
565                     else if (XMLString::equals(qualifiedName.getLocalPart(),NOTONORAFTER_ATTRIB_NAME)) {
566                         setNotOnOrAfter(value);
567                         return;
568                     }
569                     else if (XMLString::equals(qualifiedName.getLocalPart(),RECIPIENT_ATTRIB_NAME)) {
570                         setRecipient(value);
571                         return;
572                     }
573                     else if (XMLString::equals(qualifiedName.getLocalPart(),INRESPONSETO_ATTRIB_NAME)) {
574                         setInResponseTo(value);
575                         return;
576                     }
577                     else if (XMLString::equals(qualifiedName.getLocalPart(),ADDRESS_ATTRIB_NAME)) {
578                         setAddress(value);
579                         return;
580                     }
581                 }
582                 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
583             }
584
585         protected:
586             void marshallAttributes(DOMElement* domElement) const {
587                 SubjectConfirmationDataTypeImpl::marshallAttributes(domElement);
588                 marshallExtensionAttributes(domElement);
589             }
590     
591             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
592                 PROC_TYPED_CHILDREN(KeyInfo,XMLSIG_NS,false);
593                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
594             }
595
596             void processAttribute(const DOMAttr* attribute) {
597                 unmarshallExtensionAttribute(attribute);
598             }
599         };
600
601         class SAML_DLLLOCAL SubjectConfirmationImpl : public virtual SubjectConfirmation,
602             public AbstractComplexElement,
603             public AbstractDOMCachingXMLObject,
604             public AbstractXMLObjectMarshaller,
605             public AbstractXMLObjectUnmarshaller
606         {
607             void init() {
608                 m_Method=NULL;
609                 m_BaseID=NULL;
610                 m_NameID=NULL;
611                 m_EncryptedID=NULL;
612                 m_SubjectConfirmationData=NULL;
613                 m_children.push_back(NULL);
614                 m_children.push_back(NULL);
615                 m_children.push_back(NULL);
616                 m_children.push_back(NULL);
617                 m_pos_BaseID=m_children.begin();
618                 m_pos_NameID=m_pos_BaseID;
619                 ++m_pos_NameID;
620                 m_pos_EncryptedID=m_pos_NameID;
621                 ++m_pos_EncryptedID;
622                 m_pos_SubjectConfirmationData=m_pos_EncryptedID;
623                 ++m_pos_SubjectConfirmationData;
624             }
625         public:
626             virtual ~SubjectConfirmationImpl() {}
627     
628             SubjectConfirmationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
629                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
630                 init();
631             }
632                 
633             SubjectConfirmationImpl(const SubjectConfirmationImpl& src)
634                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
635                 init();
636                 setMethod(src.getMethod());
637                 if (src.getBaseID())
638                     setBaseID(src.getBaseID()->cloneBaseID());
639                 if (src.getNameID())
640                     setNameID(src.getNameID()->cloneNameID());
641                 if (src.getEncryptedID())
642                     setEncryptedID(src.getEncryptedID()->cloneEncryptedID());
643                 if (src.getSubjectConfirmationData())
644                     setSubjectConfirmationData(src.getSubjectConfirmationData()->clone());
645             }
646             
647             IMPL_XMLOBJECT_CLONE(SubjectConfirmation);
648             IMPL_STRING_ATTRIB(Method);
649             IMPL_TYPED_CHILD(BaseID);
650             IMPL_TYPED_CHILD(NameID);
651             IMPL_TYPED_CHILD(EncryptedID);
652             IMPL_XMLOBJECT_CHILD(SubjectConfirmationData);
653     
654         protected:
655             void marshallAttributes(DOMElement* domElement) const {
656                 MARSHALL_STRING_ATTRIB(Method,METHOD,NULL);
657             }
658
659             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
660                 PROC_TYPED_CHILD(BaseID,SAML20_NS,false);
661                 PROC_TYPED_CHILD(NameID,SAML20_NS,false);
662                 PROC_TYPED_CHILD(EncryptedID,SAML20_NS,false);
663                 PROC_XMLOBJECT_CHILD(SubjectConfirmationData,SAML20_NS);
664                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
665             }
666
667             void processAttribute(const DOMAttr* attribute) {
668                 PROC_STRING_ATTRIB(Method,METHOD,NULL);
669                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
670             }
671         };
672
673         class SAML_DLLLOCAL SubjectImpl : public virtual Subject,
674             public AbstractComplexElement,
675             public AbstractDOMCachingXMLObject,
676             public AbstractXMLObjectMarshaller,
677             public AbstractXMLObjectUnmarshaller
678         {
679             void init() {
680                 m_BaseID=NULL;
681                 m_NameID=NULL;
682                 m_EncryptedID=NULL;
683                 m_children.push_back(NULL);
684                 m_children.push_back(NULL);
685                 m_children.push_back(NULL);
686                 m_pos_BaseID=m_children.begin();
687                 m_pos_NameID=m_pos_BaseID;
688                 ++m_pos_NameID;
689                 m_pos_EncryptedID=m_pos_NameID;
690                 ++m_pos_EncryptedID;
691             }
692         public:
693             virtual ~SubjectImpl() {}
694     
695             SubjectImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
696                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
697                 init();
698             }
699                 
700             SubjectImpl(const SubjectImpl& src)
701                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
702                 init();
703                 if (src.getBaseID())
704                     setBaseID(src.getBaseID()->cloneBaseID());
705                 if (src.getNameID())
706                     setNameID(src.getNameID()->cloneNameID());
707                 if (src.getEncryptedID())
708                     setEncryptedID(src.getEncryptedID()->cloneEncryptedID());
709                 VectorOf(SubjectConfirmation) v=getSubjectConfirmations();
710                 for (vector<SubjectConfirmation*>::const_iterator i=src.m_SubjectConfirmations.begin(); i!=src.m_SubjectConfirmations.end(); i++) {
711                     if (*i) {
712                         v.push_back((*i)->cloneSubjectConfirmation());
713                     }
714                 }
715             }
716             
717             IMPL_XMLOBJECT_CLONE(Subject);
718             IMPL_TYPED_CHILD(NameID);
719             IMPL_TYPED_CHILD(BaseID);
720             IMPL_TYPED_CHILD(EncryptedID);
721             IMPL_TYPED_CHILDREN(SubjectConfirmation,m_children.end());
722     
723         protected:
724             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
725                 PROC_TYPED_CHILD(BaseID,SAML20_NS,false);
726                 PROC_TYPED_CHILD(NameID,SAML20_NS,false);
727                 PROC_TYPED_CHILD(EncryptedID,SAML20_NS,false);
728                 PROC_TYPED_CHILDREN(SubjectConfirmation,SAML20_NS,false);
729                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
730             }
731         };
732
733         class SAML_DLLLOCAL SubjectLocalityImpl : public virtual SubjectLocality,
734             public AbstractSimpleElement,
735             public AbstractDOMCachingXMLObject,
736             public AbstractXMLObjectMarshaller,
737             public AbstractXMLObjectUnmarshaller
738         {
739             void init() {
740                 m_Address=m_DNSName=NULL;
741             }
742         public:
743             virtual ~SubjectLocalityImpl() {
744                 XMLString::release(&m_Address);
745                 XMLString::release(&m_DNSName);
746             }
747     
748             SubjectLocalityImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
749                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
750                 init();
751             }
752                 
753             SubjectLocalityImpl(const SubjectLocalityImpl& src)
754                     : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
755                 init();
756                 setAddress(src.getAddress());
757                 setDNSName(src.getDNSName());
758             }
759             
760             IMPL_XMLOBJECT_CLONE(SubjectLocality);
761             IMPL_STRING_ATTRIB(Address);
762             IMPL_STRING_ATTRIB(DNSName);
763     
764         protected:
765             void marshallAttributes(DOMElement* domElement) const {
766                 MARSHALL_STRING_ATTRIB(Address,ADDRESS,NULL);
767                 MARSHALL_STRING_ATTRIB(DNSName,DNSNAME,NULL);
768             }
769     
770             void processAttribute(const DOMAttr* attribute) {
771                 PROC_STRING_ATTRIB(Address,ADDRESS,NULL);
772                 PROC_STRING_ATTRIB(DNSName,DNSNAME,NULL);
773                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
774             }
775         };
776
777         //TODO need unit test for this
778         class SAML_DLLLOCAL AuthnContextDeclImpl : public virtual AuthnContextDecl, public AnyElementImpl
779         {
780         public:
781             virtual ~AuthnContextDeclImpl() {}
782     
783             AuthnContextDeclImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
784                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
785             }
786                 
787             AuthnContextDeclImpl(const AuthnContextDeclImpl& src) : AnyElementImpl(src) {
788             }
789             
790             IMPL_XMLOBJECT_CLONE(AuthnContextDecl);
791         };
792
793         class SAML_DLLLOCAL AuthnContextImpl : public virtual AuthnContext,
794             public AbstractComplexElement,
795             public AbstractDOMCachingXMLObject,
796             public AbstractXMLObjectMarshaller,
797             public AbstractXMLObjectUnmarshaller
798         {
799             void init() {
800                 m_AuthnContextClassRef=NULL;
801                 m_AuthnContextDecl=NULL;
802                 m_AuthnContextDeclRef=NULL;
803                 m_children.push_back(NULL);
804                 m_children.push_back(NULL);
805                 m_children.push_back(NULL);
806                 m_pos_AuthnContextClassRef=m_children.begin();
807                 m_pos_AuthnContextDecl=m_pos_AuthnContextClassRef;
808                 ++m_pos_AuthnContextDecl;
809                 m_pos_AuthnContextDeclRef=m_pos_AuthnContextDecl;
810                 ++m_pos_AuthnContextDeclRef;
811             }
812         public:
813             virtual ~AuthnContextImpl() {}
814     
815             AuthnContextImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
816                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
817                 init();
818             }
819                 
820             AuthnContextImpl(const AuthnContextImpl& src)
821                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
822                 init();
823                 if (src.getAuthnContextClassRef())
824                     setAuthnContextClassRef(src.getAuthnContextClassRef()->cloneAuthnContextClassRef());
825                 if (src.getAuthnContextDecl())
826                     setAuthnContextDecl(src.getAuthnContextDecl()->clone());
827                 if (src.getAuthnContextDeclRef())
828                     setAuthnContextDeclRef(src.getAuthnContextDeclRef()->cloneAuthnContextDeclRef());
829                 VectorOf(AuthenticatingAuthority) v=getAuthenticatingAuthoritys();
830                 for (vector<AuthenticatingAuthority*>::const_iterator i=src.m_AuthenticatingAuthoritys.begin(); i!=src.m_AuthenticatingAuthoritys.end(); i++) {
831                     if (*i) {
832                         v.push_back((*i)->cloneAuthenticatingAuthority());
833                     }
834                 }
835             }
836             
837             IMPL_XMLOBJECT_CLONE(AuthnContext);
838             IMPL_TYPED_CHILD(AuthnContextClassRef);
839             IMPL_XMLOBJECT_CHILD(AuthnContextDecl);
840             IMPL_TYPED_CHILD(AuthnContextDeclRef);
841             IMPL_TYPED_CHILDREN(AuthenticatingAuthority,m_children.end());
842     
843         protected:
844             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
845                 PROC_TYPED_CHILD(AuthnContextClassRef,SAML20_NS,false);
846                 PROC_XMLOBJECT_CHILD(AuthnContextDecl,SAML20_NS);
847                 PROC_TYPED_CHILD(AuthnContextDeclRef,SAML20_NS,false);
848                 PROC_TYPED_CHILDREN(AuthenticatingAuthority,SAML20_NS,false);
849                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
850             }
851         };
852
853         class SAML_DLLLOCAL AuthnStatementImpl : public virtual AuthnStatement,
854             public AbstractComplexElement,
855             public AbstractDOMCachingXMLObject,
856             public AbstractXMLObjectMarshaller,
857             public AbstractXMLObjectUnmarshaller
858         {
859             void init() {
860                 m_AuthnInstant=NULL;
861                 m_SessionIndex=NULL;
862                 m_SessionNotOnOrAfter=NULL;
863                 m_SubjectLocality=NULL;
864                 m_AuthnContext=NULL;
865                 m_children.push_back(NULL);
866                 m_children.push_back(NULL);
867                 m_pos_SubjectLocality=m_children.begin();
868                 m_pos_AuthnContext=m_pos_SubjectLocality;
869                 ++m_pos_AuthnContext;
870             }
871         public:
872             virtual ~AuthnStatementImpl() {
873                 delete m_AuthnInstant;
874                 XMLString::release(&m_SessionIndex);
875                 delete m_SessionNotOnOrAfter;
876             }
877     
878             AuthnStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
879                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
880                 init();
881             }
882                 
883             AuthnStatementImpl(const AuthnStatementImpl& src)
884                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
885                 init();
886                 setAuthnInstant(src.getAuthnInstant());
887                 setSessionIndex(src.getSessionIndex());
888                 setSessionNotOnOrAfter(src.getSessionNotOnOrAfter());
889                 if (src.getSubjectLocality())
890                     setSubjectLocality(src.getSubjectLocality()->cloneSubjectLocality());
891                 if (src.getAuthnContext())
892                     setAuthnContext(src.getAuthnContext()->cloneAuthnContext());
893             }
894             
895             IMPL_XMLOBJECT_CLONE(AuthnStatement);
896             Statement* cloneStatement() const {
897                 return cloneAuthnStatement();
898             }
899             IMPL_DATETIME_ATTRIB(AuthnInstant,0);
900             IMPL_STRING_ATTRIB(SessionIndex);
901             IMPL_DATETIME_ATTRIB(SessionNotOnOrAfter,SAMLTIME_MAX);
902             IMPL_TYPED_CHILD(SubjectLocality);
903             IMPL_TYPED_CHILD(AuthnContext);
904     
905         protected:
906             void marshallAttributes(DOMElement* domElement) const {
907                 MARSHALL_DATETIME_ATTRIB(AuthnInstant,AUTHNINSTANT,NULL);
908                 MARSHALL_STRING_ATTRIB(SessionIndex,SESSIONINDEX,NULL);
909                 MARSHALL_DATETIME_ATTRIB(SessionNotOnOrAfter,SESSIONNOTONORAFTER,NULL);
910             }
911     
912             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
913                 PROC_TYPED_CHILD(SubjectLocality,SAML20_NS,false);
914                 PROC_TYPED_CHILD(AuthnContext,SAML20_NS,false);
915                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
916             }
917     
918             void processAttribute(const DOMAttr* attribute) {
919                 PROC_DATETIME_ATTRIB(AuthnInstant,AUTHNINSTANT,NULL);
920                 PROC_STRING_ATTRIB(SessionIndex,SESSIONINDEX,NULL);
921                 PROC_DATETIME_ATTRIB(SessionNotOnOrAfter,SESSIONNOTONORAFTER,NULL);
922                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
923             }
924         };
925
926         class SAML_DLLLOCAL ActionImpl : public virtual Action,
927             public AbstractSimpleElement,
928             public AbstractDOMCachingXMLObject,
929             public AbstractXMLObjectMarshaller,
930             public AbstractXMLObjectUnmarshaller
931         {
932         public:
933             virtual ~ActionImpl() {
934                 XMLString::release(&m_Namespace);
935             }
936     
937             ActionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
938                     : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Namespace(NULL) {
939             }
940                 
941             ActionImpl(const ActionImpl& src)
942                     : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
943                 setNamespace(src.getNamespace());
944             }
945             
946             IMPL_XMLOBJECT_CLONE(Action);
947             IMPL_STRING_ATTRIB(Namespace);
948     
949         protected:
950             void marshallAttributes(DOMElement* domElement) const {
951                 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
952             }
953
954             void processAttribute(const DOMAttr* attribute) {
955                 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
956                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
957             }
958         };
959
960         class SAML_DLLLOCAL EvidenceImpl : public virtual Evidence,
961             public AbstractComplexElement,
962             public AbstractDOMCachingXMLObject,
963             public AbstractXMLObjectMarshaller,
964             public AbstractXMLObjectUnmarshaller
965         {
966         public:
967             virtual ~EvidenceImpl() {}
968     
969             EvidenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
970                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
971             }
972                 
973             EvidenceImpl(const EvidenceImpl& src)
974                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
975                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
976                     if (*i) {
977                         AssertionIDRef* ref=dynamic_cast<AssertionIDRef*>(*i);
978                         if (ref) {
979                             getAssertionIDRefs().push_back(ref->cloneAssertionIDRef());
980                             continue;
981                         }
982     
983                         AssertionURIRef* uri=dynamic_cast<AssertionURIRef*>(*i);
984                         if (uri) {
985                             getAssertionURIRefs().push_back(uri->cloneAssertionURIRef());
986                             continue;
987                         }
988
989                         Assertion* assertion=dynamic_cast<Assertion*>(*i);
990                         if (assertion) {
991                             getAssertions().push_back(assertion->cloneAssertion());
992                             continue;
993                         }
994                         
995                         EncryptedAssertion* enc=dynamic_cast<EncryptedAssertion*>(*i);
996                         if (enc) {
997                             getEncryptedAssertions().push_back(enc->cloneEncryptedAssertion());
998                             continue;
999                         }
1000                     }
1001                 }
1002             }
1003             
1004             IMPL_XMLOBJECT_CLONE(Evidence);
1005             IMPL_TYPED_CHILDREN(AssertionIDRef,m_children.end());
1006             IMPL_TYPED_CHILDREN(AssertionURIRef,m_children.end());
1007             IMPL_TYPED_CHILDREN(Assertion,m_children.end());
1008             IMPL_TYPED_CHILDREN(EncryptedAssertion,m_children.end());
1009     
1010         protected:
1011             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1012                 PROC_TYPED_CHILDREN(AssertionIDRef,SAML20_NS,false);
1013                 PROC_TYPED_CHILDREN(AssertionURIRef,SAML20_NS,false);
1014                 PROC_TYPED_CHILDREN(Assertion,SAML20_NS,false);
1015                 PROC_TYPED_CHILDREN(EncryptedAssertion,SAML20_NS,false);
1016                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1017             }
1018         };
1019
1020         class SAML_DLLLOCAL AuthzDecisionStatementImpl : public virtual AuthzDecisionStatement,
1021             public AbstractComplexElement,
1022             public AbstractDOMCachingXMLObject,
1023             public AbstractXMLObjectMarshaller,
1024             public AbstractXMLObjectUnmarshaller
1025         {
1026             void init() {
1027                 m_Resource=NULL;
1028                 m_Decision=NULL;
1029                 m_Evidence=NULL;
1030                 m_children.push_back(NULL);
1031                 m_pos_Evidence=m_children.begin();
1032             }
1033         public:
1034             virtual ~AuthzDecisionStatementImpl() {
1035                 XMLString::release(&m_Resource);
1036                 XMLString::release(&m_Decision);
1037             }
1038     
1039             AuthzDecisionStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1040                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1041                 init();
1042             }
1043                 
1044             AuthzDecisionStatementImpl(const AuthzDecisionStatementImpl& src)
1045                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1046                 init();
1047                 setResource(src.getResource());
1048                 setDecision(src.getDecision());
1049                 if (src.getEvidence())
1050                     setEvidence(src.getEvidence()->cloneEvidence());
1051                 VectorOf(Action) v=getActions();
1052                 for (vector<Action*>::const_iterator i=src.m_Actions.begin(); i!=src.m_Actions.end(); i++) {
1053                     if (*i) {
1054                         v.push_back((*i)->cloneAction());
1055                     }
1056                 }
1057             }
1058             
1059             IMPL_XMLOBJECT_CLONE(AuthzDecisionStatement);
1060             Statement* cloneStatement() const {
1061                 return cloneAuthzDecisionStatement();
1062             }
1063             IMPL_STRING_ATTRIB(Resource);
1064             IMPL_STRING_ATTRIB(Decision);
1065             IMPL_TYPED_CHILD(Evidence);
1066             IMPL_TYPED_CHILDREN(Action, m_pos_Evidence);
1067     
1068         protected:
1069             void marshallAttributes(DOMElement* domElement) const {
1070                 MARSHALL_STRING_ATTRIB(Resource,RESOURCE,NULL);
1071                 MARSHALL_STRING_ATTRIB(Decision,DECISION,NULL);
1072             }
1073     
1074             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1075                 PROC_TYPED_CHILD(Evidence,SAML20_NS,false);
1076                 PROC_TYPED_CHILDREN(Action,SAML20_NS,false);
1077                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1078             }
1079     
1080             void processAttribute(const DOMAttr* attribute) {
1081                 PROC_STRING_ATTRIB(Resource,RESOURCE,NULL);
1082                 PROC_STRING_ATTRIB(Decision,DECISION,NULL);
1083                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1084             }
1085         };
1086
1087         //TODO need unit test for this
1088         class SAML_DLLLOCAL AttributeValueImpl : public virtual AttributeValue, public AnyElementImpl
1089         {
1090         public:
1091             virtual ~AttributeValueImpl() {}
1092     
1093             AttributeValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1094                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1095             }
1096                 
1097             AttributeValueImpl(const AttributeValueImpl& src) : AnyElementImpl(src) {
1098             }
1099             
1100             IMPL_XMLOBJECT_CLONE(AttributeValue);
1101         };
1102
1103
1104         class SAML_DLLLOCAL AttributeImpl : public virtual Attribute,
1105             public AbstractComplexElement,
1106             public AbstractAttributeExtensibleXMLObject,
1107             public AbstractDOMCachingXMLObject,
1108             public AbstractXMLObjectMarshaller,
1109             public AbstractXMLObjectUnmarshaller
1110         {
1111             void init() {
1112                 m_Name=m_NameFormat=m_FriendlyName=NULL;
1113             }
1114         public:
1115             virtual ~AttributeImpl() {
1116                 XMLString::release(&m_Name);
1117                 XMLString::release(&m_NameFormat);
1118                 XMLString::release(&m_FriendlyName);
1119             }
1120     
1121             AttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1122                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1123                 init();
1124             }
1125                 
1126             AttributeImpl(const AttributeImpl& src)
1127                     : AbstractXMLObject(src), AbstractComplexElement(src),
1128                         AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1129                 init();
1130                 setName(src.getName());
1131                 setNameFormat(src.getNameFormat());
1132                 setFriendlyName(src.getFriendlyName());
1133                 VectorOf(XMLObject) v=getAttributeValues();
1134                 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1135                     if (*i) {
1136                         v.push_back((*i)->clone());
1137                     }
1138                 }
1139             }
1140             
1141             IMPL_XMLOBJECT_CLONE(Attribute);
1142             IMPL_STRING_ATTRIB(Name);
1143             IMPL_STRING_ATTRIB(NameFormat);
1144             IMPL_STRING_ATTRIB(FriendlyName);
1145             IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1146     
1147             void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1148                 if (!qualifiedName.hasNamespaceURI()) {
1149                     if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1150                         setName(value);
1151                         return;
1152                     }
1153                     else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1154                         setNameFormat(value);
1155                         return;
1156                     }
1157                     else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1158                         setFriendlyName(value);
1159                         return;
1160                     }
1161                 }
1162                 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1163             }
1164
1165         protected:
1166             void marshallAttributes(DOMElement* domElement) const {
1167                 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
1168                 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,NULL);
1169                 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,NULL);
1170                 marshallExtensionAttributes(domElement);
1171             }
1172
1173             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1174                 getAttributeValues().push_back(childXMLObject);
1175             }
1176
1177             void processAttribute(const DOMAttr* attribute) {
1178                 unmarshallExtensionAttribute(attribute);
1179             }
1180         };
1181
1182         //TODO unit test for this 
1183         class SAML_DLLLOCAL EncryptedAttributeImpl : public virtual EncryptedAttribute, public EncryptedElementTypeImpl
1184         {
1185         public:
1186             virtual ~EncryptedAttributeImpl() {}
1187     
1188             EncryptedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1189                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1190                 
1191             EncryptedAttributeImpl(const EncryptedAttributeImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
1192             
1193             IMPL_XMLOBJECT_CLONE(EncryptedAttribute);
1194             EncryptedElementType* cloneEncryptedElementType() const {
1195                 return new EncryptedAttributeImpl(*this);
1196             }
1197         };
1198
1199         class SAML_DLLLOCAL AttributeStatementImpl : public virtual AttributeStatement,
1200             public AbstractComplexElement,
1201             public AbstractDOMCachingXMLObject,
1202             public AbstractXMLObjectMarshaller,
1203             public AbstractXMLObjectUnmarshaller
1204         {
1205         public:
1206             virtual ~AttributeStatementImpl() {}
1207     
1208             AttributeStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1209                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1210             }
1211                 
1212             AttributeStatementImpl(const AttributeStatementImpl& src)
1213                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1214                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1215                     if (*i) {
1216                         Attribute* attribute=dynamic_cast<Attribute*>(*i);
1217                         if (attribute) {
1218                             getAttributes().push_back(attribute->cloneAttribute());
1219                             continue;
1220                         }
1221                         
1222                         EncryptedAttribute* enc=dynamic_cast<EncryptedAttribute*>(*i);
1223                         if (enc) {
1224                             getEncryptedAttributes().push_back(enc->cloneEncryptedAttribute());
1225                             continue;
1226                         }
1227                     }
1228                 }
1229             }
1230             
1231             IMPL_XMLOBJECT_CLONE(AttributeStatement);
1232             Statement* cloneStatement() const {
1233                 return cloneAttributeStatement();
1234             }
1235             IMPL_TYPED_CHILDREN(Attribute, m_children.end());
1236             IMPL_TYPED_CHILDREN(EncryptedAttribute, m_children.end());
1237     
1238         protected:
1239             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1240                 PROC_TYPED_CHILDREN(Attribute,SAML20_NS,false);
1241                 PROC_TYPED_CHILDREN(EncryptedAttribute,SAML20_NS,false);
1242                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1243             }
1244         };
1245
1246         class SAML_DLLLOCAL AdviceImpl : public virtual Advice,
1247             public AbstractComplexElement,
1248             public AbstractDOMCachingXMLObject,
1249             public AbstractXMLObjectMarshaller,
1250             public AbstractXMLObjectUnmarshaller
1251         {
1252         public:
1253             virtual ~AdviceImpl() {}
1254     
1255             AdviceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1256                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1257             }
1258                 
1259             AdviceImpl(const AdviceImpl& src)
1260                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1261                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1262                     if (*i) {
1263                         AssertionIDRef* ref=dynamic_cast<AssertionIDRef*>(*i);
1264                         if (ref) {
1265                             getAssertionIDRefs().push_back(ref->cloneAssertionIDRef());
1266                             continue;
1267                         }
1268     
1269                         AssertionURIRef* uri=dynamic_cast<AssertionURIRef*>(*i);
1270                         if (uri) {
1271                             getAssertionURIRefs().push_back(uri->cloneAssertionURIRef());
1272                             continue;
1273                         }
1274
1275                         Assertion* assertion=dynamic_cast<Assertion*>(*i);
1276                         if (assertion) {
1277                             getAssertions().push_back(assertion->cloneAssertion());
1278                             continue;
1279                         }
1280                         
1281                         EncryptedAssertion* enc=dynamic_cast<EncryptedAssertion*>(*i);
1282                         if (enc) {
1283                             getEncryptedAssertions().push_back(enc->cloneEncryptedAssertion());
1284                             continue;
1285                         }
1286
1287                         getUnknownXMLObjects().push_back((*i)->clone());
1288                     }
1289                 }
1290             }
1291             
1292             IMPL_XMLOBJECT_CLONE(Advice);
1293             IMPL_TYPED_CHILDREN(AssertionIDRef,m_children.end());
1294             IMPL_TYPED_CHILDREN(AssertionURIRef,m_children.end());
1295             IMPL_TYPED_CHILDREN(Assertion,m_children.end());
1296             IMPL_TYPED_CHILDREN(EncryptedAssertion,m_children.end());
1297             IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
1298     
1299         protected:
1300             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1301                 PROC_TYPED_CHILDREN(AssertionIDRef,SAML20_NS,false);
1302                 PROC_TYPED_CHILDREN(AssertionURIRef,SAML20_NS,false);
1303                 PROC_TYPED_CHILDREN(Assertion,SAML20_NS,false);
1304                 PROC_TYPED_CHILDREN(EncryptedAssertion,SAML20_NS,false);
1305                 
1306                 // Unknown child.
1307                 const XMLCh* nsURI=root->getNamespaceURI();
1308                 if (!XMLString::equals(nsURI,SAML20_NS) && nsURI && *nsURI) {
1309                     getUnknownXMLObjects().push_back(childXMLObject);
1310                     return;
1311                 }
1312                 
1313                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1314             }
1315         };
1316
1317         //TODO unit test for this 
1318         class SAML_DLLLOCAL EncryptedAssertionImpl : public virtual EncryptedAssertion, public EncryptedElementTypeImpl
1319         {
1320         public:
1321             virtual ~EncryptedAssertionImpl() {}
1322     
1323             EncryptedAssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1324                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1325                 
1326             EncryptedAssertionImpl(const EncryptedAssertionImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
1327             
1328             IMPL_XMLOBJECT_CLONE(EncryptedAssertion);
1329             EncryptedElementType* cloneEncryptedElementType() const {
1330                 return new EncryptedAssertionImpl(*this);
1331             }
1332         };
1333
1334         class SAML_DLLLOCAL AssertionImpl : public virtual Assertion,
1335             public AbstractComplexElement,
1336             public AbstractDOMCachingXMLObject,
1337             public AbstractXMLObjectMarshaller,
1338             public AbstractXMLObjectUnmarshaller
1339         {
1340             void init() {
1341                 m_ID=NULL;
1342                 m_Version=NULL;
1343                 m_IssueInstant=NULL;
1344                 m_Issuer=NULL;
1345                 m_Signature=NULL;
1346                 m_Subject=NULL;
1347                 m_Conditions=NULL;
1348                 m_Advice=NULL;
1349                 m_children.push_back(NULL);
1350                 m_children.push_back(NULL);
1351                 m_children.push_back(NULL);
1352                 m_children.push_back(NULL);
1353                 m_children.push_back(NULL);
1354                 m_pos_Issuer=m_children.begin();
1355                 m_pos_Signature=m_pos_Issuer;
1356                 ++m_pos_Signature;
1357                 m_pos_Subject=m_pos_Signature;
1358                 ++m_pos_Subject;
1359                 m_pos_Conditions=m_pos_Subject;
1360                 ++m_pos_Conditions;
1361                 m_pos_Advice=m_pos_Conditions;
1362                 ++m_pos_Advice;
1363             }
1364         public:
1365             virtual ~AssertionImpl() {
1366                 XMLString::release(&m_ID);
1367                 XMLString::release(&m_Version);
1368                 delete m_IssueInstant;
1369             }
1370     
1371             AssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1372                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1373                 init();
1374             }
1375                 
1376             AssertionImpl(const AssertionImpl& src)
1377                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1378                 init();
1379                 setVersion(src.getVersion());
1380                 setID(src.getID());
1381                 setIssueInstant(src.getIssueInstant());
1382                 if (src.getIssuer())
1383                     setIssuer(src.getIssuer()->cloneIssuer());
1384                 if (src.getSignature())
1385                     setSignature(src.getSignature()->cloneSignature());
1386                 if (src.getSubject())
1387                     setSubject(src.getSubject()->cloneSubject());
1388                 if (src.getConditions())
1389                     setConditions(src.getConditions()->cloneConditions());
1390                 if (src.getAdvice())
1391                     setAdvice(src.getAdvice()->cloneAdvice());
1392                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1393                     if (*i) {
1394                         AuthnStatement* authst=dynamic_cast<AuthnStatement*>(*i);
1395                         if (authst) {
1396                             getAuthnStatements().push_back(authst->cloneAuthnStatement());
1397                             continue;
1398                         }
1399
1400                         AttributeStatement* attst=dynamic_cast<AttributeStatement*>(*i);
1401                         if (attst) {
1402                             getAttributeStatements().push_back(attst->cloneAttributeStatement());
1403                             continue;
1404                         }
1405
1406                         AuthzDecisionStatement* authzst=dynamic_cast<AuthzDecisionStatement*>(*i);
1407                         if (authzst) {
1408                             getAuthzDecisionStatements().push_back(authzst->cloneAuthzDecisionStatement());
1409                             continue;
1410                         }
1411     
1412                         Statement* st=dynamic_cast<Statement*>(*i);
1413                         if (st) {
1414                             getStatements().push_back(st->cloneStatement());
1415                             continue;
1416                         }
1417                     }
1418                 }
1419             }
1420             
1421             //IMPL_TYPED_CHILD(Signature);
1422             // Need customized setter.
1423         protected:
1424             Signature* m_Signature;
1425             list<XMLObject*>::iterator m_pos_Signature;
1426         public:
1427             Signature* getSignature() const {
1428                 return m_Signature;
1429             }
1430             
1431             void setSignature(Signature* sig) {
1432                 prepareForAssignment(m_Signature,sig);
1433                 *m_pos_Signature=m_Signature=sig;
1434                 // Sync content reference back up.
1435                 if (m_Signature)
1436                     m_Signature->setContentReference(new opensaml::ContentReference(*this));
1437             }
1438             
1439             IMPL_XMLOBJECT_CLONE(Assertion);
1440             IMPL_STRING_ATTRIB(Version);
1441             IMPL_ID_ATTRIB(ID);
1442             IMPL_DATETIME_ATTRIB(IssueInstant,0);
1443             IMPL_TYPED_CHILD(Issuer);
1444             IMPL_TYPED_CHILD(Subject);
1445             IMPL_TYPED_CHILD(Conditions);
1446             IMPL_TYPED_CHILD(Advice);
1447             IMPL_TYPED_CHILDREN(Statement, m_children.end());
1448             IMPL_TYPED_CHILDREN(AuthnStatement, m_children.end());
1449             IMPL_TYPED_CHILDREN(AttributeStatement, m_children.end());
1450             IMPL_TYPED_CHILDREN(AuthzDecisionStatement, m_children.end());
1451     
1452         protected:
1453             void marshallAttributes(DOMElement* domElement) const {
1454                 if (!m_Version)
1455                     const_cast<AssertionImpl*>(this)->m_Version=XMLString::transcode("2.0");
1456                 MARSHALL_STRING_ATTRIB(Version,VER,NULL);
1457                 if (!m_ID)
1458                     const_cast<AssertionImpl*>(this)->m_ID=SAMLConfig::getConfig().generateIdentifier();
1459                 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1460                 if (!m_IssueInstant) {
1461                     const_cast<AssertionImpl*>(this)->m_IssueInstantEpoch=time(NULL);
1462                     const_cast<AssertionImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
1463                 }
1464                 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1465             }
1466     
1467             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1468                 PROC_TYPED_CHILD(Issuer,SAML20_NS,false);
1469                 PROC_TYPED_CHILD(Signature,XMLSIG_NS,false);
1470                 PROC_TYPED_CHILD(Subject,SAML20_NS,false);
1471                 PROC_TYPED_CHILD(Conditions,SAML20_NS,false);
1472                 PROC_TYPED_CHILD(Advice,SAML20_NS,false);
1473                 PROC_TYPED_CHILDREN(AuthnStatement,SAML20_NS,false);
1474                 PROC_TYPED_CHILDREN(AttributeStatement,SAML20_NS,false);
1475                 PROC_TYPED_CHILDREN(AuthzDecisionStatement,SAML20_NS,false);
1476                 PROC_TYPED_CHILDREN(Statement,SAML20_NS,false);
1477                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1478             }
1479     
1480             void processAttribute(const DOMAttr* attribute) {
1481                 PROC_STRING_ATTRIB(Version,VER,NULL);
1482                 PROC_ID_ATTRIB(ID,ID,NULL);
1483                 PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1484                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1485             }
1486         };
1487
1488     };
1489 };
1490
1491 #if defined (_MSC_VER)
1492     #pragma warning( pop )
1493 #endif
1494
1495 // Builder Implementations
1496
1497 IMPL_XMLOBJECTBUILDER(Action);
1498 IMPL_XMLOBJECTBUILDER(Advice);
1499 IMPL_XMLOBJECTBUILDER(Assertion);
1500 IMPL_XMLOBJECTBUILDER(AssertionIDRef);
1501 IMPL_XMLOBJECTBUILDER(AssertionURIRef);
1502 IMPL_XMLOBJECTBUILDER(Attribute);
1503 IMPL_XMLOBJECTBUILDER(AttributeStatement);
1504 IMPL_XMLOBJECTBUILDER(AttributeValue);
1505 IMPL_XMLOBJECTBUILDER(Audience);
1506 IMPL_XMLOBJECTBUILDER(AudienceRestriction);
1507 IMPL_XMLOBJECTBUILDER(AuthenticatingAuthority);
1508 IMPL_XMLOBJECTBUILDER(AuthnContext);
1509 IMPL_XMLOBJECTBUILDER(AuthnContextClassRef);
1510 IMPL_XMLOBJECTBUILDER(AuthnContextDecl);
1511 IMPL_XMLOBJECTBUILDER(AuthnContextDeclRef);
1512 IMPL_XMLOBJECTBUILDER(AuthnStatement);
1513 IMPL_XMLOBJECTBUILDER(AuthzDecisionStatement);
1514 IMPL_XMLOBJECTBUILDER(Conditions);
1515 IMPL_XMLOBJECTBUILDER(EncryptedAssertion);
1516 IMPL_XMLOBJECTBUILDER(EncryptedAttribute);
1517 IMPL_XMLOBJECTBUILDER(EncryptedID);
1518 IMPL_XMLOBJECTBUILDER(Evidence);
1519 IMPL_XMLOBJECTBUILDER(Issuer);
1520 IMPL_XMLOBJECTBUILDER(KeyInfoConfirmationDataType);
1521 IMPL_XMLOBJECTBUILDER(NameID);
1522 IMPL_XMLOBJECTBUILDER(NameIDType);
1523 IMPL_XMLOBJECTBUILDER(OneTimeUse);
1524 IMPL_XMLOBJECTBUILDER(ProxyRestriction);
1525 IMPL_XMLOBJECTBUILDER(Subject);
1526 IMPL_XMLOBJECTBUILDER(SubjectConfirmation);
1527 IMPL_XMLOBJECTBUILDER(SubjectConfirmationData);
1528 IMPL_XMLOBJECTBUILDER(SubjectLocality);
1529
1530 // Unicode literals
1531 const XMLCh Action::LOCAL_NAME[] =                  UNICODE_LITERAL_6(A,c,t,i,o,n);
1532 const XMLCh Action::TYPE_NAME[] =                   UNICODE_LITERAL_10(A,c,t,i,o,n,T,y,p,e);
1533 const XMLCh Action::NAMESPACE_ATTRIB_NAME[] =       UNICODE_LITERAL_9(N,a,m,e,s,p,a,c,e);
1534 const XMLCh Advice::LOCAL_NAME[] =                  UNICODE_LITERAL_6(A,d,v,i,c,e);
1535 const XMLCh Advice::TYPE_NAME[] =                   UNICODE_LITERAL_10(A,d,v,i,c,e,T,y,p,e);
1536 const XMLCh Assertion::LOCAL_NAME[] =               UNICODE_LITERAL_9(A,s,s,e,r,t,i,o,n);
1537 const XMLCh Assertion::TYPE_NAME[] =                UNICODE_LITERAL_13(A,s,s,e,r,t,i,o,n,T,y,p,e);
1538 const XMLCh Assertion::VER_ATTRIB_NAME[] =          UNICODE_LITERAL_7(V,e,r,s,i,o,n);
1539 const XMLCh Assertion::ID_ATTRIB_NAME[] =           UNICODE_LITERAL_2(I,D);
1540 const XMLCh Assertion::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
1541 const XMLCh AssertionIDRef::LOCAL_NAME[] =          UNICODE_LITERAL_14(A,s,s,e,r,t,i,o,n,I,D,R,e,f);
1542 const XMLCh AssertionURIRef::LOCAL_NAME[] =         UNICODE_LITERAL_15(A,s,s,e,r,t,i,o,n,U,R,I,R,e,f);
1543 const XMLCh Attribute::LOCAL_NAME[] =               UNICODE_LITERAL_9(A,t,t,r,i,b,u,t,e);
1544 const XMLCh Attribute::TYPE_NAME[] =                UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,T,y,p,e);
1545 const XMLCh Attribute::NAME_ATTRIB_NAME[] =         UNICODE_LITERAL_4(N,a,m,e);
1546 const XMLCh Attribute::NAMEFORMAT_ATTRIB_NAME[] =   UNICODE_LITERAL_10(N,a,m,e,F,o,r,m,a,t);
1547 const XMLCh Attribute::FRIENDLYNAME_ATTRIB_NAME[] = UNICODE_LITERAL_12(F,r,i,e,n,d,l,y,N,a,m,e);
1548 const XMLCh AttributeStatement::LOCAL_NAME[] =      UNICODE_LITERAL_18(A,t,t,r,i,b,u,t,e,S,t,a,t,e,m,e,n,t);
1549 const XMLCh AttributeStatement::TYPE_NAME[] =       UNICODE_LITERAL_22(A,t,t,r,i,b,u,t,e,S,t,a,t,e,m,e,n,t,T,y,p,e);
1550 const XMLCh AttributeValue::LOCAL_NAME[] =          UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,V,a,l,u,e);
1551 const XMLCh Audience::LOCAL_NAME[] =                UNICODE_LITERAL_8(A,u,d,i,e,n,c,e);
1552 const XMLCh AudienceRestriction::LOCAL_NAME[] =     UNICODE_LITERAL_19(A,u,d,i,e,n,c,e,R,e,s,t,r,i,c,t,i,o,n);
1553 const XMLCh AudienceRestriction::TYPE_NAME[] =      UNICODE_LITERAL_23(A,u,d,i,e,n,c,e,R,e,s,t,r,i,c,t,i,o,n,T,y,p,e);
1554 const XMLCh AuthenticatingAuthority::LOCAL_NAME[] = UNICODE_LITERAL_23(A,u,t,h,e,n,t,i,c,a,t,i,n,g,A,u,t,h,o,r,i,t,y);
1555 const XMLCh AuthnContext::LOCAL_NAME[] =            UNICODE_LITERAL_12(A,u,t,h,n,C,o,n,t,e,x,t);
1556 const XMLCh AuthnContext::TYPE_NAME[] =             UNICODE_LITERAL_16(A,u,t,h,n,C,o,n,t,e,x,t,T,y,p,e);
1557 const XMLCh AuthnContextClassRef::LOCAL_NAME[] =    UNICODE_LITERAL_20(A,u,t,h,n,C,o,n,t,e,x,t,C,l,a,s,s,R,e,f);
1558 const XMLCh AuthnContextDecl::LOCAL_NAME[] =        UNICODE_LITERAL_16(A,u,t,h,n,C,o,n,t,e,x,t,D,e,c,l);
1559 const XMLCh AuthnContextDeclRef::LOCAL_NAME[] =     UNICODE_LITERAL_19(A,u,t,h,n,C,o,n,t,e,x,t,D,e,c,l,R,e,f);
1560 const XMLCh AuthnStatement::LOCAL_NAME[] =          UNICODE_LITERAL_14(A,u,t,h,n,S,t,a,t,e,m,e,n,t);
1561 const XMLCh AuthnStatement::TYPE_NAME[] =           UNICODE_LITERAL_18(A,u,t,h,n,S,t,a,t,e,m,e,n,t,T,y,p,e);
1562 const XMLCh AuthnStatement::AUTHNINSTANT_ATTRIB_NAME[] =    UNICODE_LITERAL_12(A,u,t,h,n,I,n,s,t,a,n,t);
1563 const XMLCh AuthnStatement::SESSIONINDEX_ATTRIB_NAME[] =    UNICODE_LITERAL_12(S,e,s,s,i,o,n,I,n,d,e,x);
1564 const XMLCh AuthnStatement::SESSIONNOTONORAFTER_ATTRIB_NAME[] = UNICODE_LITERAL_19(S,e,s,s,i,o,n,N,o,t,O,n,O,r,A,f,t,e,r);
1565 const XMLCh AuthzDecisionStatement::LOCAL_NAME[] =  UNICODE_LITERAL_22(A,u,t,h,z,D,e,c,i,s,i,o,n,S,t,a,t,e,m,e,n,t);
1566 const XMLCh AuthzDecisionStatement::TYPE_NAME[] =   UNICODE_LITERAL_26(A,u,t,h,z,D,e,c,i,s,i,o,n,S,t,a,t,e,m,e,n,t,T,y,p,e);
1567 const XMLCh AuthzDecisionStatement::RESOURCE_ATTRIB_NAME[] =    UNICODE_LITERAL_8(R,e,s,o,u,r,c,e);
1568 const XMLCh AuthzDecisionStatement::DECISION_ATTRIB_NAME[] =    UNICODE_LITERAL_8(D,e,c,i,s,i,o,n);
1569 const XMLCh AuthzDecisionStatement::DECISION_PERMIT[] = UNICODE_LITERAL_6(P,e,r,m,i,t);
1570 const XMLCh AuthzDecisionStatement::DECISION_DENY[] =   UNICODE_LITERAL_4(D,e,n,y);
1571 const XMLCh AuthzDecisionStatement::DECISION_INDETERMINATE[] =  UNICODE_LITERAL_13(I,n,d,e,t,e,r,m,i,n,a,t,e);
1572 const XMLCh BaseID::LOCAL_NAME[] =                  UNICODE_LITERAL_6(B,a,s,e,I,D);
1573 const XMLCh BaseID::NAMEQUALIFIER_ATTRIB_NAME[] =   UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1574 const XMLCh BaseID::SPNAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_15(S,P,N,a,m,e,Q,u,a,l,i,f,i,e,r);
1575 const XMLCh Condition::LOCAL_NAME[] =               UNICODE_LITERAL_9(C,o,n,d,i,t,i,o,n);
1576 const XMLCh Conditions::LOCAL_NAME[] =              UNICODE_LITERAL_10(C,o,n,d,i,t,i,o,n,s);
1577 const XMLCh Conditions::TYPE_NAME[] =               UNICODE_LITERAL_14(C,o,n,d,i,t,i,o,n,s,T,y,p,e);
1578 const XMLCh Conditions::NOTBEFORE_ATTRIB_NAME[] =   UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1579 const XMLCh Conditions::NOTONORAFTER_ATTRIB_NAME[] =UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1580 const XMLCh EncryptedAssertion::LOCAL_NAME[] =      UNICODE_LITERAL_18(E,n,c,r,y,p,t,e,d,A,s,s,e,r,t,i,o,n);
1581 const XMLCh EncryptedAttribute::LOCAL_NAME[] =      UNICODE_LITERAL_18(E,n,c,r,y,p,t,e,d,A,t,t,r,i,b,u,t,e);
1582 const XMLCh EncryptedElementType::LOCAL_NAME[] =    {chNull};
1583 const XMLCh EncryptedElementType::TYPE_NAME[] =     UNICODE_LITERAL_20(E,n,c,r,y,p,t,e,d,E,l,e,m,e,n,t,T,y,p,e);
1584 const XMLCh EncryptedID::LOCAL_NAME[] =             UNICODE_LITERAL_11(E,n,c,r,y,p,t,e,d,I,d);
1585 const XMLCh Evidence::LOCAL_NAME[] =                UNICODE_LITERAL_8(E,v,i,d,e,n,c,e);
1586 const XMLCh Evidence::TYPE_NAME[] =                 UNICODE_LITERAL_12(E,v,i,d,e,n,c,e,T,y,p,e);
1587 const XMLCh Issuer::LOCAL_NAME[] =                  UNICODE_LITERAL_6(I,s,s,u,e,r);
1588 const XMLCh KeyInfoConfirmationDataType::LOCAL_NAME[] = UNICODE_LITERAL_23(S,u,b,j,e,c,t,C,o,n,f,i,r,m,a,t,i,o,n,D,a,t,a);
1589 const XMLCh KeyInfoConfirmationDataType::TYPE_NAME[] = UNICODE_LITERAL_27(K,e,y,I,n,f,o,C,o,n,f,i,r,m,a,t,i,o,n,D,a,t,a,T,y,p,e);
1590 const XMLCh NameID::LOCAL_NAME[] =                  UNICODE_LITERAL_6(N,a,m,e,I,D);
1591 const XMLCh NameIDType::LOCAL_NAME[] =              {chNull};
1592 const XMLCh NameIDType::TYPE_NAME[] =               UNICODE_LITERAL_10(N,a,m,e,I,D,T,y,p,e);
1593 const XMLCh NameIDType::NAMEQUALIFIER_ATTRIB_NAME[] =   UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1594 const XMLCh NameIDType::SPNAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_15(S,P,N,a,m,e,Q,u,a,l,i,f,i,e,r);
1595 const XMLCh NameIDType::FORMAT_ATTRIB_NAME[] =      UNICODE_LITERAL_6(F,o,r,m,a,t);
1596 const XMLCh NameIDType::SPPROVIDEDID_ATTRIB_NAME[] =    UNICODE_LITERAL_12(S,P,P,r,o,v,i,d,e,d,I,D);
1597 const XMLCh OneTimeUse::LOCAL_NAME[] =              UNICODE_LITERAL_10(O,n,e,T,i,m,e,U,s,e);
1598 const XMLCh OneTimeUse::TYPE_NAME[] =               UNICODE_LITERAL_14(O,n,e,T,i,m,e,U,s,e,T,y,p,e);
1599 const XMLCh ProxyRestriction::LOCAL_NAME[] =        UNICODE_LITERAL_16(P,r,o,x,y,R,e,s,t,r,i,c,t,i,o,n);
1600 const XMLCh ProxyRestriction::TYPE_NAME[] =         UNICODE_LITERAL_20(P,r,o,x,y,R,e,s,t,r,i,c,t,i,o,n,T,y,p,e);
1601 const XMLCh ProxyRestriction::COUNT_ATTRIB_NAME[] = UNICODE_LITERAL_5(C,o,u,n,t);
1602 const XMLCh Statement::LOCAL_NAME[] =               UNICODE_LITERAL_9(S,t,a,t,e,m,e,n,t);
1603 const XMLCh Subject::LOCAL_NAME[] =                 UNICODE_LITERAL_7(S,u,b,j,e,c,t);
1604 const XMLCh Subject::TYPE_NAME[] =                  UNICODE_LITERAL_11(S,u,b,j,e,c,t,T,y,p,e);
1605 const XMLCh SubjectConfirmation::LOCAL_NAME[] =     UNICODE_LITERAL_19(S,u,b,j,e,c,t,C,o,n,f,i,r,m,a,t,i,o,n);
1606 const XMLCh SubjectConfirmation::TYPE_NAME[] =      UNICODE_LITERAL_23(S,u,b,j,e,c,t,C,o,n,f,i,r,m,a,t,i,o,n,T,y,p,e);
1607 const XMLCh SubjectConfirmation::METHOD_ATTRIB_NAME[] = UNICODE_LITERAL_6(M,e,t,h,o,d);
1608 const XMLCh SubjectConfirmationData::LOCAL_NAME[] = UNICODE_LITERAL_23(S,u,b,j,e,c,t,C,o,n,f,i,r,m,a,t,i,o,n,D,a,t,a);
1609 const XMLCh SubjectConfirmationDataType::NOTBEFORE_ATTRIB_NAME[] =      UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1610 const XMLCh SubjectConfirmationDataType::NOTONORAFTER_ATTRIB_NAME[] =   UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1611 const XMLCh SubjectConfirmationDataType::INRESPONSETO_ATTRIB_NAME[] =   UNICODE_LITERAL_12(I,n,R,e,s,p,o,n,s,e,T,o);
1612 const XMLCh SubjectConfirmationDataType::RECIPIENT_ATTRIB_NAME[] =      UNICODE_LITERAL_9(R,e,c,i,p,i,e,n,t);
1613 const XMLCh SubjectConfirmationDataType::ADDRESS_ATTRIB_NAME[] =        UNICODE_LITERAL_7(A,d,d,r,e,s,s);
1614 const XMLCh SubjectLocality::LOCAL_NAME[] =         UNICODE_LITERAL_15(S,u,b,j,e,c,t,L,o,c,a,l,i,t,y);
1615 const XMLCh SubjectLocality::TYPE_NAME[] =          UNICODE_LITERAL_19(S,u,b,j,e,c,t,L,o,c,a,l,i,t,y,T,y,p,e);
1616 const XMLCh SubjectLocality::ADDRESS_ATTRIB_NAME[] =UNICODE_LITERAL_7(A,d,d,r,e,s,s);
1617 const XMLCh SubjectLocality::DNSNAME_ATTRIB_NAME[] =UNICODE_LITERAL_7(D,N,S,N,a,m,e);
1618
1619 const XMLCh NameIDType::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
1620 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1621   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1622   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1623   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1624   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1625   chLatin_u, chLatin_n, chLatin_s, chLatin_p, chLatin_e, chLatin_c, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d, chLatin_d, chNull
1626 };
1627
1628 const XMLCh NameIDType::EMAIL[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
1629 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1630   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1631   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1632   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1633   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1634   chLatin_e, chLatin_m, chLatin_a, chLatin_i, chLatin_l, chLatin_A, chLatin_d, chLatin_d, chLatin_r, chLatin_e, chLatin_s, chLatin_s, chNull
1635 };
1636
1637 const XMLCh NameIDType::X509_SUBJECT[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName
1638 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1639   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1640   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1641   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1642   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1643   chLatin_X, chDigit_5, chDigit_0, chDigit_9, chLatin_S, chLatin_u, chLatin_b, chLatin_j, chLatin_e, chLatin_c, chLatin_t,
1644   chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1645 };
1646
1647 const XMLCh NameIDType::WIN_DOMAIN_QUALIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName
1648 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1649   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1650   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1651   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1652   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1653   chLatin_W, chLatin_i, chLatin_n, chLatin_d, chLatin_o, chLatin_w, chLatin_s,
1654   chLatin_D, chLatin_o, chLatin_m, chLatin_a, chLatin_i, chLatin_n,
1655   chLatin_Q, chLatin_u, chLatin_a, chLatin_l, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d,
1656   chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1657 };
1658
1659 const XMLCh NameIDType::KERBEROS[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos
1660 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1661   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1662   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1663   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1664   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1665   chLatin_k, chLatin_e, chLatin_r, chLatin_b, chLatin_e, chLatin_r, chLatin_o, chLatin_s, chNull
1666 };
1667
1668 const XMLCh NameIDType::ENTITY[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:entity
1669 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1670   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1671   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1672   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1673   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1674   chLatin_e, chLatin_n, chLatin_t, chLatin_i, chLatin_t, chLatin_y, chNull
1675 };
1676
1677 const XMLCh NameIDType::PERSISTENT[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:persistent
1678 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1679   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1680   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1681   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1682   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1683   chLatin_p, chLatin_e, chLatin_r, chLatin_s, chLatin_i, chLatin_s, chLatin_t, chLatin_e, chLatin_n, chLatin_t, chNull
1684 };
1685
1686 const XMLCh NameIDType::TRANSIENT[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:transient
1687 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1688   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1689   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1690   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1691   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1692   chLatin_t, chLatin_r, chLatin_a, chLatin_n, chLatin_s, chLatin_i, chLatin_e, chLatin_n, chLatin_t, chNull
1693 };
1694
1695 const XMLCh SubjectConfirmation::BEARER[] = // urn:oasis:names:tc:SAML:2.0:cm:bearer
1696 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1697   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1698   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1699   chLatin_c, chLatin_m, chColon, chLatin_b, chLatin_e, chLatin_a, chLatin_r, chLatin_e, chLatin_r, chNull
1700 };
1701
1702 const XMLCh SubjectConfirmation::HOLDER_KEY[] = // urn:oasis:names:tc:SAML:2.0:cm:holder-of-key
1703 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1704   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1705   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1706   chLatin_c, chLatin_m, chColon, chLatin_h, chLatin_o, chLatin_l, chLatin_d, chLatin_e, chLatin_r, chDash,
1707       chLatin_o, chLatin_f, chDash, chLatin_k, chLatin_e, chLatin_y, chNull
1708 };
1709
1710 const XMLCh SubjectConfirmation::SENDER_VOUCHES[] = // urn:oasis:names:tc:SAML:2.0:cm:sender-vouches
1711 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1712   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1713   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1714   chLatin_c, chLatin_m, chColon, chLatin_s, chLatin_e, chLatin_n, chLatin_d, chLatin_e, chLatin_r, chDash,
1715       chLatin_v, chLatin_o, chLatin_u, chLatin_c, chLatin_h, chLatin_e, chLatin_s, chNull
1716 };
1717
1718 const XMLCh Action::RWEDC_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc
1719 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1720   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1721   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1722   chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1723   chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chNull
1724 };
1725
1726 const XMLCh Action::RWEDC_NEG_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc-negation
1727 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1728   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1729   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1730   chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1731   chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chDash,
1732   chLatin_n, chLatin_e, chLatin_g, chLatin_a, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull
1733 };
1734
1735 const XMLCh Action::GHPP_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:ghpp
1736 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1737   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1738   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1739   chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1740   chLatin_g, chLatin_h, chLatin_p, chLatin_p, chNull
1741 };
1742
1743 const XMLCh Action::UNIX_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:unix
1744 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1745   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1746   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1747   chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1748   chLatin_u, chLatin_n, chLatin_i, chLatin_x, chNull
1749 };
1750
1751 const XMLCh Attribute::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified
1752 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1753   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1754   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1755   chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1756   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1757   chLatin_u, chLatin_n, chLatin_s, chLatin_p, chLatin_e, chLatin_c, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d, chLatin_d, chNull
1758 };
1759
1760 const XMLCh Attribute::URI_REFERENCE[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:uri
1761 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1762   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1763   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1764   chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1765   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1766   chLatin_u, chLatin_r, chLatin_i, chNull
1767 };
1768
1769 const XMLCh Attribute::BASIC[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:basic
1770 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1771   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1772   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1773   chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1774   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1775   chLatin_b, chLatin_a, chLatin_s, chLatin_i, chLatin_c, chNull
1776 };