bjori Sun Feb 4 01:05:29 2007 UTC
Modified files:
/phpdoc/scripts html_syntax.php
/phpdoc/phpbook/phpbook-xsl html-common.xsl
Log:
Remove the oldschool table look on examples
Enable the XML highlighting
http://cvs.php.net/viewvc.cgi/phpdoc/scripts/html_syntax.php?r1=1.12&r2=1.13&diff_format=u
Index: phpdoc/scripts/html_syntax.php
diff -u phpdoc/scripts/html_syntax.php:1.12 phpdoc/scripts/html_syntax.php:1.13
--- phpdoc/scripts/html_syntax.php:1.12 Sat Feb 3 22:57:46 2007
+++ phpdoc/scripts/html_syntax.php Sun Feb 4 01:05:28 2007
@@ -1,6 +1,6 @@
#!/usr/bin/php -q
<?php
-/*
+/* vim: noet
+----------------------------------------------------------------------+
| PHP Version 4 |
+----------------------------------------------------------------------+
@@ -91,7 +91,8 @@
//~ echo "$filename\n";
$original = file_get_contents($filename);
$highlighted =
preg_replace_callback("!<PRE\r?\nCLASS=\"php\"\r?\n>(.*)</PRE\r?\n>!sU",
"callback_highlight_php", $original);
- $highlighted =
preg_replace_callback("@<HIGHLIGHTME>(.*)</HIGHLIGHTME>@sU",
"callback_highlight_php", $highlighted); /* XSL build */
+ $highlighted =
preg_replace_callback("@<HIGHLIGHTPHPCODE>(.*)</HIGHLIGHTPHPCODE>@sU",
"callback_highlight_php", $highlighted); /* Used in the XSL build for PHP code
*/
+ $highlighted =
preg_replace_callback("@<HIGHLIGHTXMLCODE>(.*)</HIGHLIGHTXMLCODE>@sU",
"callback_highlight_xml", $highlighted); /* Used in the XSL build for XML code
*/
if ($original != $highlighted) {
// file_put_contents is only in PHP >= 5
$fp = fopen($filename, "wb");
http://cvs.php.net/viewvc.cgi/phpdoc/phpbook/phpbook-xsl/html-common.xsl?r1=1.6&r2=1.7&diff_format=u
Index: phpdoc/phpbook/phpbook-xsl/html-common.xsl
diff -u phpdoc/phpbook/phpbook-xsl/html-common.xsl:1.6
phpdoc/phpbook/phpbook-xsl/html-common.xsl:1.7
--- phpdoc/phpbook/phpbook-xsl/html-common.xsl:1.6 Thu Feb 1 14:51:15 2007
+++ phpdoc/phpbook/phpbook-xsl/html-common.xsl Sun Feb 4 01:05:29 2007
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- vim600: ts=2
+<!-- vim600: ts=2 sw=2
html-common.xsl: Common HTML customizations
- $Id: html-common.xsl,v 1.6 2007/02/01 14:51:15 bjori Exp $
+ $Id: html-common.xsl,v 1.7 2007/02/04 01:05:29 bjori Exp $
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -619,27 +619,29 @@
</h2>
</xsl:template>
- <xsl:template match="programlisting|screen|synopsis">
- <xsl:param name="suppress-numbers" select="'0'"/>
- <table xsl:use-attribute-sets="shade.verbatim.style">
- <tr>
- <td>
- <xsl:choose>
- <xsl:when test="./@role = 'php'">
- <xsl:element name="HIGHLIGHTME">
- <xsl:value-of select="." disable-output-escaping="yes"
/>
- </xsl:element>
- </xsl:when>
- <xsl:otherwise>
- <xsl:element name="pre">
- <xsl:attribute name="class"><xsl:value-of
select="./@role" /></xsl:attribute>
- <xsl:value-of select="." disable-output-escaping="no" />
- </xsl:element>
- </xsl:otherwise>
- </xsl:choose>
- </td>
- </tr>
- </table>
+<xsl:template match="programlisting|screen|synopsis">
+ <xsl:param name="suppress-numbers" select="'0'"/>
+ <xsl:choose>
+ <xsl:when test="./@role = 'php'">
+ <xsl:element name="HIGHLIGHTPHPCODE">
+ <xsl:value-of select="." disable-output-escaping="yes" />
+ </xsl:element>
+ </xsl:when>
+ <xsl:when test="./@role = 'xml'">
+ <xsl:element name="HIGHLIGHTXMLCODE">
+ <xsl:value-of select="." disable-output-escaping="yes" />
+ </xsl:element>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- FIXME: Get rid of this table -->
+ <table xsl:use-attribute-sets="shade.verbatim.style"><tr><td>
+ <xsl:element name="pre">
+ <xsl:attribute name="class"><xsl:value-of select="./@role"
/></xsl:attribute>
+ <xsl:value-of select="." disable-output-escaping="no" />
+ </xsl:element>
+ </td></tr></table>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<xsl:template match="modifier">