#NEWLINE# def test_extension_element_process_children_to_read_only_raise( self ) : #NEWLINE# #INDENT# tree = self . parse ( '<a/>' ) #NEWLINE# style = self . parse ( '<xsl:stylesheet version="1.0"\n    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\n    xmlns:myns="testns"\n    extension-element-prefixes="myns">\n  <xsl:template match="a">\n    <myns:myext>\n      <A/>\n    </myns:myext>\n  </xsl:template>\n</xsl:stylesheet>' ) #NEWLINE# class MyExt ( etree . XSLTExtension ) : #NEWLINE# #INDENT# def execute( self , context , self_node , input_node , output_parent ) : #NEWLINE# #INDENT# self . process_children ( context , self_node ) #NEWLINE# #UNINDENT# #UNINDENT# extensions = { #NEWLINE# #INDENT# ( 'testns' , 'myext' ) : MyExt ( ) , #NEWLINE# #UNINDENT# } #NEWLINE# self . assertRaises ( TypeError , tree . xslt , style , extensions = extensions )