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