3

T'ícã@sLdZddlmZddlmZddlmZGdd„deƒZGdd„deƒZ	d	S)
z+Docutils-native XML and pseudo-XML writers.é)ÚAny)ÚWriter)ÚBuildercs:eZdZeddœ‡fdd„Zeeddœ‡fdd„Z‡ZS)Ú	XMLWriterN)ÚbuilderÚreturncs"tƒjƒ|ˆ_‡fdd„ˆ_dS)Ncsˆjj|ƒS)N)rZcreate_translator)Údocument)Úself©ú4/tmp/pip-build-gk9425m9/sphinx/sphinx/writers/xml.pyÚ<lambda>sz$XMLWriter.__init__.<locals>.<lambda>)ÚsuperÚ__init__rZtranslator_class)r	r)Ú	__class__)r	rrs
zXMLWriter.__init__)ÚargsÚkwargsrcs:|jjjj|jj_|jj_d|jj_d|jj_	t
ƒjƒS)NT)rÚenvÚconfigZ
xml_prettyrÚsettingsÚnewlinesÚindentsÚxml_declarationZdoctype_declarationr
Ú	translate)r	rr)rr
rrs

zXMLWriter.translate)Ú__name__Ú
__module__Ú__qualname__rrrrÚ
__classcell__r
r
)rrr
srcsReZdZdZdZdZdZeddœ‡fdd	„Zdd
œdd„Z	e
ed
œdd„Z‡Z
S)ÚPseudoXMLWriterÚpprintÚpformatÚ	pseudoxmlzpseudoxml writerÚwritersN)rrcstƒjƒ||_dS)N)r
rr)r	r)rr
rr&s
zPseudoXMLWriter.__init__)rcCs|jjƒ|_dS)N)rrÚoutput)r	r
r
rr*szPseudoXMLWriter.translate)ÚformatrcCsdS)z2This writer supports all format-specific elements.Tr
)r	r#r
r
rÚsupports-szPseudoXMLWriter.supports)rrr )r!)rrrÚ	supportedZconfig_sectionZconfig_section_dependenciesr"rrrÚstrÚboolr$rr
r
)rrrsrN)
Ú__doc__ÚtypingrZdocutils.writers.docutils_xmlrZ
BaseXMLWriterZsphinx.buildersrrrr
r
r
rÚ<module>s