blob: 217a76a99da3917f4c9f1b34c907f070f43466be [file] [log] [blame]
<?php require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); $App = new App(); $Nav = new Nav(); $Menu = new Menu(); # All on the same line to unclutter the user's desktop'
#*****************************************************************************
#
# template.php
#
# Author: Denis Roy
# Date: 2005-06-16
#
# Description: Type your page comments here - these are not sent to the browser
#
#
#****************************************************************************
#
# Begin: page-specific settings. Change these.
$pageTitle = "WTP Incubator Downloads";
$pageKeywords = "Eclipse WTP webtools XSL XML IDE";
$pageAuthor = "David Williams";
# Add page-specific Nav bars here
# Format is Link text, link URL (can be http://www.someothersite.com/), target (_self, _blank), level (1, 2 or 3)
# $Nav->addNavSeparator("My Page Links", "downloads.php");
# $Nav->addCustomNav("My Link", "mypage.php", "_self", 3);
# $Nav->addCustomNav("Google", "http://www.google.com/", "_blank", 3);
# End: page-specific settings
#
ob_start();
include "downloadindex.php";
$xmlString = ob_get_clean();
$xml = new DOMDocument();
$xml->loadXML($xmlString);
//echo $xml->saveHTML();
//Set the page title
$xpath = new DOMXPath($xml);
$titleNode = $xpath->query("/html/head/title")->item(0);
// echo "<br />titleNodeValue: " . $titleNode->nodeValue;
$pageTitle = ($titleNode != null) ? $titleNode->childNodes->item(0)->nodeValue : "eclipse.org webtools page";
// Load the XSL source
$xsl = DOMDocument::load('../commonPages/wtpphoenix.xsl');
// Configure the transformer
$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl); // attach the xsl rules
// work on just the body of the original (not head, etc.)
$xmlbody=$xml->getElementsByTagName('body')->item(0);
$maincontent = $proc->transformToXML($xmlbody);
$html = <<<EOHTML
<div id="maincontent">
<div id="midcolumn">
<p>
$maincontent
</p>
</div>
</div>
EOHTML;
# Generate the web page
$App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html);
?>