added color syntax high-light to docs; removed unsupported language refs in programlistings

This commit is contained in:
Thomas Risberg
2011-04-18 14:57:57 -04:00
parent 640573b2c2
commit 9675534ddf
10 changed files with 106 additions and 7 deletions

View File

@@ -174,6 +174,9 @@
<configuration>
<keepRelativeImageUris>true</keepRelativeImageUris>
<htmlCustomization>${basedir}/src/docbkx/resources/xsl/html.xsl</htmlCustomization>
<useExtensions>1</useExtensions>
<highlightSource>1</highlightSource>
<highlightDefaultLanguage></highlightDefaultLanguage>
<postProcess>
<move tofile="${basedir}/target/site/reference/html/index.html"
file="${basedir}/target/docbkx/html/index.html"/>
@@ -207,6 +210,9 @@
<configuration>
<imgSrcPath>${basedir}/src/docbkx/</imgSrcPath>
<admonGraphicsPath>${basedir}/src/docbkx/resources/images/</admonGraphicsPath>
<useExtensions>1</useExtensions>
<highlightSource>1</highlightSource>
<highlightDefaultLanguage></highlightDefaultLanguage>
<postProcess>
<copy file="${basedir}/target/docbkx/pdf/index.pdf"
tofile="${basedir}/target/site/reference/pdf/spring-data-graph-reference.pdf"
@@ -224,6 +230,9 @@
<keepRelativeImageUris>true</keepRelativeImageUris>
<chunkedOutput>true</chunkedOutput>
<htmlCustomization>${basedir}/src/docbkx/resources/xsl/html_chunk.xsl</htmlCustomization>
<useExtensions>1</useExtensions>
<highlightSource>1</highlightSource>
<highlightDefaultLanguage></highlightDefaultLanguage>
<targetDirectory>${basedir}/target/docbkx/multi/</targetDirectory>
<postProcess>
<move todir="${basedir}/target/site/reference/multi">

View File

@@ -91,7 +91,7 @@ movie.setTopActor(actor);
previously persisted to the graph:
<example>
<title>Cascade for modified fields</title>
<programlisting><![CDATA[actor.setName("Billy Bob");
<programlisting language="java"><![CDATA[actor.setName("Billy Bob");
movie.persist();
]]></programlisting>
</example>

View File

@@ -14,6 +14,7 @@
<xsl:import href="urn:docbkx:stylesheet"/>
<xsl:import href="highlight-fo.xsl"/>
<!--###################################################
Custom Title Page

View File

@@ -0,0 +1,44 @@
<?xml version='1.0'?>
<!--
Simple highlighter for FO/PDF output. Follows the Eclipse color scheme.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:xslthl="http://xslthl.sf.net"
exclude-result-prefixes="xslthl"
version='1.0'>
<xsl:template match='xslthl:keyword'>
<fo:inline font-weight="bold" color="#7F0055"><xsl:apply-templates/></fo:inline>
</xsl:template>
<xsl:template match='xslthl:comment'>
<fo:inline font-style="italic" color="#3F5F5F"><xsl:apply-templates/></fo:inline>
</xsl:template>
<xsl:template match='xslthl:oneline-comment'>
<fo:inline font-style="italic" color="#3F5F5F"><xsl:apply-templates/></fo:inline>
</xsl:template>
<xsl:template match='xslthl:multiline-comment'>
<fo:inline font-style="italic" color="#3F5FBF"><xsl:apply-templates/></fo:inline>
</xsl:template>
<xsl:template match='xslthl:tag'>
<fo:inline color="#3F7F7F"><xsl:apply-templates/></fo:inline>
</xsl:template>
<xsl:template match='xslthl:attribute'>
<fo:inline color="#7F007F"><xsl:apply-templates/></fo:inline>
</xsl:template>
<xsl:template match='xslthl:value'>
<fo:inline color="#2A00FF"><xsl:apply-templates/></fo:inline>
</xsl:template>
<xsl:template match='xslthl:string'>
<fo:inline color="#2A00FF"><xsl:apply-templates/></fo:inline>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,42 @@
<?xml version='1.0'?>
<!--
Simple highlighter for HTML output. Follows the Eclipse color scheme.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xslthl="http://xslthl.sf.net"
exclude-result-prefixes="xslthl"
version='1.0'>
<xsl:template match='xslthl:keyword'>
<span class="hl-keyword"><xsl:value-of select='.'/></span>
</xsl:template>
<xsl:template match='xslthl:comment'>
<span class="hl-comment"><xsl:value-of select='.'/></span>
</xsl:template>
<xsl:template match='xslthl:oneline-comment'>
<span class="hl-comment"><xsl:value-of select='.'/></span>
</xsl:template>
<xsl:template match='xslthl:multiline-comment'>
<span class="hl-multiline-comment"><xsl:value-of select='.'/></span>
</xsl:template>
<xsl:template match='xslthl:tag'>
<span class="hl-tag"><xsl:value-of select='.'/></span>
</xsl:template>
<xsl:template match='xslthl:attribute'>
<span class="hl-attribute"><xsl:value-of select='.'/></span>
</xsl:template>
<xsl:template match='xslthl:value'>
<span class="hl-value"><xsl:value-of select='.'/></span>
</xsl:template>
<xsl:template match='xslthl:string'>
<span class="hl-string"><xsl:value-of select='.'/></span>
</xsl:template>
</xsl:stylesheet>

View File

@@ -8,6 +8,7 @@
version="1.0">
<xsl:import href="urn:docbkx:stylesheet"/>
<xsl:import href="highlight.xsl"/>
<!--###################################################
HTML Settings

View File

@@ -7,6 +7,8 @@
version="1.0">
<xsl:import href="urn:docbkx:stylesheet"/>
<xsl:import href="highlight.xsl"/>
<!--###################################################
HTML Settings
################################################### -->

View File

@@ -12,7 +12,7 @@
<para>
<example>
<title>JSON movie response</title>
<programlisting language="javascript" ><![CDATA[[{"popularity":3,
<programlisting language="java" ><![CDATA[[{"popularity":3,
"translated":true, "adult":false, "language":"en",
"original_name":"[Rec]", "name":"[Rec]", "alternative_name":"[REC]",
"movie_type":"movie",
@@ -59,7 +59,7 @@
</example>
<example>
<title>JSON actor response</title>
<programlisting language="javascript" ><![CDATA[[{"popularity":3,
<programlisting language="java" ><![CDATA[[{"popularity":3,
"name":"Glenn Strange", "known_as":[{"name":"George Glenn Strange"}, {"name":"Glen Strange"},
{"name":"Glen 'Peewee' Strange"}, {"name":"Peewee Strange"}, {"name":"'Peewee' Strange"}],
"id":30112,

View File

@@ -53,7 +53,7 @@ public class MovieController {
</example>
<example>
<title>Populating the database - JSP</title>
<programlisting language="jsp"><![CDATA[<%@ page session="false" %>
<programlisting language="xml"><![CDATA[<%@ page session="false" %>
<%@ taglib uri="http://www.springframework.org/tags" prefix="s" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
@@ -117,7 +117,7 @@ public class MovieController {
<para>
<example>
<title>Starting the Neo4j Shell</title>
<programlisting language="shell" ><![CDATA[neo4j-shell -readonly -path data/graph.db
<programlisting><![CDATA[neo4j-shell -readonly -path data/graph.db
]]></programlisting>
</example>
</para>
@@ -129,7 +129,7 @@ public class MovieController {
<para>
<example>
<title>Neo4j Shell usage</title>
<programlisting language="shell" ><![CDATA[neo4j-sh[readonly] (0)$ help
<programlisting><![CDATA[neo4j-sh[readonly] (0)$ help
Available commands: index dbinfo ls rm alias set eval mv gsh env rmrel mkrel
trav help pwd paths ... man cd
Use man <command> for info about each command.

View File

@@ -90,7 +90,7 @@ public String findMovies(Model model, @RequestParam("q") String query) {
<para>
<example>
<title>Search Results JSP</title>
<programlisting language="jsp" ><![CDATA[<h2>Movies</h2>
<programlisting language="xml" ><![CDATA[<h2>Movies</h2>
<c:choose>
<c:when test="${not empty movies}">