Beispiel #1
0
 def clean(self, value):
     schema_path = get_absolute_schema_path(self.schema_path)
     xml_validator = RelaxNGValidator(schema_path, self.additional_root_element)
     
     # TODO: This shouldn't be hard-coded to `content`
     value = u"<content>%s</content>" % html_to_unicode(value)
     return xml_validator.forms_validate(value)
Beispiel #2
0
 def get_absolute_schema_path(self):
     return get_absolute_schema_path(self.schema_path)