<s> '''<STR_LIT>''' <EOL> import os <EOL> from FeatureServer . WebFeatureService . Transaction . TransactionAction import TransactionAction <EOL> from lxml import etree <EOL> import re <EOL> class Delete ( TransactionAction ) : <EOL> def __init__ ( self , node ) : <EOL> super ( Delete , self ) . __init__ ( node ) <EOL> self . type = '<STR_LIT>' <EOL> def createStatement ( self , datasource ) : <EOL> xslt = etree . parse ( os . path . dirname ( os . path . abspath ( __file__ ) ) + "<STR_LIT>" ) <EOL> transform = etree . XSLT ( xslt ) <EOL> result = transform ( self . node , <EOL> datasource = "<STR_LIT:'>" + datasource . type + "<STR_LIT:'>" , <EOL> transactionType = "<STR_LIT:'>" + self . type + "<STR_LIT:'>" , <EOL> tableName = "<STR_LIT:'>" + datasource . layer + "<STR_LIT:'>" , <EOL> tableId = "<STR_LIT:'>" + datasource . fid_col + "<STR_LIT:'>" ) <EOL> elements = result . xpath ( "<STR_LIT>" ) <EOL> if len ( elements ) > <NUM_LIT:0> : <EOL> pattern = re . compile ( r'<STR_LIT>' ) <EOL> self . setStatement ( re . sub ( pattern , '<STR_LIT:U+0020>' , str ( elements [ <NUM_LIT:0> ] ) ) ) <EOL> return <EOL> self . setStatement ( None ) </s>
