protected function text_content($content) {
        if (!is_null($this->contenttransformer)) { // Apply content transformation
            $content = $this->contenttransformer->process($content);
        }
        return is_null($content) ? null : $this->xml_safe_text_content($content); // Safe UTF-8 and encode
    }