Для создания rss-файла используется следующий код Feed Class from Kohana 3.0.Валидатор W3C с предупреждением: DOCTYPE не найден! для Kohana 3 Feed Class
class Controller_Feed extends Controller {
public function action_best()
{
$info = array(
"title" => "HYIP Monitor,
"pubDate" => date("D, d M Y H:i:s T"),
"description" => "Provides the best style of HYIP Rating.",
"link" => "http://tophyips.info/",
"copyright" => "TOPHYIPS.INFO",
"language" => "en-us",
"ttl" => "5",
);
$items = array();
$items[1] = array(
"title" => "Best Rated Hyips Style-1",
"link" => "http://tophyips.info/monitor/hyip-rating/style-1/best-1",
"description" => "Best Monitoring Site Style#1",
"guid" => "http://tophyips.info/monitor/hyip-rating/style-1/best-1",
);
$this->response->headers('Content-Type', 'text/xml; charset=utf-8');
$this->response->body(Feed::create($info, $items));
}
}//End File
В подтверждение достоверности W3C, как вы можете проверить по этой ссылке: http://validator.w3.org/ дал результат о том, что документ был успешно проверен, как хорошо сформированный XML! но со следующим предупреждением:
No DOCTYPE found! Checking XML syntax only.
The DOCTYPE Declaration was not recognized or is missing. This probably means that the Formal Public Identifier contains a spelling error, or that the Declaration is not using correct syntax, or that your XML document is not using a DOCTYPE Declaration.
Пожалуйста, сообщите, как решить это предупреждение. Какую декларацию DOCTYPE я буду использовать и куда поместить код в файл класса Kohana_Feed. Благодарю.
Я переключил проверку на ссылку. Ты прав. Он не генерирует отсутствующий DOCTYPE. Большое спасибо. – hyip