cvs: phpdoc /xsl param_html.xsl.in phpweb.xsl
| From: | Gabor Hojtsy | Date: | Mon, 21 Apr 2003 19:33:48 +0000 |
| Subject: | cvs: phpdoc /xsl param_html.xsl.in phpweb.xsl | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969352763@lists.php.net to get a copy of this message | ||
goba Mon Apr 21 15:33:48 2003 EDT
Modified files:
/phpdoc/xsl param_html.xsl.in phpweb.xsl
Log:
- Minimalizing parameterized template fragment in
param_html.xsl.in
- Putting all PHP content into PIs, so the code looks
better, and disable-output-escaping finally works
- Adding some whitespace to the output, so it looks better
- Reducing the header and footer function calls to not
use parameters, but adding those values to the nav array,
so it can be queried from there in the phpweb code
[also adjusted the phpweb code for this]
Index: phpdoc/xsl/param_html.xsl.in
diff -u phpdoc/xsl/param_html.xsl.in:1.2 phpdoc/xsl/param_html.xsl.in:1.3
--- phpdoc/xsl/param_html.xsl.in:1.2 Mon Apr 21 08:50:55 2003
+++ phpdoc/xsl/param_html.xsl.in Mon Apr 21 15:33:48 2003
@@ -3,7 +3,7 @@
param_html.xsl: Parameters generated by the configure-script
- $Id: param_html.xsl.in,v 1.2 2003/04/21 12:50:55 goba Exp $
+ $Id: param_html.xsl.in,v 1.3 2003/04/21 19:33:48 goba Exp $
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -16,16 +16,10 @@
(was: default.encoding ) -->
<xsl:param name="chunker.output.encoding"
select="'@ENCODING@'"/>
-<!-- Configure parameterized header of the PHP
+<!-- Configure parameterized header of the PHP
output of the phpweb stylesheet -->
<xsl:template name="phpweb.header">
-
- <xsl:text disable-output-escaping="yes"><?php
- require('shared-manual.inc');
- sendManualHeaders('@ENCODING@','@LANG@');
- setupNavigation(array(
- 'home' => </xsl:text>
-
+ <xsl:text>sendManualHeaders('@ENCODING@','@LANG@');</xsl:text>
</xsl:template>
</xsl:stylesheet>
Index: phpdoc/xsl/phpweb.xsl
diff -u phpdoc/xsl/phpweb.xsl:1.4 phpdoc/xsl/phpweb.xsl:1.5
--- phpdoc/xsl/phpweb.xsl:1.4 Mon Apr 21 08:52:28 2003
+++ phpdoc/xsl/phpweb.xsl Mon Apr 21 15:33:48 2003
@@ -3,7 +3,7 @@
PHP.net web site specific stylesheet
- $Id: phpweb.xsl,v 1.4 2003/04/21 12:52:28 goba Exp $
+ $Id: phpweb.xsl,v 1.5 2003/04/21 19:33:48 goba Exp $
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -22,9 +22,7 @@
<xsl:param name="chunk.quietly">1</xsl:param>
<!-- Special PHP code navigation for generated pages
- Note: I have used xsl:text instead of
- xsl:processing-instrunction, because the later
- added > to end the PI, instead of ?> with saxon
+ There are some xsl:text parts added for formatting!
-->
<xsl:template name="header.navigation">
<xsl:param name="prev" select="/foo"/>
@@ -32,12 +30,26 @@
<xsl:variable name="home" select="/*[1]"/>
<xsl:variable name="up" select="parent::*"/>
- <xsl:call-template name="phpweb.header"/>
+ <xsl:processing-instruction name="php">
+ <xsl:text>
+ require('shared-manual.inc');
+ </xsl:text>
+ <xsl:call-template name="phpweb.header"/>
+ <xsl:text disable-output-escaping="yes">
+ setupNavigation(array(
+ 'home' => </xsl:text>
+ <xsl:call-template name="phpdoc.nav.array">
+ <xsl:with-param name="node" select="$home"/>
+ </xsl:call-template>
+
+ <xsl:text disable-output-escaping="yes">,
+ 'this' => </xsl:text>
+
<xsl:call-template name="phpdoc.nav.array">
- <xsl:with-param name="node" select="$home"/>
+ <xsl:with-param name="node" select="."/>
</xsl:call-template>
-
+
<xsl:text disable-output-escaping="yes">,
'prev' => </xsl:text>
@@ -53,14 +65,14 @@
</xsl:call-template>
<xsl:text disable-output-escaping="yes">,
- 'up' => </xsl:text>
+ 'up' => </xsl:text>
<xsl:call-template name="phpdoc.nav.array">
<xsl:with-param name="node" select="$up"/>
</xsl:call-template>
<xsl:text disable-output-escaping="yes">,
- 'toc' => array(</xsl:text>
+ 'toc' => array(</xsl:text>
<xsl:for-each select="../*">
<xsl:variable name="ischunk"><xsl:call-template
name="chunk"/></xsl:variable>
@@ -77,36 +89,20 @@
<xsl:text>
)
));
- manualHeader('</xsl:text>
- <xsl:apply-templates select="." mode="phpdoc.object.title"/>
- <xsl:text>','</xsl:text>
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="."/>
- </xsl:call-template>
- <xsl:text>');</xsl:text>
-<xsl:text disable-output-escaping="yes">
-?>
+ manualHeader();
+?</xsl:text>
+ </xsl:processing-instruction>
+ <xsl:text>
</xsl:text>
-
</xsl:template>
+<!-- Similar to the manualHeader() call above -->
<xsl:template name="footer.navigation">
-
-<!-- Same as the manualHeader() call above -->
-<xsl:text disable-output-escaping="yes">
-<?php
-</xsl:text>
- <xsl:text>manualFooter('</xsl:text>
- <xsl:apply-templates select="." mode="phpdoc.object.title"/>
- <xsl:text>','</xsl:text>
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="."/>
- </xsl:call-template>
- <xsl:text>');</xsl:text>
-<xsl:text disable-output-escaping="yes">
-?>
+ <xsl:text>
</xsl:text>
-
+ <xsl:processing-instruction name="php">
+ <xsl:text>manualFooter(); ?</xsl:text>
+ </xsl:processing-instruction>
</xsl:template>
<!-- Eliminate HTML from chunked file contents -->