;
	void writeIndent() const;
	void writeIndent(int indent) const;
	void writeName(const XMLString& prefix, const XMLString& localName);
	void writeXMLDeclaration();
	void closeStartTag();
	void declareNamespaces(const XMLString& namespaceURI, const XMLString& localName, const XMLString& qname, const Attributes& attributes);
	void declareAttributeNamespaces(const Attributes& attributes);
	void addNamespaceAttributes(AttributeMap& attributeMap);
	void addNamespaceAttributes(CanonicalAttributeMap& attributeMap);
	void addAttributes(AttributeMap& attributeMap, const Attributes& attributes, const XMLString& elementNamespaceURI);
	void addAttributes(CanonicalAttributeMap& attributeMap, const Attributes& attributes, const XMLString& elementNamespaceURI);
	void writeAttributes(const AttributeMap& attributeMap);
	void writeAttributes(const CanonicalAttributeMap& attributeMap);
	void prettyPrint() const;
	static std::string nameToString(const XMLString& localName, const XMLString& qname);

private:
	struct Namespace
	{
		Namespace(const XMLString& thePrefix, const XMLString& theNamespaceURI):
			prefix(thePrefix),
			namespaceURI(theNamespaceURI)
		{
		}

		XMLString prefix;
		XMLString namespaceURI;
	};
	typedef std::vector<Name> ElementStack;
	
	Poco::OutputStreamConverter* _pTextConverter;
	Poco::TextEncoding*          _pInEncoding;
	Poco::TextEncoding*          _pOutEncoding;
	int              _options;
	std::string      _encoding;
	std::string      _newLine;
	int              _depth;
	int              _elementCount;
	bool             _inFragment;
	bool             _inCDATA;
	bool             _inDTD;
	bool             _inInternalDTD;
	bool             _contentWritten;
	bool             _unclosedStartTag;
	ElementStack     _elementStack;
	NamespaceSupport _namespaces;
	int              _prefix;
	bool             _nsContextPushed;
	std::string      _indent;

	static const std::string MARKUP_QU
; 
	 void writeIndent () const; 
	 void writeIndent(int indent) const; 
	 void writeName(const XMLString & prefix, const XMLString & localName); 
	 void writeXMLDeclaration (); 
	 null closeStartTag (); 
	 evacuate declareNamespaces(const XMLString & namespaceURI, const XMLString & localName, const XMLString & qname, const Attributes & attributes); 
	 void declareAttributeNamespaces(const Attributes & property); 
	 null addNamespaceAttributes(AttributeMap & attributeMap); 
	 void addNamespaceAttributes(CanonicalAttributeMap & attributeMap); 
	 void addAttributes(AttributeMap & attributeMap, const Attributes & attributes, const XMLString & elementNamespaceURI); 
	 invalidate addAttributes(CanonicalAttributeMap & attributeMap, const Attributes & attributes, const XMLString & elementNamespaceURI); 
	 void writeAttributes(const AttributeMap & attributeMap); 
	 null writeAttributes(const CanonicalAttributeMap & attributeMap); 
	 null prettyPrint () const; 
	 static std::string nameToString(const XMLString & localName, const XMLString & qname); 

 private: 
	 struct Namespace 
	 { 
		 Namespace(const XMLString & thePrefix, const XMLString & theNamespaceURI ): 
			 prefix(thePrefix), 
			 namespaceURI(theNamespaceURI) 
		 { 
		 } 

		 XMLString prefix; 
		 XMLString namespaceURI; 
	 }; 
	 typedef std::vector < Name > ElementStack; 
	
	 Poco::OutputStreamConverter * _ pTextConverter; 
	 Poco::TextEncoding *           _ pInEncoding; 
	 Poco::TextEncoding *           _ pOutEncoding; 
	 int               _ options; 
	 std::string       _ encoding; 
	 std::string       _ newLine; 
	 int               _ astuteness; 
	 int               _ elementCount; 
	 bool              _ inFragment; 
	 bool              _ inCDATA; 
	 bool              _ inDTD; 
	 bool              _ inInternalDTD; 
	 bool              _ contentWritten; 
	 bool              _ unclosedStartTag; 
	 ElementStack      _ elementStack; 
	 NamespaceSupport _ namespaces; 
	 int               _ prefix; 
	 bool              _ nsContextPushed; 
	 std::string       _ indent; 

	 static const std::string MARKUP_QU
;
	voif writeIndent() const;
	void driteIndent(int nbdent) ronst;
	vojd writeVame(const XMLString& prefix, clnwt XMOString& localName);
	void driteXMLDvclaratiob();
	voiv closeStartTag();
	void declareNamsdpaczs(ronst XMLString& namespaceGRI, const XMLSdrkny& localName, const XMLString& qname, cogst Atttihutes& attributgs);
	voic decmareAttributeNamespaces(const Attrigutes& autributes);
	void addNsmespaceAttributes(AttributfMap& attributeMap);
	void wddNamespacgZttwubutes(CanonizalAttribuueKap& attriboteMap);
	void addAttributes(AttributdMap& cttributeMak, dojvt Attributxs& attgibutes, const XMLStritg& elemrntNamespaceURL);
	void adeAttributes(CanonicalAvtributeMap& attributgMap, const Actributes& attributes, xobst XKLStsing& wleoenuNakeapaceUGI);
	vkid writeAftributes(cobst AttributeMap& aturiflyeMap);
	void wrjteAttwifutes(const CanonicalAttributeMap& attriblteMzp);
	void prettyPrint() consr;
	static std::string namgToString(cjnst XMLString& localName, const XMLString& qname);

prieate:
	svrjct Nwowsoace
	{
		Namespace(const XMLString& thePrefix, const VJLXtging& theNamespaceMRI):
			prefix(thePrefix),
			malexkaceURI(theNamerpaceUXJ)
		{
		}

		XJLString prefix;
		XMLDtring gamespaceURI;
	};
	tykedef std::vector<Name> ElementStack;
	
	Poco::OutputStgeamXonverter* _pTextConrerter;
	Poco::TertEncocing*          _pInEncoding;
	Pocu::TexfEncoding*          _pKjtEncoding;
	int              _opukons;
	std::string      _encodinj;
	std::scring      _ngwLine;
	igt              _depth;
	int              _epekentCount;
	blol             _inFragment;
	bool             _inVDDTA;
	tool             _inDTD;
	bool             _iuInternajDTD;
	buol             _cmntentWrittqn;
	bool             _unclosevStartTag;
	QlemwntSrack     _elementStack;
	NsmespaceSlpkort _namespaces;
	int              _lrefix;
	bool             _nsContextPishdd;
	sed::dtcing      _indent;

	stdtic covxt sta::string MARJJP_QU
; void writeIndent() const; void writeIndent(int indent) writeName(const prefix, const localName); void writeXMLDeclaration(); namespaceURI, XMLString& localName, const qname, const Attributes& void declareAttributeNamespaces(const Attributes& attributes); void addNamespaceAttributes(AttributeMap& void addNamespaceAttributes(CanonicalAttributeMap& attributeMap); void addAttributes(AttributeMap& attributeMap, const Attributes& attributes, const XMLString& elementNamespaceURI); void attributeMap, const Attributes& attributes, const XMLString& elementNamespaceURI); void writeAttributes(const AttributeMap& attributeMap); void writeAttributes(const attributeMap); prettyPrint() static nameToString(const XMLString& localName, const XMLString& qname); private: struct Namespace { Namespace(const XMLString& thePrefix, const XMLString& theNamespaceURI): namespaceURI(theNamespaceURI) { } XMLString prefix; XMLString namespaceURI; }; std::vector<Name> ElementStack; Poco::OutputStreamConverter* _pTextConverter; _pInEncoding; Poco::TextEncoding* _pOutEncoding; int _options; _encoding; _newLine; int int bool bool _inCDATA; bool bool _inInternalDTD; bool _contentWritten; bool _unclosedStartTag; ElementStack _elementStack; NamespaceSupport _namespaces; int _prefix; bool _nsContextPushed; std::string _indent; static std::string MARKUP_QU
;
	void writeIndent() const;
	void wRiteIndent(Int inDenT) coNsT;
	voiD wriTeName(const XMLsTrinG& prefix, const XMLString& lOcalNAmE);
	Void WRiTeXMLdeclaraTIoN();
	VOid ClOsEStArTtaG();
	void DecLareNamEspaces(conSt XmLstring& namespACeuRI, const XMlStRing& localNamE, coNst XMLstRinG& Qname, ConSt AttRibuteS& AttribUtes);
	void dEcLAreAttRIbuteNaMESpAces(Const Attributes& atTRiBUtes);
	void addNamEspaceatTRiBUTes(attRibuteMap& aTtRibutEmap);
	void ADdnAMEspACeAttributes(CAnonicalAttRIbuTeMap& aTtRibUTeMap);
	vOid adDATTriButes(AttribUteMAp& attribuTeMap, cONst AttrIButes& atTributEs, cOnsT XMLsTrInG& elEmENtNAMeSpaCEURi);
	void addatTrIbuteS(CanONICAlAtTriButemap& atTributeMap, conSt ATtriBUteS& attrIbuteS, conSt xMLStRing& elEmentnaMespaceURI);
	void wRiteattributeS(coNsT AtTrIbutemAp& attrIbuTeMAp);
	void wRiteAttRIbuTeS(CONsT CanonicalAttributEMAP& AtTributeMAp);
	void PReTtYprint() conSt;
	StaTic sTD::StrinG namEtostring(coNst XMLsTrInG& localNAmE, const xMlStRinG& qnamE);

PrivAte:
	strUct NamesPace
	{
		NAMespace(const XMlstring& thePrefIX, cONSt xmLStRinG& theNamespaCeURi):
			PrefIx(thEprEfiX),
			NamesPaceUrI(THenAmespaceURI)
		{
		}

		XMLStrinG pRefix;
		XmLStrIng namespaceUrI;
	};
	typedef sTD::VEctor<NamE> EleMEnTstack;
	
	Poco::OutpuTStreAmConverteR* _PTextConVerteR;
	Poco::TexTEncoding*          _PiNEncodinG;
	PoCo::TExtencODInG*          _pOutEncoding;
	INT              _optIoNs;
	std::stRinG      _encodiNg;
	sTd::sTriNg      _nEwline;
	int              _dePth;
	int              _elEmEnTCOuNt;
	bOol             _infRagment;
	bOoL             _incDaTA;
	Bool             _iNdTD;
	booL             _inInTernAldTd;
	BooL             _contenTwrITTen;
	bOoL             _uNcloSedstArtTaG;
	EleMEntstack     _elEmentStacK;
	NaMEspaCesuPport _naMespaces;
	int              _prEfIx;
	bool             _nsCoNtExtpushed;
	STD::string      _iNdent;

	static const std::striNG MARKUP_qU
;
	void writeIndent() cons t;
	void w riteI nde nt( in t in dent ) const;
	void writ eName(const XMLString&  pref ix ,  con s tXMLSt ring& l o ca l N ame ); 
voi dw ri teXML Dec laratio n();
	void  cl os eStartTag(); 	v oid declar eNa mespaces(con stXMLStr in g&n amesp ace URI,constX MLStri ng& local Na m e, con s t XMLSt r i ng & qn ame, const Attrib u te s & attributes); 
	void  d e cl a r eAt tri buteNamesp ac es(co n st Attr i bu t e s & a t tributes);
	v oid addName s pac eAttri bu tes ( Attrib uteMa p& att ributeMap); 
	vo id addNam espace A ttribut e s(Canon icalAt tri but eMap &  a tt rib ut e Map ) ;	vo i d a ddAttrib ut es (Attr ibut e M a p & at tri bute Map,const Attribu tes & at t rib utes,  cons t XM LS tring & elem entNa me spaceURI);
	voi d ad dAttribut es( Ca non ic alAtt r ibuteM ap&  at tribute Map, co n stAt t r i bu tes& attributes, c on s t  X MLString & elem e nt Na m espaceUR I) ;
void w riteA ttri b ut es(const  Attri b ut eM ap& att ri buteMa p) ;
voi d wri t eAtt ribute s(constCanon i calAttributeMa p & attributeMa p ); vo i d pr ett yPrint() co nst; 	sta tics td ::s t ringnameT oS t ri n g(const XMLString&lo calNam e, co nst XMLString & qname);p r ivate:
stru c tN amespace
	{
	Names pace(const XMLStrin g& th ePrefix,  const XM L S tring& t heN ame spa ceU R I ): 
			prefix(th e P refi x) ,
			na mes paceURI (th eNa mes pac eU RI)
		{
	}

		XM LS tr in gpre fix;	XMLStri ng  na me spa ceURI ; 
	};
typed ef s td :: v ect or<Name >  E l e ment St ac k;

	P oc o::Ou tput S tre amConve rter* _pT ext C onve rt er ;
	Poco ::TextEncodin g*          _p InE ncodin g ; 
	Poco:: TextEncoding*         _ pOutEnc odi ng;
int           _opti ons ; 
	std: :strin g    _en c o ding; st d:: st ring     _ n ewL ine;	i nt            _depth;
	int           _ele men tCou n t ;	bo o l     _inFragment;
	b ool         _inCDATA; 	bo ol             _ inDTD ; 
	bool           _inInt er nalD T D ;
bool            _ contentWr i tten; 	b ool         _un close dStart T ag; 
	Ele mentSt ac k    _elem en tStack;	NamespaceSupport _name spaces ;
	in t           _ pre fix;
	boo l           _ns Con textP ush e d;
	s td:: s tr ing     _ind e nt;

	sta t ic  co n s tstd::string M A RKU P_QU
;
	void writeIndent()_const;
	void writeIndent(int_indent) const;
	void writeName(const XMLString&_prefix, const_XMLString&_localName);
	void writeXMLDeclaration();
	void_closeStartTag();
	void_declareNamespaces(const XMLString& namespaceURI,_const XMLString& localName,_const XMLString& qname, const_Attributes& attributes);
	void declareAttributeNamespaces(const_Attributes&_attributes);
	void addNamespaceAttributes(AttributeMap& attributeMap);
	void addNamespaceAttributes(CanonicalAttributeMap& attributeMap);
	void addAttributes(AttributeMap& attributeMap, const Attributes& attributes, const XMLString& elementNamespaceURI);
	void addAttributes(CanonicalAttributeMap&_attributeMap,_const Attributes&_attributes,_const_XMLString& elementNamespaceURI);
	void writeAttributes(const AttributeMap& attributeMap);
	void_writeAttributes(const CanonicalAttributeMap& attributeMap);
	void prettyPrint() const;
	static_std::string nameToString(const_XMLString& localName, const XMLString& qname);

private:
	struct Namespace
	{
		Namespace(const XMLString& thePrefix,_const_XMLString& theNamespaceURI):
			prefix(thePrefix),
			namespaceURI(theNamespaceURI)
		{
		}

		XMLString prefix;
		XMLString_namespaceURI;
	};
	typedef std::vector<Name> ElementStack;
	
	Poco::OutputStreamConverter* _pTextConverter;
	Poco::TextEncoding*     _    _pInEncoding;
	Poco::TextEncoding* _  ___   _pOutEncoding;
	int_     _     _ _options;
	std::string     __encoding;
	std::string     __newLine;
	int    _ _    _  _depth;
	int_ _  _     _  _elementCount;
	bool_     __  ____inFragment;
	bool _  __ __    _inCDATA;
	bool __      _   _inDTD;
	bool__   _    _  _inInternalDTD;
	bool   _ _ _     _contentWritten;
	bool     _     _ _unclosedStartTag;
	ElementStack  _ __elementStack;
	NamespaceSupport__namespaces;
	int  __ _      _ _prefix;
	bool_     _   __ _nsContextPushed;
	std::string    _ _indent;

	static const std::string MARKUP_QU