Beispiel #1
0
    def template(self):
        template = sx.Template(
            text=sx.Text(xpath_function=self.xpath_function),
            form=self.template_form,
            width=self.template_width,
        )
        if self.variables:
            for key, value in sorted(self.variables.items()):
                template.text.xpath.variables.node.append(
                    sx.XpathVariable(name=key, locale_id=value).node)

        return template
Beispiel #2
0
 def hidden_template(self):
     return sx.Template(
         text=sx.Text(xpath_function=self.sort_xpath_function),
         width=0,
     )