[richfaces-svn-commits] JBoss Rich Faces SVN: r2503 - trunk/docs/xslt/en/src/main/xslt.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Mon Aug 27 07:16:39 EDT 2007
Author: smukhina
Date: 2007-08-27 07:16:39 -0400 (Mon, 27 Aug 2007)
New Revision: 2503
Added:
trunk/docs/xslt/en/src/main/xslt/code-highlight.xsl
Modified:
trunk/docs/xslt/en/src/main/xslt/html.xsl
trunk/docs/xslt/en/src/main/xslt/html_chunk.xsl
Log:
files for code highlighting
Added: trunk/docs/xslt/en/src/main/xslt/code-highlight.xsl
===================================================================
--- trunk/docs/xslt/en/src/main/xslt/code-highlight.xsl (rev 0)
+++ trunk/docs/xslt/en/src/main/xslt/code-highlight.xsl 2007-08-27 11:16:39 UTC (rev 2503)
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+
+<!--
+
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+ xmlns="http://www.w3.org/TR/xhtml1/transitional"
+ exclude-result-prefixes="#default"
+ >
+
+ <xsl:template match="programlisting[@role='XML']|programlisting[@role='JAVA']|programlisting[@role='XHTML']|programlisting[@role='JSP']">
+
+ <xsl:variable name="role">
+ <xsl:value-of select="s:toUpperCase(string(@role))" xmlns:s="java:java.lang.String"/>
+ </xsl:variable>
+ <xsl:variable name="child.content">
+ <xsl:apply-templates/>
+ </xsl:variable>
+
+ <xsl:variable name="hiliter" select="jhl:getRenderer(string($role))" xmlns:jhl="java:com.uwyn.jhighlight.renderer.XhtmlRendererFactory"/>
+ <pre class="{$role}">
+ <xsl:choose>
+ <xsl:when test="$hiliter">
+ <xsl:value-of select="jhr:highlight($hiliter, $role, string($child.content), 'UTF-8', true())"
+ xmlns:jhr="com.uwyn.jhighlight.renderer.Renderer" disable-output-escaping="yes"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$child.content"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </pre>
+
+ </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
Modified: trunk/docs/xslt/en/src/main/xslt/html.xsl
===================================================================
--- trunk/docs/xslt/en/src/main/xslt/html.xsl 2007-08-27 10:24:27 UTC (rev 2502)
+++ trunk/docs/xslt/en/src/main/xslt/html.xsl 2007-08-27 11:16:39 UTC (rev 2503)
@@ -25,7 +25,7 @@
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/>
<xsl:include href="./collapsing-navigation.xsl"></xsl:include>
-<!--xsl:include href="./code-highlight.xsl"></xsl:include-->
+<xsl:include href="./code-highlight.xsl"></xsl:include>
<!--###################################################
HTML Settings
Modified: trunk/docs/xslt/en/src/main/xslt/html_chunk.xsl
===================================================================
--- trunk/docs/xslt/en/src/main/xslt/html_chunk.xsl 2007-08-27 10:24:27 UTC (rev 2502)
+++ trunk/docs/xslt/en/src/main/xslt/html_chunk.xsl 2007-08-27 11:16:39 UTC (rev 2503)
@@ -27,7 +27,7 @@
<xsl:include href="./collapsing-navigation.xsl"></xsl:include>
-<!--xsl:include href="./code-highlight.xsl"></xsl:include-->
+<xsl:include href="./code-highlight.xsl"></xsl:include>
<!--###################################################
More information about the richfaces-svn-commits
mailing list