17 require_once SQ_CORE_PACKAGE_PATH.
'/files/file/file.inc';
36 public $allowed_extensions = Array(
'xml');
47 parent::__construct($assetid);
60 require_once SQ_FUDGE_PATH.
'/general/file_system.inc';
61 $parse_file = $this->data_path.
'/'.$this->name;
62 $content = file_to_string($parse_file);
64 return trim($content);
79 SQ_LINK_TYPE_1 => Array(),
80 SQ_LINK_TYPE_2 => Array(),
81 SQ_LINK_TYPE_3 => Array(),
82 SQ_LINK_NOTICE => Array(
101 public function printFrontend()
104 $current = $GLOBALS[
'SQ_SYSTEM']->am->getLink($this->
id, SQ_LINK_NOTICE,
'xsl_file', TRUE,
'transform');
105 $current_id = array_get_index($current,
'minorid', 0);
106 if (!empty($current_id)) {
107 $xsl_file = $GLOBALS[
'SQ_SYSTEM']->am->getAsset($current_id);
110 if (!is_null($xsl_file) && class_exists(
'XSLTProcessor')) {
113 parent::printFrontend();
129 $current = $GLOBALS[
'SQ_SYSTEM']->am->getLink($this->
id, SQ_LINK_NOTICE,
'xsl_file', TRUE,
'transform');
130 $current_id = array_get_index($current,
'minorid', 0);
131 if (!empty($current_id)) {
132 $xsl_file = $GLOBALS[
'SQ_SYSTEM']->am->getAsset($current_id);
135 if (!is_null($xsl_file)) {
137 $xml =
new DOMDocument();
139 $xsl =
new DOMDocument();
140 $xsl->loadXML($xsl_file->getContent());
142 $parser =
new XSLTProcessor();
143 $parser->importStylesheet($xsl);
145 $content = $parser->transformToXML($xml);