cvs: pearweb /include pear-rest.php
| From: | Greg Beaver | Date: | Wed, 13 Dec 2006 00:10:33 +0000 |
| Subject: | cvs: pearweb /include pear-rest.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-5263@lists.php.net to get a copy of this message | ||
cellog Wed Dec 13 00:10:33 2006 UTC
Modified files:
/pearweb/include pear-rest.php
Log:
fix xmlns problems in REST - now view-source will work
http://cvs.php.net/viewvc.cgi/pearweb/include/pear-rest.php?r1=1.28&r2=1.29&diff_format=u
Index: pearweb/include/pear-rest.php
diff -u pearweb/include/pear-rest.php:1.28 pearweb/include/pear-rest.php:1.29
--- pearweb/include/pear-rest.php:1.28 Mon Oct 30 04:43:22 2006
+++ pearweb/include/pear-rest.php Wed Dec 13 00:10:32 2006
@@ -21,6 +21,8 @@
$categories = category::listAll();
$info = '<?xml version="1.0" encoding="UTF-8" ?>
<a xmlns="http://pear.php.net/dtd/rest.allcategories"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
xsi:schemaLocation="http://pear.php.net/dtd/rest.allcategories
http://pear.php.net/dtd/rest.allcategories.xsd">
<ch>' . PEAR_CHANNELNAME . '</ch>
@@ -58,6 +60,8 @@
$category['description'] = htmlspecialchars($category['description']);
$info = '<?xml version="1.0" encoding="UTF-8" ?>
<c xmlns="http://pear.php.net/dtd/rest.category"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
xsi:schemaLocation="http://pear.php.net/dtd/rest.category
http://pear.php.net/dtd/rest.category.xsd">
<n>' . htmlspecialchars($category['name']) . '</n>
@@ -74,6 +78,8 @@
DIRECTORY_SEPARATOR . 'info.xml', 0666);
$list = '<?xml version="1.0" encoding="UTF-8" ?>
<l xmlns="http://pear.php.net/dtd/rest.categorypackages"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
xsi:schemaLocation="http://pear.php.net/dtd/rest.categorypackages
http://pear.php.net/dtd/rest.categorypackages.xsd">
';
@@ -107,6 +113,8 @@
$packages = category::listPackages($category);
$fullpackageinfo = '<?xml version="1.0" encoding="UTF-8" ?>
<f xmlns="http://pear.php.net/dtd/rest.categorypackageinfo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
xsi:schemaLocation="http://pear.php.net/dtd/rest.categorypackageinfo
http://pear.php.net/dtd/rest.categorypackageinfo.xsd">
';
@@ -181,6 +189,8 @@
$info = '<?xml version="1.0" encoding="UTF-8" ?>
<a xmlns="http://pear.php.net/dtd/rest.allpackages"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
xsi:schemaLocation="http://pear.php.net/dtd/rest.allpackages
http://pear.php.net/dtd/rest.allpackages.xsd">
<c>' . PEAR_CHANNELNAME . '</c>
@@ -199,6 +209,8 @@
{
return "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"
.
"<p xmlns=\"http://pear.php.net/dtd/rest.package\""
.
+' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xlink="http://www.w3.org/1999/xlink"' .
" xsi:schemaLocation=\"http://pear.php.net/dtd/rest.package" .
' http://pear.php.net/dtd/rest.package.xsd">';
}
@@ -280,6 +292,7 @@
{
return '<?xml version="1.0" encoding="UTF-8" ?>' .
"\n" .
'<a xmlns="http://pear.php.net/dtd/rest.allreleases"'
. "\n" .
+' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xlink="http://www.w3.org/1999/xlink" ' .
' xsi:schemaLocation="http://pear.php.net/dtd/rest.allreleases'
. "\n" .
' http://pear.php.net/dtd/rest.allreleases.xsd">'
. "\n" .
' <p>' . $package . '</p>' . "\n" .
@@ -431,6 +444,8 @@
array($id));
$info = '<?xml version="1.0" encoding="UTF-8" ?>
<r xmlns="http://pear.php.net/dtd/rest.release"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
xsi:schemaLocation="http://pear.php.net/dtd/rest.release
http://pear.php.net/dtd/rest.release.xsd">
<p xlink:href="' . $extra . 'p/' . strtolower($package) .
'">' . $package . '</p>
@@ -497,6 +512,8 @@
}
$info = '<?xml version="1.0" encoding="UTF-8" ?>
<m xmlns="http://pear.php.net/dtd/rest.packagemaintainers"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
xsi:schemaLocation="http://pear.php.net/dtd/rest.packagemaintainers
http://pear.php.net/dtd/rest.packagemaintainers.xsd">
<p>' . $package . '</p>
@@ -543,6 +560,8 @@
$maintainer['name'] = htmlspecialchars($maintainer['name']);
$info = '<?xml version="1.0" encoding="UTF-8" ?>
<m xmlns="http://pear.php.net/dtd/rest.maintainer"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
xsi:schemaLocation="http://pear.php.net/dtd/rest.maintainer
http://pear.php.net/dtd/rest.maintainer.xsd">
<h>' . $maintainer['handle'] . '</h>
@@ -562,6 +581,8 @@
$maintainers = user::listAll();
$info = '<?xml version="1.0" encoding="UTF-8" ?>
<m xmlns="http://pear.php.net/dtd/rest.allmaintainers"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
xsi:schemaLocation="http://pear.php.net/dtd/rest.allmaintainers
http://pear.php.net/dtd/rest.allmaintainers.xsd">'
. "\n";
// package information