Completed SHL-1
Work in progress for SHL-2, SHL-3.
2
.gradle/1.0-milestone-3/taskArtifacts/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/cache.bin
|
||||
/cache.properties
|
||||
14
.springBeans
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beansProjectDescription>
|
||||
<version>1</version>
|
||||
<pluginVersion><![CDATA[2.8.1.201111220115-RELEASE]]></pluginVersion>
|
||||
<configSuffixes>
|
||||
<configSuffix><![CDATA[xml]]></configSuffix>
|
||||
</configSuffixes>
|
||||
<enableImports><![CDATA[false]]></enableImports>
|
||||
<configs>
|
||||
<config>src/main/resources/META-INF/spring/test.xml</config>
|
||||
</configs>
|
||||
<configSets>
|
||||
</configSets>
|
||||
</beansProjectDescription>
|
||||
210
build.gradle
Normal file
@@ -0,0 +1,210 @@
|
||||
// used for artifact names, building doc upload urls, etc.
|
||||
description = 'Spring Shell'
|
||||
abbreviation = 'SPSH'
|
||||
|
||||
apply plugin: 'base'
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
add(new org.apache.ivy.plugins.resolver.URLResolver()) {
|
||||
name = "GitHub"
|
||||
addIvyPattern 'http://cloud.github.com/downloads/costin/gradle-stuff/[organization].[module]-[artifact]-[revision].[ext]'
|
||||
addArtifactPattern 'http://cloud.github.com/downloads/costin/gradle-stuff/[organization].[module]-[revision].[ext]'
|
||||
}
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
mavenRepo name: "springsource-org-release", urls: "http://repository.springsource.com/maven/bundles/release"
|
||||
mavenRepo name: "springsource-org-external", urls: "http://repository.springsource.com/maven/bundles/external"
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'org.springframework:gradle-stuff:0.1-20110421'
|
||||
classpath 'net.sf.docbook:docbook-xsl:1.75.2:ns-resources@zip'
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
group = 'org.springframework.shell'
|
||||
version = "$springShellVersion"
|
||||
|
||||
releaseBuild = version.endsWith('RELEASE')
|
||||
snapshotBuild = version.endsWith('SNAPSHOT')
|
||||
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
// Public Spring artefacts
|
||||
mavenRepo name: "springsource-org-release", urls: "http://repository.springsource.com/maven/bundles/release"
|
||||
mavenRepo name: "spring-release", urls: "http://maven.springframework.org/release"
|
||||
mavenRepo name: "spring-milestone", urls: "http://maven.springframework.org/milestone"
|
||||
mavenRepo name: "spring-snapshot", urls: "http://maven.springframework.org/snapshot"
|
||||
mavenRepo name: "sonatype-snapshot", urls: "http://oss.sonatype.org/content/repositories/snapshots"
|
||||
mavenRepo name: "ext-snapshots", urls: "http://springframework.svn.sourceforge.net/svnroot/springframework/repos/repo-ext/"
|
||||
mavenRepo name: "data-nucleus", urls: "http://www.datanucleus.org/downloads/maven2/"
|
||||
mavenRepo name: "conjars.org", urls: "http://conjars.org/repo"
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: "java"
|
||||
apply plugin: "maven"
|
||||
apply plugin: 'eclipse' // `gradle eclipse` to generate .classpath/.project
|
||||
apply plugin: 'idea' // `gradle idea` to generate .ipr/.iml
|
||||
apply plugin: 'docbook'
|
||||
|
||||
|
||||
// Common dependencies
|
||||
dependencies {
|
||||
|
||||
// Logging
|
||||
runtime "log4j:log4j:$log4jVersion"
|
||||
|
||||
// Spring Framework
|
||||
compile "org.springframework:spring-core:$springVersion"
|
||||
compile "org.springframework:spring-context-support:$springVersion"
|
||||
compile "commons-io:commons-io:$commonsioVersion"
|
||||
compile "net.sourceforge.jline:jline:$jlineVersion"
|
||||
compile "org.fusesource.jansi:jansi:$jansiVersion"
|
||||
|
||||
// needed for use of @Configuration extension points.
|
||||
compile "cglib:cglib:$cglibVersion"
|
||||
|
||||
|
||||
// Testing
|
||||
testCompile "junit:junit:$junitVersion"
|
||||
testCompile "org.mockito:mockito-core:$mockitoVersion"
|
||||
testCompile "org.springframework:spring-test:$springVersion"
|
||||
testCompile("javax.annotation:jsr250-api:1.0") { optional = true }
|
||||
|
||||
}
|
||||
|
||||
javaprojects = rootProject
|
||||
|
||||
sourceCompatibility = 1.6
|
||||
targetCompatibility = 1.6
|
||||
|
||||
javadoc {
|
||||
srcDir = file("${projectDir}/docs/src/api")
|
||||
destinationDir = file("${buildDir}/api")
|
||||
tmpDir = file("${buildDir}/api-work")
|
||||
|
||||
configure(options) {
|
||||
stylesheetFile = file("${srcDir}/spring-javadoc.css")
|
||||
overview = "${srcDir}/overview.html"
|
||||
docFilesSubDirs = true
|
||||
outputLevel = org.gradle.external.javadoc.JavadocOutputLevel.QUIET
|
||||
breakIterator = true
|
||||
author = true
|
||||
showFromProtected()
|
||||
|
||||
// groups = [
|
||||
// 'Spring Data Hadoop' : ['org.springframework.data.hadoop*'],
|
||||
// ]
|
||||
|
||||
links = [
|
||||
"http://static.springframework.org/spring/docs/3.0.x/javadoc-api",
|
||||
"http://download.oracle.com/javase/6/docs/api",
|
||||
"http://logging.apache.org/log4j/docs/api/",
|
||||
]
|
||||
|
||||
exclude "org/springframework/data/hadoop/config/**"
|
||||
}
|
||||
|
||||
title = "${rootProject.description} ${version} API"
|
||||
|
||||
// collect all the sources that will be included in the javadoc output
|
||||
source javaprojects.collect {project ->
|
||||
project.sourceSets.main.allJava
|
||||
}
|
||||
|
||||
// collect all main classpaths to be able to resolve @see refs, etc.
|
||||
// this collection also determines the set of projects that this
|
||||
// task dependsOn, thus the runtimeClasspath is used to ensure all
|
||||
// projects are included, not just *dependencies* of all classes.
|
||||
// this is awkward and took me a while to figure out.
|
||||
classpath = files(javaprojects.collect {project ->
|
||||
project.sourceSets.main.runtimeClasspath
|
||||
})
|
||||
|
||||
// copy the images from the doc-files dir over to the target
|
||||
doLast { task ->
|
||||
copy {
|
||||
from file("${task.srcDir}/doc-files")
|
||||
into file("${task.destinationDir}/doc-files")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ideaProject {
|
||||
withXml { provider ->
|
||||
provider.node.component.find { it.@name == 'VcsDirectoryMappings' }.mapping.@vcs = 'Git'
|
||||
}
|
||||
}
|
||||
|
||||
task wrapper(type: Wrapper) {
|
||||
gradleVersion = '1.0-milestone-3'
|
||||
description = "Generate the Gradle wrapper"
|
||||
group = "Distribution"
|
||||
}
|
||||
|
||||
apply from: "$rootDir/maven.gradle"
|
||||
|
||||
// Distribution tasks
|
||||
task dist(type: Zip) {
|
||||
description = "Generate the ZIP Distribution"
|
||||
group = "Distribution"
|
||||
dependsOn assemble, subprojects*.tasks*.matching { task -> task.name == 'assemble' }
|
||||
|
||||
// evaluationDependsOn(':docs')
|
||||
|
||||
def zipRootDir = "${project.name}-$version"
|
||||
into(zipRootDir) {
|
||||
from('/docs/src/info') {
|
||||
include '*.txt'
|
||||
}
|
||||
from('/docs/build/') {
|
||||
into 'docs'
|
||||
include 'reference/**/*'
|
||||
}
|
||||
from('samples/') {
|
||||
into 'samples'
|
||||
exclude '**/build/**'
|
||||
exclude '**/bin/**'
|
||||
exclude '**/.settings/**'
|
||||
exclude '**/.gradle/**'
|
||||
exclude '**/.*'
|
||||
}
|
||||
from('build/') {
|
||||
into 'docs'
|
||||
include 'api/**/*'
|
||||
}
|
||||
into('dist') {
|
||||
from javaprojects.collect {project -> project.libsDir }
|
||||
}
|
||||
}
|
||||
doLast {
|
||||
ant.checksum(file: archivePath, algorithm: 'SHA1', fileext: '.sha1')
|
||||
}
|
||||
}
|
||||
|
||||
task uploadDist(type: org.springframework.gradle.tasks.S3DistroUpload, dependsOn: dist) {
|
||||
description = "Upload the ZIP Distribution"
|
||||
group = "Distribution"
|
||||
archiveFile = dist.archivePath
|
||||
projectKey = 'SHDP'
|
||||
projectName = 'Spring Data Hadoop'
|
||||
}
|
||||
|
||||
assemble.dependsOn = ['jar', 'sourceJar', 'javadocJar']
|
||||
|
||||
task run(type: JavaExec) {
|
||||
description = 'Runs the application'
|
||||
main = "org.springframework.shell.Bootstrap"
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
}
|
||||
|
||||
//defaultTasks 'run'
|
||||
|
||||
|
||||
defaultTasks 'build'
|
||||
102
docs/build.gradle
Normal file
@@ -0,0 +1,102 @@
|
||||
import org.apache.tools.ant.filters.ReplaceTokens
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Configuration for the docs subproject
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
apply plugin: 'base'
|
||||
apply plugin: 'docbook'
|
||||
|
||||
assemble.dependsOn = [rootProject.javadoc, 'reference']
|
||||
|
||||
[docbookHtml, docbookFoPdf, docbookHtmlSingle]*.group = 'Documentation'
|
||||
[docbookHtml, docbookFoPdf, docbookHtmlSingle]*.sourceFileName = 'index.xml'
|
||||
[docbookHtml, docbookFoPdf, docbookHtmlSingle]*.sourceDirectory = new File(projectDir, 'src/reference/docbook')
|
||||
|
||||
docbookHtml.stylesheet = new File(projectDir, 'src/reference/resources/xsl/html-custom.xsl')
|
||||
docbookHtmlSingle.stylesheet = new File(projectDir, 'src/reference/resources/xsl/html-single-custom.xsl')
|
||||
docbookFoPdf.stylesheet = new File(projectDir, 'src/reference/resources/xsl/pdf-custom.xsl')
|
||||
|
||||
def imagesDir = new File(projectDir, 'src/reference/resources/images');
|
||||
[docbookHtml, docbookFoPdf, docbookHtmlSingle]*.admonGraphicsPath = "./images/admon/"
|
||||
[docbookFoPdf]*.imgSrcPath = "${imagesDir}"
|
||||
[docbookHtml, docbookHtmlSingle]*.imgSrcPath = "./images/"
|
||||
|
||||
// defined separately to prevent the replacement from taking place (seems to affect the images)
|
||||
imgSpec = copySpec {
|
||||
into ('reference') {
|
||||
from("$projectDir/src/reference/resources") {
|
||||
include 'css/**/*'
|
||||
}
|
||||
from("$buildDir/docs") {
|
||||
include '*.pdf'
|
||||
}
|
||||
}
|
||||
|
||||
into ('reference/images') {
|
||||
from (imagesDir)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
refSpec = copySpec {
|
||||
into ('reference') {
|
||||
from("$buildDir/docs") {
|
||||
exclude '*.fo'
|
||||
exclude '*.pdf'
|
||||
}
|
||||
}
|
||||
|
||||
p = new Properties()
|
||||
|
||||
for (e in project.properties) {
|
||||
if (e.key != null && e.value != null)
|
||||
p.setProperty(e.key, e.value.toString())
|
||||
}
|
||||
|
||||
filter(ReplaceTokens, tokens: p)
|
||||
|
||||
with(imgSpec)
|
||||
}
|
||||
|
||||
task reference (type: Copy) {
|
||||
dependsOn 'docbook'
|
||||
description = "Builds aggregated DocBook"
|
||||
group = "Documentation"
|
||||
destinationDir = buildDir
|
||||
with(refSpec)
|
||||
}
|
||||
|
||||
|
||||
apiSpec = copySpec {
|
||||
into('api') {
|
||||
from(rootProject.javadoc.destinationDir)
|
||||
}
|
||||
}
|
||||
|
||||
task docSiteLogin(type: org.springframework.gradle.tasks.Login) {
|
||||
if (project.hasProperty('sshHost')) {
|
||||
host = project.property('sshHost')
|
||||
username = project.property('sshUsername')
|
||||
key = project.property('sshPrivateKey')
|
||||
}
|
||||
}
|
||||
|
||||
infoSpec = copySpec {
|
||||
from("$projectDir/src/info") {
|
||||
include 'changelog.txt'
|
||||
}
|
||||
}
|
||||
|
||||
// upload task
|
||||
task uploadDocs(type: org.springframework.gradle.tasks.ScpUpload) {
|
||||
dependsOn rootProject.javadoc, reference
|
||||
description = "Upload API Distribution"
|
||||
group = "Distribution"
|
||||
remoteDir = "/opt/www/domains/springframework.org/www/htdocs/spring-hadoop/docs/${project.version}"
|
||||
login = docSiteLogin
|
||||
|
||||
with(apiSpec)
|
||||
with(refSpec)
|
||||
with(infoSpec)
|
||||
}
|
||||
101
docs/build/highlighting/c-hl.xml
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Syntax highlighting definition for C xslthl - XSLT Syntax Highlighting http://sourceforge.net/projects/xslthl/
|
||||
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks This software is provided 'as-is', without any
|
||||
express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this
|
||||
software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and
|
||||
to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not
|
||||
be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an
|
||||
acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must
|
||||
be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be
|
||||
removed or altered from any source distribution. Michal Molhanec <mol1111 at users.sourceforge.net> Jirka Kosek <kosek
|
||||
at users.sourceforge.net> Michiel Hendriks <elmuerte at users.sourceforge.net>
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="multiline-comment">
|
||||
<start>/**</start>
|
||||
<end>*/</end>
|
||||
<style>doccomment</style>
|
||||
</highlighter>
|
||||
<highlighter type="oneline-comment">
|
||||
<start>///</start>
|
||||
<style>doccomment</style>
|
||||
</highlighter>
|
||||
<highlighter type="multiline-comment">
|
||||
<start>/*</start>
|
||||
<end>*/</end>
|
||||
</highlighter>
|
||||
<highlighter type="oneline-comment">//</highlighter>
|
||||
<highlighter type="oneline-comment">
|
||||
<!-- use the online-comment highlighter to detect directives -->
|
||||
<start>#</start>
|
||||
<lineBreakEscape>\</lineBreakEscape>
|
||||
<style>directive</style>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>"</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>'</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="hexnumber">
|
||||
<prefix>0x</prefix>
|
||||
<suffix>ul</suffix>
|
||||
<suffix>lu</suffix>
|
||||
<suffix>u</suffix>
|
||||
<suffix>l</suffix>
|
||||
<ignoreCase />
|
||||
</highlighter>
|
||||
<highlighter type="number">
|
||||
<point>.</point>
|
||||
<pointStarts />
|
||||
<exponent>e</exponent>
|
||||
<suffix>ul</suffix>
|
||||
<suffix>lu</suffix>
|
||||
<suffix>u</suffix>
|
||||
<suffix>f</suffix>
|
||||
<suffix>l</suffix>
|
||||
<ignoreCase />
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<keyword>auto</keyword>
|
||||
<keyword>_Bool</keyword>
|
||||
<keyword>break</keyword>
|
||||
<keyword>case</keyword>
|
||||
<keyword>char</keyword>
|
||||
<keyword>_Complex</keyword>
|
||||
<keyword>const</keyword>
|
||||
<keyword>continue</keyword>
|
||||
<keyword>default</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>double</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>enum</keyword>
|
||||
<keyword>extern</keyword>
|
||||
<keyword>float</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>goto</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>_Imaginary</keyword>
|
||||
<keyword>inline</keyword>
|
||||
<keyword>int</keyword>
|
||||
<keyword>long</keyword>
|
||||
<keyword>register</keyword>
|
||||
<keyword>restrict</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>short</keyword>
|
||||
<keyword>signed</keyword>
|
||||
<keyword>sizeof</keyword>
|
||||
<keyword>static</keyword>
|
||||
<keyword>struct</keyword>
|
||||
<keyword>switch</keyword>
|
||||
<keyword>typedef</keyword>
|
||||
<keyword>union</keyword>
|
||||
<keyword>unsigned</keyword>
|
||||
<keyword>void</keyword>
|
||||
<keyword>volatile</keyword>
|
||||
<keyword>while</keyword>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
150
docs/build/highlighting/cpp-hl.xml
vendored
Normal file
@@ -0,0 +1,150 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Syntax highlighting definition for C++
|
||||
|
||||
xslthl - XSLT Syntax Highlighting
|
||||
http://sourceforge.net/projects/xslthl/
|
||||
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Michal Molhanec <mol1111 at users.sourceforge.net>
|
||||
Jirka Kosek <kosek at users.sourceforge.net>
|
||||
Michiel Hendriks <elmuerte at users.sourceforge.net>
|
||||
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="multiline-comment">
|
||||
<start>/**</start>
|
||||
<end>*/</end>
|
||||
<style>doccomment</style>
|
||||
</highlighter>
|
||||
<highlighter type="oneline-comment">
|
||||
<start>///</start>
|
||||
<style>doccomment</style>
|
||||
</highlighter>
|
||||
<highlighter type="multiline-comment">
|
||||
<start>/*</start>
|
||||
<end>*/</end>
|
||||
</highlighter>
|
||||
<highlighter type="oneline-comment">//</highlighter>
|
||||
<highlighter type="oneline-comment">
|
||||
<!-- use the online-comment highlighter to detect directives -->
|
||||
<start>#</start>
|
||||
<lineBreakEscape>\</lineBreakEscape>
|
||||
<style>directive</style>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>"</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>'</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="hexnumber">
|
||||
<prefix>0x</prefix>
|
||||
<suffix>ul</suffix>
|
||||
<suffix>lu</suffix>
|
||||
<suffix>u</suffix>
|
||||
<suffix>l</suffix>
|
||||
<ignoreCase />
|
||||
</highlighter>
|
||||
<highlighter type="number">
|
||||
<point>.</point>
|
||||
<pointStarts />
|
||||
<exponent>e</exponent>
|
||||
<suffix>ul</suffix>
|
||||
<suffix>lu</suffix>
|
||||
<suffix>u</suffix>
|
||||
<suffix>f</suffix>
|
||||
<suffix>l</suffix>
|
||||
<ignoreCase />
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<!-- C keywords -->
|
||||
<keyword>auto</keyword>
|
||||
<keyword>_Bool</keyword>
|
||||
<keyword>break</keyword>
|
||||
<keyword>case</keyword>
|
||||
<keyword>char</keyword>
|
||||
<keyword>_Complex</keyword>
|
||||
<keyword>const</keyword>
|
||||
<keyword>continue</keyword>
|
||||
<keyword>default</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>double</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>enum</keyword>
|
||||
<keyword>extern</keyword>
|
||||
<keyword>float</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>goto</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>_Imaginary</keyword>
|
||||
<keyword>inline</keyword>
|
||||
<keyword>int</keyword>
|
||||
<keyword>long</keyword>
|
||||
<keyword>register</keyword>
|
||||
<keyword>restrict</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>short</keyword>
|
||||
<keyword>signed</keyword>
|
||||
<keyword>sizeof</keyword>
|
||||
<keyword>static</keyword>
|
||||
<keyword>struct</keyword>
|
||||
<keyword>switch</keyword>
|
||||
<keyword>typedef</keyword>
|
||||
<keyword>union</keyword>
|
||||
<keyword>unsigned</keyword>
|
||||
<keyword>void</keyword>
|
||||
<keyword>volatile</keyword>
|
||||
<keyword>while</keyword>
|
||||
<!-- C++ keywords -->
|
||||
<keyword>asm</keyword>
|
||||
<keyword>dynamic_cast</keyword>
|
||||
<keyword>namespace</keyword>
|
||||
<keyword>reinterpret_cast</keyword>
|
||||
<keyword>try</keyword>
|
||||
<keyword>bool</keyword>
|
||||
<keyword>explicit</keyword>
|
||||
<keyword>new</keyword>
|
||||
<keyword>static_cast</keyword>
|
||||
<keyword>typeid</keyword>
|
||||
<keyword>catch</keyword>
|
||||
<keyword>false</keyword>
|
||||
<keyword>operator</keyword>
|
||||
<keyword>template</keyword>
|
||||
<keyword>typename</keyword>
|
||||
<keyword>class</keyword>
|
||||
<keyword>friend</keyword>
|
||||
<keyword>private</keyword>
|
||||
<keyword>this</keyword>
|
||||
<keyword>using</keyword>
|
||||
<keyword>const_cast</keyword>
|
||||
<keyword>inline</keyword>
|
||||
<keyword>public</keyword>
|
||||
<keyword>throw</keyword>
|
||||
<keyword>virtual</keyword>
|
||||
<keyword>delete</keyword>
|
||||
<keyword>mutable</keyword>
|
||||
<keyword>protected</keyword>
|
||||
<keyword>true</keyword>
|
||||
<keyword>wchar_t</keyword>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
187
docs/build/highlighting/csharp-hl.xml
vendored
Normal file
@@ -0,0 +1,187 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Syntax highlighting definition for C#
|
||||
|
||||
xslthl - XSLT Syntax Highlighting
|
||||
http://sourceforge.net/projects/xslthl/
|
||||
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Michal Molhanec <mol1111 at users.sourceforge.net>
|
||||
Jirka Kosek <kosek at users.sourceforge.net>
|
||||
Michiel Hendriks <elmuerte at users.sourceforge.net>
|
||||
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="multiline-comment">
|
||||
<start>/**</start>
|
||||
<end>*/</end>
|
||||
<style>doccomment</style>
|
||||
</highlighter>
|
||||
<highlighter type="oneline-comment">
|
||||
<start>///</start>
|
||||
<style>doccomment</style>
|
||||
</highlighter>
|
||||
<highlighter type="multiline-comment">
|
||||
<start>/*</start>
|
||||
<end>*/</end>
|
||||
</highlighter>
|
||||
<highlighter type="oneline-comment">//</highlighter>
|
||||
<highlighter type="annotation">
|
||||
<!-- annotations are called (custom) "attributes" in .NET -->
|
||||
<start>[</start>
|
||||
<end>]</end>
|
||||
<valueStart>(</valueStart>
|
||||
<valueEnd>)</valueEnd>
|
||||
</highlighter>
|
||||
<highlighter type="oneline-comment">
|
||||
<!-- C# supports a couple of directives -->
|
||||
<start>#</start>
|
||||
<lineBreakEscape>\</lineBreakEscape>
|
||||
<style>directive</style>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<!-- strings starting with an "@" can span multiple lines -->
|
||||
<string>@"</string>
|
||||
<endString>"</endString>
|
||||
<escape>\</escape>
|
||||
<spanNewLines />
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>"</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>'</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="hexnumber">
|
||||
<prefix>0x</prefix>
|
||||
<suffix>ul</suffix>
|
||||
<suffix>lu</suffix>
|
||||
<suffix>u</suffix>
|
||||
<suffix>l</suffix>
|
||||
<ignoreCase />
|
||||
</highlighter>
|
||||
<highlighter type="number">
|
||||
<point>.</point>
|
||||
<pointStarts />
|
||||
<exponent>e</exponent>
|
||||
<suffix>ul</suffix>
|
||||
<suffix>lu</suffix>
|
||||
<suffix>u</suffix>
|
||||
<suffix>f</suffix>
|
||||
<suffix>d</suffix>
|
||||
<suffix>m</suffix>
|
||||
<suffix>l</suffix>
|
||||
<ignoreCase />
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<keyword>abstract</keyword>
|
||||
<keyword>as</keyword>
|
||||
<keyword>base</keyword>
|
||||
<keyword>bool</keyword>
|
||||
<keyword>break</keyword>
|
||||
<keyword>byte</keyword>
|
||||
<keyword>case</keyword>
|
||||
<keyword>catch</keyword>
|
||||
<keyword>char</keyword>
|
||||
<keyword>checked</keyword>
|
||||
<keyword>class</keyword>
|
||||
<keyword>const</keyword>
|
||||
<keyword>continue</keyword>
|
||||
<keyword>decimal</keyword>
|
||||
<keyword>default</keyword>
|
||||
<keyword>delegate</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>double</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>enum</keyword>
|
||||
<keyword>event</keyword>
|
||||
<keyword>explicit</keyword>
|
||||
<keyword>extern</keyword>
|
||||
<keyword>false</keyword>
|
||||
<keyword>finally</keyword>
|
||||
<keyword>fixed</keyword>
|
||||
<keyword>float</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>foreach</keyword>
|
||||
<keyword>goto</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>implicit</keyword>
|
||||
<keyword>in</keyword>
|
||||
<keyword>int</keyword>
|
||||
<keyword>interface</keyword>
|
||||
<keyword>internal</keyword>
|
||||
<keyword>is</keyword>
|
||||
<keyword>lock</keyword>
|
||||
<keyword>long</keyword>
|
||||
<keyword>namespace</keyword>
|
||||
<keyword>new</keyword>
|
||||
<keyword>null</keyword>
|
||||
<keyword>object</keyword>
|
||||
<keyword>operator</keyword>
|
||||
<keyword>out</keyword>
|
||||
<keyword>override</keyword>
|
||||
<keyword>params</keyword>
|
||||
<keyword>private</keyword>
|
||||
<keyword>protected</keyword>
|
||||
<keyword>public</keyword>
|
||||
<keyword>readonly</keyword>
|
||||
<keyword>ref</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>sbyte</keyword>
|
||||
<keyword>sealed</keyword>
|
||||
<keyword>short</keyword>
|
||||
<keyword>sizeof</keyword>
|
||||
<keyword>stackalloc</keyword>
|
||||
<keyword>static</keyword>
|
||||
<keyword>string</keyword>
|
||||
<keyword>struct</keyword>
|
||||
<keyword>switch</keyword>
|
||||
<keyword>this</keyword>
|
||||
<keyword>throw</keyword>
|
||||
<keyword>true</keyword>
|
||||
<keyword>try</keyword>
|
||||
<keyword>typeof</keyword>
|
||||
<keyword>uint</keyword>
|
||||
<keyword>ulong</keyword>
|
||||
<keyword>unchecked</keyword>
|
||||
<keyword>unsafe</keyword>
|
||||
<keyword>ushort</keyword>
|
||||
<keyword>using</keyword>
|
||||
<keyword>virtual</keyword>
|
||||
<keyword>void</keyword>
|
||||
<keyword>volatile</keyword>
|
||||
<keyword>while</keyword>
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<!-- special words, not really keywords -->
|
||||
<keyword>add</keyword>
|
||||
<keyword>alias</keyword>
|
||||
<keyword>get</keyword>
|
||||
<keyword>global</keyword>
|
||||
<keyword>partial</keyword>
|
||||
<keyword>remove</keyword>
|
||||
<keyword>set</keyword>
|
||||
<keyword>value</keyword>
|
||||
<keyword>where</keyword>
|
||||
<keyword>yield</keyword>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
200
docs/build/highlighting/delphi-hl.xml
vendored
Normal file
@@ -0,0 +1,200 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Syntax highlighting definition for Delphi (also suitable for Pascal)
|
||||
|
||||
xslthl - XSLT Syntax Highlighting
|
||||
http://sourceforge.net/projects/xslthl/
|
||||
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Michal Molhanec <mol1111 at users.sourceforge.net>
|
||||
Jirka Kosek <kosek at users.sourceforge.net>
|
||||
Michiel Hendriks <elmuerte at users.sourceforge.net>
|
||||
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="multiline-comment">
|
||||
<!-- multiline comments starting with an $ are directives -->
|
||||
<start>{$</start>
|
||||
<end>}</end>
|
||||
<style>directive</style>
|
||||
</highlighter>
|
||||
<highlighter type="multiline-comment">
|
||||
<!-- multiline comments starting with an $ are directives -->
|
||||
<start>(*$</start>
|
||||
<end>)</end>
|
||||
<style>directive</style>
|
||||
</highlighter>
|
||||
<highlighter type="multiline-comment">
|
||||
<start>{</start>
|
||||
<end>}</end>
|
||||
</highlighter>
|
||||
<highlighter type="multiline-comment">
|
||||
<start>(*</start>
|
||||
<end>*)</end>
|
||||
</highlighter>
|
||||
<highlighter type="oneline-comment">//</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>'</string>
|
||||
<doubleEscapes />
|
||||
</highlighter>
|
||||
<highlighter type="hexnumber">
|
||||
<prefix>#$</prefix>
|
||||
<ignoreCase />
|
||||
<style>string</style>
|
||||
</highlighter>
|
||||
<highlighter type="number">
|
||||
<prefix>#</prefix>
|
||||
<ignoreCase />
|
||||
<style>string</style>
|
||||
</highlighter>
|
||||
<highlighter type="hexnumber">
|
||||
<prefix>$</prefix>
|
||||
<ignoreCase />
|
||||
</highlighter>
|
||||
<highlighter type="number">
|
||||
<point>.</point>
|
||||
<exponent>e</exponent>
|
||||
<ignoreCase />
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<!-- Reserved words -->
|
||||
<keyword>and</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>inherited</keyword>
|
||||
<keyword>packed</keyword>
|
||||
<keyword>then</keyword>
|
||||
<keyword>array</keyword>
|
||||
<keyword>end</keyword>
|
||||
<keyword>initialization</keyword>
|
||||
<keyword>procedure</keyword>
|
||||
<keyword>threadvar</keyword>
|
||||
<keyword>as</keyword>
|
||||
<keyword>except</keyword>
|
||||
<keyword>inline</keyword>
|
||||
<keyword>program</keyword>
|
||||
<keyword>to</keyword>
|
||||
<keyword>asm</keyword>
|
||||
<keyword>exports</keyword>
|
||||
<keyword>interface</keyword>
|
||||
<keyword>property</keyword>
|
||||
<keyword>try</keyword>
|
||||
<keyword>begin</keyword>
|
||||
<keyword>file</keyword>
|
||||
<keyword>is</keyword>
|
||||
<keyword>raise</keyword>
|
||||
<keyword>type</keyword>
|
||||
<keyword>case</keyword>
|
||||
<keyword>final</keyword>
|
||||
<keyword>label</keyword>
|
||||
<keyword>record</keyword>
|
||||
<keyword>unit</keyword>
|
||||
<keyword>class</keyword>
|
||||
<keyword>finalization</keyword>
|
||||
<keyword>library</keyword>
|
||||
<keyword>repeat</keyword>
|
||||
<keyword>unsafe</keyword>
|
||||
<keyword>const</keyword>
|
||||
<keyword>finally</keyword>
|
||||
<keyword>mod</keyword>
|
||||
<keyword>resourcestring</keyword>
|
||||
<keyword>until</keyword>
|
||||
<keyword>constructor</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>nil</keyword>
|
||||
<keyword>sealed</keyword>
|
||||
<keyword>uses</keyword>
|
||||
<keyword>destructor</keyword>
|
||||
<keyword>function</keyword>
|
||||
<keyword>not</keyword>
|
||||
<keyword>set</keyword>
|
||||
<keyword>var</keyword>
|
||||
<keyword>dispinterface</keyword>
|
||||
<keyword>goto</keyword>
|
||||
<keyword>object</keyword>
|
||||
<keyword>shl</keyword>
|
||||
<keyword>while</keyword>
|
||||
<keyword>div</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>of</keyword>
|
||||
<keyword>shr</keyword>
|
||||
<keyword>with</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>implementation</keyword>
|
||||
<keyword>or</keyword>
|
||||
<keyword>static</keyword>
|
||||
<keyword>xor</keyword>
|
||||
<keyword>downto</keyword>
|
||||
<keyword>in</keyword>
|
||||
<keyword>out</keyword>
|
||||
<keyword>string</keyword>
|
||||
|
||||
<!-- Special meaning -->
|
||||
<keyword>at</keyword>
|
||||
<keyword>on</keyword>
|
||||
|
||||
<!-- Directives -->
|
||||
<keyword>absolute</keyword>
|
||||
<keyword>dynamic</keyword>
|
||||
<keyword>local</keyword>
|
||||
<keyword>platform</keyword>
|
||||
<keyword>requires</keyword>
|
||||
<keyword>abstract</keyword>
|
||||
<keyword>export</keyword>
|
||||
<keyword>message</keyword>
|
||||
<keyword>private</keyword>
|
||||
<keyword>resident</keyword>
|
||||
<keyword>assembler</keyword>
|
||||
<keyword>external</keyword>
|
||||
<keyword>name</keyword>
|
||||
<keyword>protected</keyword>
|
||||
<keyword>safecall</keyword>
|
||||
<keyword>automated</keyword>
|
||||
<keyword>far</keyword>
|
||||
<keyword>near</keyword>
|
||||
<keyword>public</keyword>
|
||||
<keyword>stdcall</keyword>
|
||||
<keyword>cdecl</keyword>
|
||||
<keyword>forward</keyword>
|
||||
<keyword>nodefault</keyword>
|
||||
<keyword>published</keyword>
|
||||
<keyword>stored</keyword>
|
||||
<keyword>contains</keyword>
|
||||
<keyword>implements</keyword>
|
||||
<keyword>overload</keyword>
|
||||
<keyword>read</keyword>
|
||||
<keyword>varargs</keyword>
|
||||
<keyword>default</keyword>
|
||||
<keyword>index</keyword>
|
||||
<keyword>override</keyword>
|
||||
<keyword>readonly</keyword>
|
||||
<keyword>virtual</keyword>
|
||||
<keyword>deprecated</keyword>
|
||||
<keyword>inline</keyword>
|
||||
<keyword>package</keyword>
|
||||
<keyword>register</keyword>
|
||||
<keyword>write</keyword>
|
||||
<keyword>dispid</keyword>
|
||||
<keyword>library</keyword>
|
||||
<keyword>pascal</keyword>
|
||||
<keyword>reintroduce</keyword>
|
||||
<keyword>writeonly</keyword>
|
||||
<ignoreCase />
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
45
docs/build/highlighting/ini-hl.xml
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Syntax highlighting definition for ini files
|
||||
|
||||
xslthl - XSLT Syntax Highlighting
|
||||
http://sourceforge.net/projects/xslthl/
|
||||
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Michal Molhanec <mol1111 at users.sourceforge.net>
|
||||
Jirka Kosek <kosek at users.sourceforge.net>
|
||||
Michiel Hendriks <elmuerte at users.sourceforge.net>
|
||||
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="oneline-comment">;</highlighter>
|
||||
<highlighter type="regex">
|
||||
<!-- ini sections -->
|
||||
<pattern>^(\[.+\]\s*)$</pattern>
|
||||
<style>keyword</style>
|
||||
<flags>MULTILINE</flags>
|
||||
</highlighter>
|
||||
<highlighter type="regex">
|
||||
<!-- the keys in an ini section -->
|
||||
<pattern>^(.+)(?==)</pattern>
|
||||
<style>attribute</style>
|
||||
<flags>MULTILINE</flags>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
117
docs/build/highlighting/java-hl.xml
vendored
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Syntax highlighting definition for Java
|
||||
|
||||
xslthl - XSLT Syntax Highlighting
|
||||
http://sourceforge.net/projects/xslthl/
|
||||
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Michal Molhanec <mol1111 at users.sourceforge.net>
|
||||
Jirka Kosek <kosek at users.sourceforge.net>
|
||||
Michiel Hendriks <elmuerte at users.sourceforge.net>
|
||||
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="multiline-comment">
|
||||
<start>/**</start>
|
||||
<end>*/</end>
|
||||
<style>doccomment</style>
|
||||
</highlighter>
|
||||
<highlighter type="multiline-comment">
|
||||
<start>/*</start>
|
||||
<end>*/</end>
|
||||
</highlighter>
|
||||
<highlighter type="oneline-comment">//</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>"</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>'</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="annotation">
|
||||
<start>@</start>
|
||||
<valueStart>(</valueStart>
|
||||
<valueEnd>)</valueEnd>
|
||||
</highlighter>
|
||||
<highlighter type="hexnumber">
|
||||
<prefix>0x</prefix>
|
||||
<ignoreCase />
|
||||
</highlighter>
|
||||
<highlighter type="number">
|
||||
<point>.</point>
|
||||
<exponent>e</exponent>
|
||||
<suffix>f</suffix>
|
||||
<suffix>d</suffix>
|
||||
<suffix>l</suffix>
|
||||
<ignoreCase />
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<keyword>abstract</keyword>
|
||||
<keyword>boolean</keyword>
|
||||
<keyword>break</keyword>
|
||||
<keyword>byte</keyword>
|
||||
<keyword>case</keyword>
|
||||
<keyword>catch</keyword>
|
||||
<keyword>char</keyword>
|
||||
<keyword>class</keyword>
|
||||
<keyword>const</keyword>
|
||||
<keyword>continue</keyword>
|
||||
<keyword>default</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>double</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>extends</keyword>
|
||||
<keyword>final</keyword>
|
||||
<keyword>finally</keyword>
|
||||
<keyword>float</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>goto</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>implements</keyword>
|
||||
<keyword>import</keyword>
|
||||
<keyword>instanceof</keyword>
|
||||
<keyword>int</keyword>
|
||||
<keyword>interface</keyword>
|
||||
<keyword>long</keyword>
|
||||
<keyword>native</keyword>
|
||||
<keyword>new</keyword>
|
||||
<keyword>package</keyword>
|
||||
<keyword>private</keyword>
|
||||
<keyword>protected</keyword>
|
||||
<keyword>public</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>short</keyword>
|
||||
<keyword>static</keyword>
|
||||
<keyword>strictfp</keyword>
|
||||
<keyword>super</keyword>
|
||||
<keyword>switch</keyword>
|
||||
<keyword>synchronized</keyword>
|
||||
<keyword>this</keyword>
|
||||
<keyword>throw</keyword>
|
||||
<keyword>throws</keyword>
|
||||
<keyword>transient</keyword>
|
||||
<keyword>try</keyword>
|
||||
<keyword>void</keyword>
|
||||
<keyword>volatile</keyword>
|
||||
<keyword>while</keyword>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
147
docs/build/highlighting/javascript-hl.xml
vendored
Normal file
@@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Syntax highlighting definition for JavaScript
|
||||
|
||||
xslthl - XSLT Syntax Highlighting
|
||||
http://sourceforge.net/projects/xslthl/
|
||||
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Michal Molhanec <mol1111 at users.sourceforge.net>
|
||||
Jirka Kosek <kosek at users.sourceforge.net>
|
||||
Michiel Hendriks <elmuerte at users.sourceforge.net>
|
||||
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="multiline-comment">
|
||||
<start>/*</start>
|
||||
<end>*/</end>
|
||||
</highlighter>
|
||||
<highlighter type="oneline-comment">//</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>"</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>'</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="hexnumber">
|
||||
<prefix>0x</prefix>
|
||||
<ignoreCase />
|
||||
</highlighter>
|
||||
<highlighter type="number">
|
||||
<point>.</point>
|
||||
<exponent>e</exponent>
|
||||
<ignoreCase />
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<keyword>break</keyword>
|
||||
<keyword>case</keyword>
|
||||
<keyword>catch</keyword>
|
||||
<keyword>continue</keyword>
|
||||
<keyword>default</keyword>
|
||||
<keyword>delete</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>finally</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>function</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>in</keyword>
|
||||
<keyword>instanceof</keyword>
|
||||
<keyword>new</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>switch</keyword>
|
||||
<keyword>this</keyword>
|
||||
<keyword>throw</keyword>
|
||||
<keyword>try</keyword>
|
||||
<keyword>typeof</keyword>
|
||||
<keyword>var</keyword>
|
||||
<keyword>void</keyword>
|
||||
<keyword>while</keyword>
|
||||
<keyword>with</keyword>
|
||||
<!-- future keywords -->
|
||||
<keyword>abstract</keyword>
|
||||
<keyword>boolean</keyword>
|
||||
<keyword>byte</keyword>
|
||||
<keyword>char</keyword>
|
||||
<keyword>class</keyword>
|
||||
<keyword>const</keyword>
|
||||
<keyword>debugger</keyword>
|
||||
<keyword>double</keyword>
|
||||
<keyword>enum</keyword>
|
||||
<keyword>export</keyword>
|
||||
<keyword>extends</keyword>
|
||||
<keyword>final</keyword>
|
||||
<keyword>float</keyword>
|
||||
<keyword>goto</keyword>
|
||||
<keyword>implements</keyword>
|
||||
<keyword>import</keyword>
|
||||
<keyword>int</keyword>
|
||||
<keyword>interface</keyword>
|
||||
<keyword>long</keyword>
|
||||
<keyword>native</keyword>
|
||||
<keyword>package</keyword>
|
||||
<keyword>private</keyword>
|
||||
<keyword>protected</keyword>
|
||||
<keyword>public</keyword>
|
||||
<keyword>short</keyword>
|
||||
<keyword>static</keyword>
|
||||
<keyword>super</keyword>
|
||||
<keyword>synchronized</keyword>
|
||||
<keyword>throws</keyword>
|
||||
<keyword>transient</keyword>
|
||||
<keyword>volatile</keyword>
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<keyword>prototype</keyword>
|
||||
<!-- Global Objects -->
|
||||
<keyword>Array</keyword>
|
||||
<keyword>Boolean</keyword>
|
||||
<keyword>Date</keyword>
|
||||
<keyword>Error</keyword>
|
||||
<keyword>EvalError</keyword>
|
||||
<keyword>Function</keyword>
|
||||
<keyword>Math</keyword>
|
||||
<keyword>Number</keyword>
|
||||
<keyword>Object</keyword>
|
||||
<keyword>RangeError</keyword>
|
||||
<keyword>ReferenceError</keyword>
|
||||
<keyword>RegExp</keyword>
|
||||
<keyword>String</keyword>
|
||||
<keyword>SyntaxError</keyword>
|
||||
<keyword>TypeError</keyword>
|
||||
<keyword>URIError</keyword>
|
||||
<!-- Global functions -->
|
||||
<keyword>decodeURI</keyword>
|
||||
<keyword>decodeURIComponent</keyword>
|
||||
<keyword>encodeURI</keyword>
|
||||
<keyword>encodeURIComponent</keyword>
|
||||
<keyword>eval</keyword>
|
||||
<keyword>isFinite</keyword>
|
||||
<keyword>isNaN</keyword>
|
||||
<keyword>parseFloat</keyword>
|
||||
<keyword>parseInt</keyword>
|
||||
<!-- Global properties -->
|
||||
<keyword>Infinity</keyword>
|
||||
<keyword>NaN</keyword>
|
||||
<keyword>undefined</keyword>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
90
docs/build/highlighting/m2-hl.xml
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Syntax highlighting definition for Modulo-2
|
||||
|
||||
xslthl - XSLT Syntax Highlighting
|
||||
http://sourceforge.net/projects/xslthl/
|
||||
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Michal Molhanec <mol1111 at users.sourceforge.net>
|
||||
Jirka Kosek <kosek at users.sourceforge.net>
|
||||
Michiel Hendriks <elmuerte at users.sourceforge.net>
|
||||
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="nested-multiline-comment">
|
||||
<start>(*</start>
|
||||
<end>*)</end>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>"</string>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>'</string>
|
||||
</highlighter>
|
||||
<highlighter type="number">
|
||||
<point>.</point>
|
||||
<exponent>e</exponent>
|
||||
<ignoreCase />
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<keyword>and</keyword>
|
||||
<keyword>array</keyword>
|
||||
<keyword>begin</keyword>
|
||||
<keyword>by</keyword>
|
||||
<keyword>case</keyword>
|
||||
<keyword>const</keyword>
|
||||
<keyword>definition</keyword>
|
||||
<keyword>div</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>elsif</keyword>
|
||||
<keyword>end</keyword>
|
||||
<keyword>exit</keyword>
|
||||
<keyword>export</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>from</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>implementation</keyword>
|
||||
<keyword>import</keyword>
|
||||
<keyword>in</keyword>
|
||||
<keyword>loop</keyword>
|
||||
<keyword>mod</keyword>
|
||||
<keyword>module</keyword>
|
||||
<keyword>not</keyword>
|
||||
<keyword>of</keyword>
|
||||
<keyword>or</keyword>
|
||||
<keyword>pointer</keyword>
|
||||
<keyword>procedure</keyword>
|
||||
<keyword>qualified</keyword>
|
||||
<keyword>record</keyword>
|
||||
<keyword>repeat</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>set</keyword>
|
||||
<keyword>then</keyword>
|
||||
<keyword>to</keyword>
|
||||
<keyword>type</keyword>
|
||||
<keyword>until</keyword>
|
||||
<keyword>var</keyword>
|
||||
<keyword>while</keyword>
|
||||
<keyword>with</keyword>
|
||||
<ignoreCase />
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
116
docs/build/highlighting/myxml-hl.xml
vendored
Normal file
@@ -0,0 +1,116 @@
|
||||
<?xml version='1.0'?>
|
||||
<!--
|
||||
|
||||
Bakalarska prace: Zvyraznovani syntaxe v XSLT
|
||||
Michal Molhanec 2005
|
||||
|
||||
myxml-hl.xml - konfigurace zvyraznovace XML, ktera zvlast zvyrazni
|
||||
HTML elementy a XSL elementy
|
||||
|
||||
-->
|
||||
<highlighters>
|
||||
|
||||
<wholehighlighter type='xml'>
|
||||
<elementSet>
|
||||
<style>html</style>
|
||||
<element>A</element>
|
||||
<element>ABBR</element>
|
||||
<element>ACRONYM</element>
|
||||
<element>ADDRESS</element>
|
||||
<element>APPLET</element>
|
||||
<element>AREA</element>
|
||||
<element>B</element>
|
||||
<element>BASE</element>
|
||||
<element>BASEFONT</element>
|
||||
<element>BDO</element>
|
||||
<element>BIG</element>
|
||||
<element>BLOCKQUOTE</element>
|
||||
<element>BODY</element>
|
||||
<element>BR</element>
|
||||
<element>BUTTON</element>
|
||||
<element>CAPTION</element>
|
||||
<element>CENTER</element>
|
||||
<element>CITE</element>
|
||||
<element>CODE</element>
|
||||
<element>COL</element>
|
||||
<element>COLGROUP</element>
|
||||
<element>DD</element>
|
||||
<element>DEL</element>
|
||||
<element>DFN</element>
|
||||
<element>DIR</element>
|
||||
<element>DIV</element>
|
||||
<element>DL</element>
|
||||
<element>DT</element>
|
||||
<element>EM</element>
|
||||
<element>FIELDSET</element>
|
||||
<element>FONT</element>
|
||||
<element>FORM</element>
|
||||
<element>FRAME</element>
|
||||
<element>FRAMESET</element>
|
||||
<element>H1</element>
|
||||
<element>H2</element>
|
||||
<element>H3</element>
|
||||
<element>H4</element>
|
||||
<element>H5</element>
|
||||
<element>H6</element>
|
||||
<element>HEAD</element>
|
||||
<element>HR</element>
|
||||
<element>HTML</element>
|
||||
<element>I</element>
|
||||
<element>IFRAME</element>
|
||||
<element>IMG</element>
|
||||
<element>INPUT</element>
|
||||
<element>INS</element>
|
||||
<element>ISINDEX</element>
|
||||
<element>KBD</element>
|
||||
<element>LABEL</element>
|
||||
<element>LEGEND</element>
|
||||
<element>LI</element>
|
||||
<element>LINK</element>
|
||||
<element>MAP</element>
|
||||
<element>MENU</element>
|
||||
<element>META</element>
|
||||
<element>NOFRAMES</element>
|
||||
<element>NOSCRIPT</element>
|
||||
<element>OBJECT</element>
|
||||
<element>OL</element>
|
||||
<element>OPTGROUP</element>
|
||||
<element>OPTION</element>
|
||||
<element>P</element>
|
||||
<element>PARAM</element>
|
||||
<element>PRE</element>
|
||||
<element>Q</element>
|
||||
<element>S</element>
|
||||
<element>SAMP</element>
|
||||
<element>SCRIPT</element>
|
||||
<element>SELECT</element>
|
||||
<element>SMALL</element>
|
||||
<element>SPAN</element>
|
||||
<element>STRIKE</element>
|
||||
<element>STRONG</element>
|
||||
<element>STYLE</element>
|
||||
<element>SUB</element>
|
||||
<element>SUP</element>
|
||||
<element>TABLE</element>
|
||||
<element>TBODY</element>
|
||||
<element>TD</element>
|
||||
<element>TEXTAREA</element>
|
||||
<element>TFOOT</element>
|
||||
<element>TH</element>
|
||||
<element>THEAD</element>
|
||||
<element>TITLE</element>
|
||||
<element>TR</element>
|
||||
<element>TT</element>
|
||||
<element>U</element>
|
||||
<element>UL</element>
|
||||
<element>VAR</element>
|
||||
<element>XMP</element>
|
||||
<ignoreCase/>
|
||||
</elementSet>
|
||||
<elementPrefix>
|
||||
<style>xslt</style>
|
||||
<prefix>xsl:</prefix>
|
||||
</elementPrefix>
|
||||
</wholehighlighter>
|
||||
|
||||
</highlighters>
|
||||
120
docs/build/highlighting/perl-hl.xml
vendored
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Syntax highlighting definition for Perl
|
||||
|
||||
xslthl - XSLT Syntax Highlighting
|
||||
http://sourceforge.net/projects/xslthl/
|
||||
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Michal Molhanec <mol1111 at users.sourceforge.net>
|
||||
Jirka Kosek <kosek at users.sourceforge.net>
|
||||
Michiel Hendriks <elmuerte at users.sourceforge.net>
|
||||
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="oneline-comment">#</highlighter>
|
||||
<highlighter type="heredoc">
|
||||
<start><<</start>
|
||||
<quote>'</quote>
|
||||
<quote>"</quote>
|
||||
<noWhiteSpace/>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>"</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>'</string>
|
||||
<escape>\</escape>
|
||||
<spanNewLines/>
|
||||
</highlighter>
|
||||
<highlighter type="hexnumber">
|
||||
<prefix>0x</prefix>
|
||||
<ignoreCase />
|
||||
</highlighter>
|
||||
<highlighter type="number">
|
||||
<point>.</point>
|
||||
<pointStarts />
|
||||
<ignoreCase />
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<keyword>if</keyword>
|
||||
<keyword>unless</keyword>
|
||||
<keyword>while</keyword>
|
||||
<keyword>until</keyword>
|
||||
<keyword>foreach</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>elsif</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>when</keyword>
|
||||
<keyword>default</keyword>
|
||||
<keyword>given</keyword>
|
||||
<!-- Keywords related to the control flow of your perl program -->
|
||||
<keyword>caller</keyword>
|
||||
<keyword>continue</keyword>
|
||||
<keyword>die</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>dump</keyword>
|
||||
<keyword>eval</keyword>
|
||||
<keyword>exit</keyword>
|
||||
<keyword>goto</keyword>
|
||||
<keyword>last</keyword>
|
||||
<keyword>next</keyword>
|
||||
<keyword>redo</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>sub</keyword>
|
||||
<keyword>wantarray</keyword>
|
||||
<!-- Keywords related to scoping -->
|
||||
<keyword>caller</keyword>
|
||||
<keyword>import</keyword>
|
||||
<keyword>local</keyword>
|
||||
<keyword>my</keyword>
|
||||
<keyword>package</keyword>
|
||||
<keyword>use</keyword>
|
||||
<!-- Keywords related to perl modules -->
|
||||
<keyword>do</keyword>
|
||||
<keyword>import</keyword>
|
||||
<keyword>no</keyword>
|
||||
<keyword>package</keyword>
|
||||
<keyword>require</keyword>
|
||||
<keyword>use</keyword>
|
||||
<!-- Keywords related to classes and object-orientedness -->
|
||||
<keyword>bless</keyword>
|
||||
<keyword>dbmclose</keyword>
|
||||
<keyword>dbmopen</keyword>
|
||||
<keyword>package</keyword>
|
||||
<keyword>ref</keyword>
|
||||
<keyword>tie</keyword>
|
||||
<keyword>tied</keyword>
|
||||
<keyword>untie</keyword>
|
||||
<keyword>use</keyword>
|
||||
<!-- operators -->
|
||||
<keyword>and</keyword>
|
||||
<keyword>or</keyword>
|
||||
<keyword>not</keyword>
|
||||
<keyword>eq</keyword>
|
||||
<keyword>ne</keyword>
|
||||
<keyword>lt</keyword>
|
||||
<keyword>gt</keyword>
|
||||
<keyword>le</keyword>
|
||||
<keyword>ge</keyword>
|
||||
<keyword>cmp</keyword>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
149
docs/build/highlighting/php-hl.xml
vendored
Normal file
@@ -0,0 +1,149 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Syntax highlighting definition for PHP
|
||||
|
||||
xslthl - XSLT Syntax Highlighting
|
||||
http://sourceforge.net/projects/xslthl/
|
||||
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Michal Molhanec <mol1111 at users.sourceforge.net>
|
||||
Jirka Kosek <kosek at users.sourceforge.net>
|
||||
Michiel Hendriks <elmuerte at users.sourceforge.net>
|
||||
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="multiline-comment">
|
||||
<start>/**</start>
|
||||
<end>*/</end>
|
||||
<style>doccomment</style>
|
||||
</highlighter>
|
||||
<highlighter type="oneline-comment">
|
||||
<start>///</start>
|
||||
<style>doccomment</style>
|
||||
</highlighter>
|
||||
<highlighter type="multiline-comment">
|
||||
<start>/*</start>
|
||||
<end>*/</end>
|
||||
</highlighter>
|
||||
<highlighter type="oneline-comment">//</highlighter>
|
||||
<highlighter type="oneline-comment">#</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>"</string>
|
||||
<escape>\</escape>
|
||||
<spanNewLines />
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>'</string>
|
||||
<escape>\</escape>
|
||||
<spanNewLines />
|
||||
</highlighter>
|
||||
<highlighter type="heredoc">
|
||||
<start><<<</start>
|
||||
</highlighter>
|
||||
<highlighter type="hexnumber">
|
||||
<prefix>0x</prefix>
|
||||
<ignoreCase />
|
||||
</highlighter>
|
||||
<highlighter type="number">
|
||||
<point>.</point>
|
||||
<exponent>e</exponent>
|
||||
<ignoreCase />
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<keyword>and</keyword>
|
||||
<keyword>or</keyword>
|
||||
<keyword>xor</keyword>
|
||||
<keyword>__FILE__</keyword>
|
||||
<keyword>exception</keyword>
|
||||
<keyword>__LINE__</keyword>
|
||||
<keyword>array</keyword>
|
||||
<keyword>as</keyword>
|
||||
<keyword>break</keyword>
|
||||
<keyword>case</keyword>
|
||||
<keyword>class</keyword>
|
||||
<keyword>const</keyword>
|
||||
<keyword>continue</keyword>
|
||||
<keyword>declare</keyword>
|
||||
<keyword>default</keyword>
|
||||
<keyword>die</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>echo</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>elseif</keyword>
|
||||
<keyword>empty</keyword>
|
||||
<keyword>enddeclare</keyword>
|
||||
<keyword>endfor</keyword>
|
||||
<keyword>endforeach</keyword>
|
||||
<keyword>endif</keyword>
|
||||
<keyword>endswitch</keyword>
|
||||
<keyword>endwhile</keyword>
|
||||
<keyword>eval</keyword>
|
||||
<keyword>exit</keyword>
|
||||
<keyword>extends</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>foreach</keyword>
|
||||
<keyword>function</keyword>
|
||||
<keyword>global</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>include</keyword>
|
||||
<keyword>include_once</keyword>
|
||||
<keyword>isset</keyword>
|
||||
<keyword>list</keyword>
|
||||
<keyword>new</keyword>
|
||||
<keyword>print</keyword>
|
||||
<keyword>require</keyword>
|
||||
<keyword>require_once</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>static</keyword>
|
||||
<keyword>switch</keyword>
|
||||
<keyword>unset</keyword>
|
||||
<keyword>use</keyword>
|
||||
<keyword>var</keyword>
|
||||
<keyword>while</keyword>
|
||||
<keyword>__FUNCTION__</keyword>
|
||||
<keyword>__CLASS__</keyword>
|
||||
<keyword>__METHOD__</keyword>
|
||||
<keyword>final</keyword>
|
||||
<keyword>php_user_filter</keyword>
|
||||
<keyword>interface</keyword>
|
||||
<keyword>implements</keyword>
|
||||
<keyword>extends</keyword>
|
||||
<keyword>public</keyword>
|
||||
<keyword>private</keyword>
|
||||
<keyword>protected</keyword>
|
||||
<keyword>abstract</keyword>
|
||||
<keyword>clone</keyword>
|
||||
<keyword>try</keyword>
|
||||
<keyword>catch</keyword>
|
||||
<keyword>throw</keyword>
|
||||
<keyword>cfunction</keyword>
|
||||
<keyword>old_function</keyword>
|
||||
<keyword>true</keyword>
|
||||
<keyword>false</keyword>
|
||||
<ignoreCase />
|
||||
</highlighter>
|
||||
<highlighter type="word">
|
||||
<!-- highlight the php open and close tags as directives -->
|
||||
<word>?></word>
|
||||
<word><?php</word>
|
||||
<word><?=</word>
|
||||
<style>directive</style>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
100
docs/build/highlighting/python-hl.xml
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Syntax highlighting definition for Python
|
||||
|
||||
xslthl - XSLT Syntax Highlighting
|
||||
http://sourceforge.net/projects/xslthl/
|
||||
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Michal Molhanec <mol1111 at users.sourceforge.net>
|
||||
Jirka Kosek <kosek at users.sourceforge.net>
|
||||
Michiel Hendriks <elmuerte at users.sourceforge.net>
|
||||
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="annotation">
|
||||
<!-- these are actually called decorators -->
|
||||
<start>@</start>
|
||||
<valueStart>(</valueStart>
|
||||
<valueEnd>)</valueEnd>
|
||||
</highlighter>
|
||||
<highlighter type="oneline-comment">#</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>"""</string>
|
||||
<spanNewLines />
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>'''</string>
|
||||
<spanNewLines />
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>"</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>'</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="hexnumber">
|
||||
<prefix>0x</prefix>
|
||||
<suffix>l</suffix>
|
||||
<ignoreCase />
|
||||
</highlighter>
|
||||
<highlighter type="number">
|
||||
<point>.</point>
|
||||
<pointStarts />
|
||||
<exponent>e</exponent>
|
||||
<suffix>l</suffix>
|
||||
<ignoreCase />
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<keyword>and</keyword>
|
||||
<keyword>del</keyword>
|
||||
<keyword>from</keyword>
|
||||
<keyword>not</keyword>
|
||||
<keyword>while</keyword>
|
||||
<keyword>as</keyword>
|
||||
<keyword>elif</keyword>
|
||||
<keyword>global</keyword>
|
||||
<keyword>or</keyword>
|
||||
<keyword>with</keyword>
|
||||
<keyword>assert</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>pass</keyword>
|
||||
<keyword>yield</keyword>
|
||||
<keyword>break</keyword>
|
||||
<keyword>except</keyword>
|
||||
<keyword>import</keyword>
|
||||
<keyword>print</keyword>
|
||||
<keyword>class</keyword>
|
||||
<keyword>exec</keyword>
|
||||
<keyword>in</keyword>
|
||||
<keyword>raise</keyword>
|
||||
<keyword>continue</keyword>
|
||||
<keyword>finally</keyword>
|
||||
<keyword>is</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>def</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>lambda</keyword>
|
||||
<keyword>try</keyword>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
109
docs/build/highlighting/ruby-hl.xml
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Syntax highlighting definition for Ruby
|
||||
|
||||
xslthl - XSLT Syntax Highlighting
|
||||
http://sourceforge.net/projects/xslthl/
|
||||
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Michal Molhanec <mol1111 at users.sourceforge.net>
|
||||
Jirka Kosek <kosek at users.sourceforge.net>
|
||||
Michiel Hendriks <elmuerte at users.sourceforge.net>
|
||||
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="oneline-comment">#</highlighter>
|
||||
<highlighter type="heredoc">
|
||||
<start><<</start>
|
||||
<noWhiteSpace/>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>"</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>%Q{</string>
|
||||
<endString>}</endString>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>%/</string>
|
||||
<endString>/</endString>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>'</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>%q{</string>
|
||||
<endString>}</endString>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="hexnumber">
|
||||
<prefix>0x</prefix>
|
||||
<ignoreCase />
|
||||
</highlighter>
|
||||
<highlighter type="number">
|
||||
<point>.</point>
|
||||
<exponent>e</exponent>
|
||||
<ignoreCase />
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<keyword>alias</keyword>
|
||||
<keyword>and</keyword>
|
||||
<keyword>BEGIN</keyword>
|
||||
<keyword>begin</keyword>
|
||||
<keyword>break</keyword>
|
||||
<keyword>case</keyword>
|
||||
<keyword>class</keyword>
|
||||
<keyword>def</keyword>
|
||||
<keyword>defined</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>elsif</keyword>
|
||||
<keyword>END</keyword>
|
||||
<keyword>end</keyword>
|
||||
<keyword>ensure</keyword>
|
||||
<keyword>false</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>in</keyword>
|
||||
<keyword>module</keyword>
|
||||
<keyword>next</keyword>
|
||||
<keyword>nil</keyword>
|
||||
<keyword>not</keyword>
|
||||
<keyword>or</keyword>
|
||||
<keyword>redo</keyword>
|
||||
<keyword>rescue</keyword>
|
||||
<keyword>retry</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>self</keyword>
|
||||
<keyword>super</keyword>
|
||||
<keyword>then</keyword>
|
||||
<keyword>true</keyword>
|
||||
<keyword>undef</keyword>
|
||||
<keyword>unless</keyword>
|
||||
<keyword>until</keyword>
|
||||
<keyword>when</keyword>
|
||||
<keyword>while</keyword>
|
||||
<keyword>yield</keyword>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
180
docs/build/highlighting/tcl-hl.xml
vendored
Normal file
@@ -0,0 +1,180 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
xslthl highlighter definition fof Tcl/Tk.
|
||||
written by Arndt Roger Schneider
|
||||
|
||||
Copyright 2008 Arndt Roger Schneider
|
||||
License: xlib/libpng
|
||||
|
||||
This software is provided "as-is", without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product
|
||||
documentation would be appreciated but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source
|
||||
distribution.
|
||||
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="oneline-comment">#</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>"</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="regex">
|
||||
<pattern>-[\p{javaJavaIdentifierStart}][\p{javaJavaIdentifierPart}]+
|
||||
</pattern>
|
||||
<style>none</style>
|
||||
</highlighter>
|
||||
<highlighter type="number">
|
||||
<point>.</point>
|
||||
<ignoreCase />
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<!-- Tcl and itcl / structural -->
|
||||
<keyword>if</keyword>
|
||||
<keyword>then</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>elseif</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>foreach</keyword>
|
||||
<keyword>break</keyword>
|
||||
<keyword>continue</keyword>
|
||||
<keyword>while</keyword>
|
||||
<keyword>eval</keyword>
|
||||
<keyword>case</keyword>
|
||||
<keyword>in</keyword>
|
||||
<keyword>switch</keyword>
|
||||
<keyword>default</keyword>
|
||||
<keyword>exit</keyword>
|
||||
<keyword>error</keyword>
|
||||
<keyword>proc</keyword>
|
||||
<keyword>rename</keyword>
|
||||
<keyword>exec</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>uplevel</keyword>
|
||||
<keyword>upvar</keyword>
|
||||
<keyword>constructor</keyword>
|
||||
<keyword>destructor</keyword>
|
||||
<keyword>itcl_class</keyword>
|
||||
<keyword>loop</keyword>
|
||||
<keyword>for_array_keys</keyword>
|
||||
<keyword>for_recursive_glob</keyword>
|
||||
<keyword>for_file</keyword>
|
||||
<keyword>method</keyword>
|
||||
<keyword>body</keyword>
|
||||
<keyword>configbody</keyword>
|
||||
<keyword>catch</keyword>
|
||||
<keyword>namespace</keyword>
|
||||
<keyword>class</keyword>
|
||||
<keyword>array</keyword>
|
||||
<keyword>set</keyword>
|
||||
<keyword>unset</keyword>
|
||||
<keyword>package</keyword>
|
||||
<keyword>source</keyword>
|
||||
|
||||
<!-- Additional commands -->
|
||||
<keyword>subst</keyword>
|
||||
<keyword>list</keyword>
|
||||
<keyword>format</keyword>
|
||||
<keyword>lappend</keyword>
|
||||
<keyword>option</keyword>
|
||||
<keyword>expr</keyword>
|
||||
<keyword>puts</keyword>
|
||||
<keyword>winfo</keyword>
|
||||
<keyword>lindex</keyword>
|
||||
<keyword>string</keyword>
|
||||
|
||||
|
||||
<!-- Runtime Library / structural -->
|
||||
<keyword>verified</keyword>
|
||||
<keyword>seteach</keyword>
|
||||
<keyword>fixme</keyword>
|
||||
<keyword>debug</keyword>
|
||||
<keyword>rtl::debug</keyword>
|
||||
<keyword>rtl::verified</keyword>
|
||||
<keyword>rtl::template</keyword>
|
||||
<keyword>rtl::seteach</keyword>
|
||||
|
||||
<!-- Runtime Library / Additional -->
|
||||
<keyword>mkProc</keyword>
|
||||
<keyword>getCreator</keyword>
|
||||
<keyword>properties</keyword>
|
||||
<keyword>lappendunique</keyword>
|
||||
<keyword>rtl::lappendunique</keyword>
|
||||
|
||||
<!-- geometry managers from Tk -->
|
||||
<keyword>place</keyword>
|
||||
<keyword>pack</keyword>
|
||||
<keyword>grid</keyword>
|
||||
|
||||
|
||||
<!-- Additional Tk stuff -->
|
||||
<keyword>image</keyword>
|
||||
<keyword>font</keyword>
|
||||
<keyword>focus</keyword>
|
||||
<keyword>tk</keyword>
|
||||
<keyword>bind</keyword>
|
||||
<keyword>after</keyword>
|
||||
|
||||
<!-- Window classes from Tk, ... -->
|
||||
<keyword>toplevel</keyword>
|
||||
<keyword>frame</keyword>
|
||||
<keyword>entry</keyword>
|
||||
<keyword>listbox</keyword>
|
||||
<keyword>button</keyword>
|
||||
<keyword>radiobutton</keyword>
|
||||
<keyword>checkbutton</keyword>
|
||||
<keyword>canvas</keyword>
|
||||
<keyword>menu</keyword>
|
||||
<keyword>menubutton</keyword>
|
||||
<keyword>text</keyword>
|
||||
<keyword>label</keyword>
|
||||
<keyword>message</keyword>
|
||||
<!--
|
||||
The rest of Tk's windows is omitted: scrollbar, scale, panedwindow, labelframe, spinbox ...
|
||||
-->
|
||||
|
||||
<!-- ... from tkZinc, ... -->
|
||||
<keyword>zinc</keyword>
|
||||
|
||||
<!-- ... from tkpath, ... -->
|
||||
<keyword>tkpath::gradient</keyword>
|
||||
|
||||
<!-- ... from Runtime Library, ... -->
|
||||
<keyword>rtl_combobox</keyword>
|
||||
<keyword>rtl_tree</keyword>
|
||||
<keyword>rtl_tabset</keyword>
|
||||
<keyword>rtl_mlistbox</keyword>
|
||||
<keyword>rtl_gridwin</keyword>
|
||||
<keyword>rtlysizer</keyword>
|
||||
<keyword>rtlxsizer</keyword>
|
||||
<!--
|
||||
The rest of RTL's windows is omitted: spinbox, decoratedframe, symbolbar, symbolbarcustomize, question ...
|
||||
-->
|
||||
|
||||
<!-- ... from GEI, ... -->
|
||||
<keyword>goolbar</keyword>
|
||||
<keyword>gstripes</keyword>
|
||||
<keyword>zoolbar</keyword>
|
||||
<keyword>gistbox</keyword>
|
||||
<keyword>gooleditor</keyword>
|
||||
<keyword>galette</keyword>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
<!--
|
||||
Local Variables: mode: sgml coding: utf-8-unix sgml-indent-step: 2 sgml-indent-data: t sgml-set-face: t
|
||||
sgml-insert-missing-element-comment: nil End:
|
||||
-->
|
||||
46
docs/build/highlighting/xslthl-config.xml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
xslthl - XSLT Syntax Highlighting
|
||||
http://sourceforge.net/projects/xslthl/
|
||||
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Michal Molhanec <mol1111 at users.sourceforge.net>
|
||||
Jirka Kosek <kosek at users.sourceforge.net>
|
||||
Michiel Hendriks <elmuerte at users.sourceforge.net>
|
||||
|
||||
-->
|
||||
<xslthl-config>
|
||||
<highlighter id="java" file="java-hl.xml" />
|
||||
<highlighter id="delphi" file="delphi-hl.xml" />
|
||||
<highlighter id="pascal" file="delphi-hl.xml" />
|
||||
<highlighter id="ini" file="ini-hl.xml" />
|
||||
<highlighter id="php" file="php-hl.xml" />
|
||||
<highlighter id="myxml" file="myxml-hl.xml" />
|
||||
<highlighter id="m2" file="m2-hl.xml" />
|
||||
<highlighter id="tcl" file="tcl-hl.xml" />
|
||||
<highlighter id="c" file="c-hl.xml" />
|
||||
<highlighter id="cpp" file="cpp-hl.xml" />
|
||||
<highlighter id="csharp" file="csharp-hl.xml" />
|
||||
<highlighter id="python" file="python-hl.xml" />
|
||||
<highlighter id="ruby" file="ruby-hl.xml" />
|
||||
<highlighter id="perl" file="perl-hl.xml" />
|
||||
<highlighter id="javascript" file="javascript-hl.xml" />
|
||||
<namespace prefix="xslthl" uri="http://xslthl.sf.net" />
|
||||
</xslthl-config>
|
||||
BIN
docs/src/api/doc-files/th-background.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
24
docs/src/api/overview.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<html>
|
||||
<body>
|
||||
This document is the API specification for the Spring Data Hadoop project.
|
||||
<hr/>
|
||||
|
||||
<div id="overviewBody">
|
||||
<!--
|
||||
<p>
|
||||
For further API reference and developer documentation, see the
|
||||
<a href="http://static.springframework.org/spring/docs/2.0.x/reference/index.html" target="_top">Spring Framework reference documentation</a>.
|
||||
That documentation contains more detailed, developer-targeted
|
||||
descriptions, with conceptual overviews, definitions of terms,
|
||||
workarounds, and working code examples.
|
||||
</p>
|
||||
-->
|
||||
<p>
|
||||
If you are interested in commercial training, consultancy and
|
||||
support for the Spring Data Hadoop project,
|
||||
<a href="http://www.SpringSource.com/" target="_top">SpringSource</a> provides
|
||||
such commercial support.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
48
docs/src/api/spring-javadoc.css
Normal file
@@ -0,0 +1,48 @@
|
||||
/* Spring-specific Javadoc style sheet rules */
|
||||
|
||||
#overviewBody {
|
||||
|
||||
}
|
||||
|
||||
.code {
|
||||
border: 1px solid black;
|
||||
background-color: #F4F4F4;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
/* Vanilla Javadoc style sheet rules */
|
||||
|
||||
body {
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
background-color: white;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
td { font-size: 10pt; font-family: Helvetica, Arial, sans-serif }/* Javadoc style sheet */
|
||||
|
||||
/* Define colors, fonts and other style attributes here to override the defaults */
|
||||
|
||||
/* Page background color */
|
||||
body { background-color: #FFFFFF }
|
||||
|
||||
/* Headings */
|
||||
h1 { font-size: 145% }
|
||||
|
||||
/* Table colors */
|
||||
.TableHeadingColor { background: #CCCCFF } /* Dark mauve */
|
||||
.TableSubHeadingColor { background: #EEEEFF } /* Light mauve */
|
||||
.TableRowColor { background: #FFFFFF } /* White */
|
||||
|
||||
/* Font used in left-hand frame lists */
|
||||
.FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif }
|
||||
.FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif }
|
||||
.FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif }
|
||||
|
||||
/* Navigation bar fonts and colors */
|
||||
.NavBarCell1 { background-color:#EEEEFF;} /* Light mauve */
|
||||
.NavBarCell1Rev { background-color:#00008B;} /* Dark Blue */
|
||||
.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;}
|
||||
.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;}
|
||||
|
||||
.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
|
||||
.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
|
||||
28
docs/src/info/changelog.txt
Normal file
@@ -0,0 +1,28 @@
|
||||
SPRING HADOOP CHANGELOG
|
||||
=======================
|
||||
http://www.springsource.org/spring-data/hadoop
|
||||
|
||||
Commit changelog: http://github.com/SpringSource/spring-hadoop/tree/[version]
|
||||
Issues changelog: http://jira.springsource.org/secure/ReleaseNote.jspa?projectId=10801
|
||||
|
||||
|
||||
Changes in version 0.9 RELEASE (2012-02-06)
|
||||
-------------------------------------------
|
||||
|
||||
Spring XML namespace with support for creating and/or configuring
|
||||
- Hadoop Configuration object
|
||||
- MapReduce and Streaming Jobs
|
||||
- HBase configuration
|
||||
- Hive server and Thrift client
|
||||
- Pig server instances that register and execute scripts either locally or remotely
|
||||
- Hadoop DistributedCache
|
||||
Spring XML namespace for executing scripts authored in JSR233 compatible scripting languages
|
||||
Support for executing HDFS operations in Groovy, JRuby, Jython or Rhino based on Hadoop Configuration
|
||||
Embedded shell API for HDFS
|
||||
Spring Batch Integration - tasklets for
|
||||
- Map Reduce and Streaming jobs
|
||||
- Hive
|
||||
- Pig
|
||||
- Script execution
|
||||
Sample applications
|
||||
Reference documentation
|
||||
201
docs/src/info/license.txt
Normal file
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
22
docs/src/info/notice.txt
Normal file
@@ -0,0 +1,22 @@
|
||||
======================================================================
|
||||
== NOTICE file corresponding to section 4 d of the Apache License, ==
|
||||
== Version 2.0, for the Spring Framework distribution. ==
|
||||
======================================================================
|
||||
|
||||
This product includes software developed by
|
||||
the Apache Software Foundation (http://www.apache.org).
|
||||
|
||||
The end-user documentation included with a redistribution, if any,
|
||||
must include the following acknowledgement:
|
||||
|
||||
"This product includes software developed by the Spring Framework
|
||||
Project (http://www.springframework.org)."
|
||||
|
||||
Alternately, this acknowledgement may appear in the software itself,
|
||||
if and wherever such third-party acknowledgements normally appear.
|
||||
|
||||
The names "Spring", "Spring Framework", and "Spring GemFire" must
|
||||
not be used to endorse or promote products derived from this
|
||||
software without prior written permission. For written permission,
|
||||
please contact enquiries@springsource.com.
|
||||
|
||||
27
docs/src/info/readme.txt
Normal file
@@ -0,0 +1,27 @@
|
||||
SPRING DATA HADOOP
|
||||
------------------
|
||||
http://www.springsource.org/spring-data/hadoop
|
||||
|
||||
1. INTRODUCTION
|
||||
|
||||
Spring Hadoop is a framework extension for writing Hadoop jobs that
|
||||
benefit from the features of Spring, Spring Batch and Spring Integration.
|
||||
|
||||
2. RELEASE NOTES
|
||||
|
||||
This release comes with complete reference documentation. For further
|
||||
details, consult the provided javadoc for specific packages and classes.
|
||||
|
||||
3. DISTRIBUTION JAR FILES
|
||||
|
||||
The Spring Hadoop jars files can be found in the 'dist' directory.
|
||||
|
||||
4. GETTING STARTED
|
||||
|
||||
Please see the reference documentation.
|
||||
Additionally the blog at http://blog.springsource.com as well
|
||||
as sections of interest in the reference documentation.
|
||||
|
||||
ADDITIONAL RESOURCES
|
||||
Spring Hadoop Homepage: http://www.springsource.org/spring-data/hadoop
|
||||
Hadoop Homepage: http://hadoop.apache.org
|
||||
35
docs/src/reference/resources/css/highlight.css
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
code highlight CSS resemblign the Eclipse IDE default color schema
|
||||
@author Costin Leau
|
||||
*/
|
||||
|
||||
.hl-keyword {
|
||||
color: #7F0055;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hl-comment {
|
||||
color: #3F5F5F;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hl-multiline-comment {
|
||||
color: #3F5FBF;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hl-tag {
|
||||
color: #3F7F7F;
|
||||
}
|
||||
|
||||
.hl-attribute {
|
||||
color: #7F007F;
|
||||
}
|
||||
|
||||
.hl-value {
|
||||
color: #2A00FF;
|
||||
}
|
||||
|
||||
.hl-string {
|
||||
color: #2A00FF;
|
||||
}
|
||||
99
docs/src/reference/resources/css/manual.css
Normal file
@@ -0,0 +1,99 @@
|
||||
@IMPORT url("highlight.css");
|
||||
|
||||
html {
|
||||
padding: 0pt;
|
||||
margin: 0pt;
|
||||
}
|
||||
|
||||
body {
|
||||
margin-left: 10%;
|
||||
margin-right: 10%;
|
||||
font-family: Arial, Sans-serif;
|
||||
}
|
||||
|
||||
div {
|
||||
margin: 0pt;
|
||||
}
|
||||
|
||||
p {
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
hr {
|
||||
border: 1px solid gray;
|
||||
background: gray;
|
||||
}
|
||||
|
||||
h1,h2,h3,h4 {
|
||||
color: #234623;
|
||||
font-family: Arial, Sans-serif;
|
||||
}
|
||||
|
||||
pre {
|
||||
line-height: 1.0;
|
||||
color: black;
|
||||
}
|
||||
|
||||
pre.programlisting {
|
||||
font-size: 10pt;
|
||||
padding: 7pt 3pt;
|
||||
border: 1pt solid black;
|
||||
background: #eeeeee;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
div.table {
|
||||
margin: 1em;
|
||||
padding: 0.5em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.table table {
|
||||
display: table;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div.table td {
|
||||
padding-left: 7px;
|
||||
padding-right: 7px;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
float: right;
|
||||
margin: 10px 0 10px 30px;
|
||||
padding: 10px 20px 20px 20px;
|
||||
width: 33%;
|
||||
border: 1px solid black;
|
||||
background-color: #F4F4F4;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.mediaobject {
|
||||
padding-top: 30px;
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
|
||||
.legalnotice {
|
||||
font-family: Verdana, Arial, helvetica, sans-serif;
|
||||
font-size: 12px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
p.releaseinfo {
|
||||
font-size: 100%;
|
||||
font-weight: bold;
|
||||
font-family: Verdana, Arial, helvetica, sans-serif;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
p.pubdate {
|
||||
font-size: 120%;
|
||||
font-weight: bold;
|
||||
font-family: Verdana, Arial, helvetica, sans-serif;
|
||||
}
|
||||
|
||||
span.productname {
|
||||
font-size: 200%;
|
||||
font-weight: bold;
|
||||
font-family: Verdana, Arial, helvetica, sans-serif;
|
||||
}
|
||||
BIN
docs/src/reference/resources/images/admon/blank.png
Normal file
|
After Width: | Height: | Size: 374 B |
BIN
docs/src/reference/resources/images/admon/caution.gif
Normal file
|
After Width: | Height: | Size: 743 B |
BIN
docs/src/reference/resources/images/admon/caution.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
docs/src/reference/resources/images/admon/caution.tif
Normal file
BIN
docs/src/reference/resources/images/admon/draft.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
docs/src/reference/resources/images/admon/home.gif
Normal file
|
After Width: | Height: | Size: 321 B |
BIN
docs/src/reference/resources/images/admon/home.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
docs/src/reference/resources/images/admon/important.gif
Normal file
|
After Width: | Height: | Size: 1003 B |
BIN
docs/src/reference/resources/images/admon/important.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
docs/src/reference/resources/images/admon/important.tif
Normal file
BIN
docs/src/reference/resources/images/admon/next.gif
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
docs/src/reference/resources/images/admon/next.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
docs/src/reference/resources/images/admon/note.gif
Normal file
|
After Width: | Height: | Size: 580 B |
BIN
docs/src/reference/resources/images/admon/note.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
docs/src/reference/resources/images/admon/note.tif
Normal file
BIN
docs/src/reference/resources/images/admon/prev.gif
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
docs/src/reference/resources/images/admon/prev.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
docs/src/reference/resources/images/admon/tip.gif
Normal file
|
After Width: | Height: | Size: 598 B |
BIN
docs/src/reference/resources/images/admon/tip.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
docs/src/reference/resources/images/admon/tip.tif
Normal file
BIN
docs/src/reference/resources/images/admon/toc-blank.png
Normal file
|
After Width: | Height: | Size: 318 B |
BIN
docs/src/reference/resources/images/admon/toc-minus.png
Normal file
|
After Width: | Height: | Size: 259 B |
BIN
docs/src/reference/resources/images/admon/toc-plus.png
Normal file
|
After Width: | Height: | Size: 264 B |
BIN
docs/src/reference/resources/images/admon/up.gif
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
docs/src/reference/resources/images/admon/up.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
docs/src/reference/resources/images/admon/warning.gif
Normal file
|
After Width: | Height: | Size: 613 B |
BIN
docs/src/reference/resources/images/admon/warning.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
docs/src/reference/resources/images/admon/warning.tif
Normal file
BIN
docs/src/reference/resources/images/batch-wordcount-ide.jpg
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
docs/src/reference/resources/images/callouts/1.png
Normal file
|
After Width: | Height: | Size: 329 B |
BIN
docs/src/reference/resources/images/callouts/10.png
Normal file
|
After Width: | Height: | Size: 361 B |
BIN
docs/src/reference/resources/images/callouts/11.png
Normal file
|
After Width: | Height: | Size: 565 B |
BIN
docs/src/reference/resources/images/callouts/12.png
Normal file
|
After Width: | Height: | Size: 617 B |
BIN
docs/src/reference/resources/images/callouts/13.png
Normal file
|
After Width: | Height: | Size: 623 B |
BIN
docs/src/reference/resources/images/callouts/14.png
Normal file
|
After Width: | Height: | Size: 411 B |
BIN
docs/src/reference/resources/images/callouts/15.png
Normal file
|
After Width: | Height: | Size: 640 B |
BIN
docs/src/reference/resources/images/callouts/2.png
Normal file
|
After Width: | Height: | Size: 353 B |
BIN
docs/src/reference/resources/images/callouts/3.png
Normal file
|
After Width: | Height: | Size: 350 B |
BIN
docs/src/reference/resources/images/callouts/4.png
Normal file
|
After Width: | Height: | Size: 345 B |
BIN
docs/src/reference/resources/images/callouts/5.png
Normal file
|
After Width: | Height: | Size: 348 B |
BIN
docs/src/reference/resources/images/callouts/6.png
Normal file
|
After Width: | Height: | Size: 355 B |
BIN
docs/src/reference/resources/images/callouts/7.png
Normal file
|
After Width: | Height: | Size: 344 B |
BIN
docs/src/reference/resources/images/callouts/8.png
Normal file
|
After Width: | Height: | Size: 357 B |
BIN
docs/src/reference/resources/images/callouts/9.png
Normal file
|
After Width: | Height: | Size: 357 B |
BIN
docs/src/reference/resources/images/logo.png
Normal file
|
After Width: | Height: | Size: 9.4 KiB |
BIN
docs/src/reference/resources/images/xdev-spring_logo.jpg
Normal file
|
After Width: | Height: | Size: 36 KiB |
449
docs/src/reference/resources/xsl/fopdf.xsl
Normal file
@@ -0,0 +1,449 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
|
||||
This is the XSL FO (PDF) stylesheet for the Spring Data reference
|
||||
documentation.
|
||||
-->
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||
version="1.0">
|
||||
|
||||
|
||||
<xsl:import href="urn:docbkx:stylesheet"/>
|
||||
<xsl:import href="highlight-fo.xsl"/>
|
||||
|
||||
<!--###################################################
|
||||
Custom Title Page
|
||||
################################################### -->
|
||||
|
||||
<xsl:template name="book.titlepage.recto">
|
||||
<fo:block>
|
||||
<fo:table table-layout="fixed" width="175mm">
|
||||
<fo:table-column column-width="175mm"/>
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-cell text-align="center">
|
||||
<!-- Logo
|
||||
<fo:block>
|
||||
<fo:external-graphic src="file:src/docbkx/resources/images/s2_box_logo.png"/>
|
||||
</fo:block>
|
||||
-->
|
||||
<fo:block font-family="Helvetica" font-size="22pt" padding-before="10mm">
|
||||
<xsl:value-of select="bookinfo/subtitle"/>
|
||||
</fo:block>
|
||||
<fo:block font-family="Helvetica" font-size="14pt" padding="10mm">
|
||||
<xsl:value-of select="bookinfo/title"/>
|
||||
</fo:block>
|
||||
<fo:block font-family="Helvetica" font-size="12pt" padding="10mm">
|
||||
<xsl:value-of select="bookinfo/releaseinfo"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row>
|
||||
<fo:table-cell text-align="center">
|
||||
<fo:block font-family="Helvetica" font-size="14pt" padding="10mm">
|
||||
<xsl:value-of select="bookinfo/pubdate"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row>
|
||||
<fo:table-cell text-align="center">
|
||||
<fo:block font-family="Helvetica" font-size="12pt" padding="10mm">
|
||||
<xsl:for-each select="bookinfo/authorgroup/author">
|
||||
<xsl:if test="position() > 1">
|
||||
<xsl:text>, </xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="firstname"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="surname"/>
|
||||
<xsl:text> (</xsl:text>
|
||||
<xsl:value-of select="affiliation"/>
|
||||
<xsl:text>)</xsl:text>
|
||||
</xsl:for-each>
|
||||
</fo:block>
|
||||
<fo:block font-family="Helvetica" font-size="12pt" padding="10mm">
|
||||
<xsl:text>Copyright © 2010-2011</xsl:text>
|
||||
</fo:block>
|
||||
|
||||
<fo:block font-family="Helvetica" font-size="10pt" padding="1mm">
|
||||
<xsl:value-of select="bookinfo/legalnotice"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Prevent blank pages in output -->
|
||||
<xsl:template name="book.titlepage.before.verso">
|
||||
</xsl:template>
|
||||
<xsl:template name="book.titlepage.verso">
|
||||
</xsl:template>
|
||||
<xsl:template name="book.titlepage.separator">
|
||||
</xsl:template>
|
||||
|
||||
<!--###################################################
|
||||
Header
|
||||
################################################### -->
|
||||
|
||||
<!-- More space in the center header for long text -->
|
||||
<xsl:attribute-set name="header.content.properties">
|
||||
<xsl:attribute name="font-family">
|
||||
<xsl:value-of select="$body.font.family"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="margin-left">-5em</xsl:attribute>
|
||||
<xsl:attribute name="margin-right">-5em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!--###################################################
|
||||
Custom Footer
|
||||
################################################### -->
|
||||
<xsl:template name="footer.content">
|
||||
<xsl:param name="pageclass" select="''"/>
|
||||
<xsl:param name="sequence" select="''"/>
|
||||
<xsl:param name="position" select="''"/>
|
||||
<xsl:param name="gentext-key" select="''"/>
|
||||
<xsl:variable name="Version">
|
||||
<xsl:if test="//releaseinfo">
|
||||
<xsl:text>Spring Data Redis (</xsl:text><xsl:value-of select="//releaseinfo" /><xsl:text>)</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$sequence='blank'">
|
||||
<xsl:if test="$position = 'center'">
|
||||
<xsl:value-of select="$Version"/>
|
||||
</xsl:if>
|
||||
</xsl:when>
|
||||
<!-- for double sided printing, print page numbers on alternating sides (of the page) -->
|
||||
<xsl:when test="$double.sided != 0">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$sequence = 'even' and $position='left'">
|
||||
<fo:page-number/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$sequence = 'odd' and $position='right'">
|
||||
<fo:page-number/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$position='center'">
|
||||
<xsl:value-of select="$Version"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<!-- for single sided printing, print all page numbers on the right (of the page) -->
|
||||
<xsl:when test="$double.sided = 0">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$position='center'">
|
||||
<xsl:value-of select="$Version"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$position='right'">
|
||||
<fo:page-number/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!--###################################################
|
||||
Extensions
|
||||
################################################### -->
|
||||
|
||||
<!-- These extensions are required for table printing and other stuff -->
|
||||
<xsl:param name="tablecolumns.extension">0</xsl:param>
|
||||
<!-- FOP provide only PDF Bookmarks at the moment -->
|
||||
<xsl:param name="fop.extensions">1</xsl:param>
|
||||
<xsl:param name="fop1.extensions">1</xsl:param>
|
||||
<xsl:param name="ignore.image.scaling">0</xsl:param>
|
||||
|
||||
<!--###################################################
|
||||
Table Of Contents
|
||||
################################################### -->
|
||||
|
||||
<!-- Generate the TOCs for named components only -->
|
||||
<xsl:param name="generate.toc">
|
||||
book toc
|
||||
</xsl:param>
|
||||
|
||||
<!-- Show only Sections up to level 3 in the TOCs -->
|
||||
<xsl:param name="toc.section.depth">2</xsl:param>
|
||||
|
||||
<!-- Dot and Whitespace as separator in TOC between Label and Title-->
|
||||
<xsl:param name="autotoc.label.separator" select="'. '"/>
|
||||
|
||||
|
||||
<!--###################################################
|
||||
Paper & Page Size
|
||||
################################################### -->
|
||||
|
||||
<!-- Paper type, no headers on blank pages, no double sided printing -->
|
||||
<xsl:param name="paper.type" select="'A4'"/>
|
||||
<xsl:param name="double.sided">0</xsl:param>
|
||||
<xsl:param name="headers.on.blank.pages">0</xsl:param>
|
||||
<xsl:param name="footers.on.blank.pages">0</xsl:param>
|
||||
|
||||
<!-- Space between paper border and content (chaotic stuff, don't touch) -->
|
||||
<xsl:param name="page.margin.top">5mm</xsl:param>
|
||||
<xsl:param name="region.before.extent">10mm</xsl:param>
|
||||
<xsl:param name="body.margin.top">10mm</xsl:param>
|
||||
|
||||
<xsl:param name="body.margin.bottom">15mm</xsl:param>
|
||||
<xsl:param name="region.after.extent">10mm</xsl:param>
|
||||
<xsl:param name="page.margin.bottom">0mm</xsl:param>
|
||||
|
||||
<xsl:param name="page.margin.outer">18mm</xsl:param>
|
||||
<xsl:param name="page.margin.inner">18mm</xsl:param>
|
||||
|
||||
<!-- No intendation of Titles -->
|
||||
<xsl:param name="title.margin.left">0pc</xsl:param>
|
||||
|
||||
<!--###################################################
|
||||
Fonts & Styles
|
||||
################################################### -->
|
||||
|
||||
<!-- Left aligned text and no hyphenation -->
|
||||
<xsl:param name="alignment">justify</xsl:param>
|
||||
<xsl:param name="hyphenate">false</xsl:param>
|
||||
|
||||
<!-- Default Font size -->
|
||||
<xsl:param name="body.font.master">11</xsl:param>
|
||||
<xsl:param name="body.font.small">8</xsl:param>
|
||||
|
||||
<!-- Line height in body text -->
|
||||
<xsl:param name="line-height">1.4</xsl:param>
|
||||
|
||||
<!-- Monospaced fonts are smaller than regular text -->
|
||||
<xsl:attribute-set name="monospace.properties">
|
||||
<xsl:attribute name="font-family">
|
||||
<xsl:value-of select="$monospace.font.family"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="font-size">0.8em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!--###################################################
|
||||
Tables
|
||||
################################################### -->
|
||||
|
||||
<!-- The table width should be adapted to the paper size -->
|
||||
<xsl:param name="default.table.width">17.4cm</xsl:param>
|
||||
|
||||
<!-- Some padding inside tables -->
|
||||
<xsl:attribute-set name="table.cell.padding">
|
||||
<xsl:attribute name="padding-left">4pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-right">4pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-top">4pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-bottom">4pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Only hairlines as frame and cell borders in tables -->
|
||||
<xsl:param name="table.frame.border.thickness">0.1pt</xsl:param>
|
||||
<xsl:param name="table.cell.border.thickness">0.1pt</xsl:param>
|
||||
|
||||
<!--###################################################
|
||||
Labels
|
||||
################################################### -->
|
||||
|
||||
<!-- Label Chapters and Sections (numbering) -->
|
||||
<xsl:param name="chapter.autolabel">1</xsl:param>
|
||||
<xsl:param name="section.autolabel" select="1"/>
|
||||
<xsl:param name="section.label.includes.component.label" select="1"/>
|
||||
|
||||
<!--###################################################
|
||||
Titles
|
||||
################################################### -->
|
||||
|
||||
<!-- Chapter title size -->
|
||||
<xsl:attribute-set name="chapter.titlepage.recto.style">
|
||||
<xsl:attribute name="text-align">left</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master * 1.8"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Why is the font-size for chapters hardcoded in the XSL FO templates?
|
||||
Let's remove it, so this sucker can use our attribute-set only... -->
|
||||
<xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
|
||||
<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||
xsl:use-attribute-sets="chapter.titlepage.recto.style">
|
||||
<xsl:call-template name="component.title">
|
||||
<xsl:with-param name="node" select="ancestor-or-self::chapter[1]"/>
|
||||
</xsl:call-template>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Sections 1, 2 and 3 titles have a small bump factor and padding -->
|
||||
<xsl:attribute-set name="section.title.level1.properties">
|
||||
<xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master * 1.5"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="section.title.level2.properties">
|
||||
<xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">0.6em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.6em</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master * 1.25"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="section.title.level3.properties">
|
||||
<xsl:attribute name="space-before.optimum">0.4em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.4em</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master * 1.0"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Titles of formal objects (tables, examples, ...) -->
|
||||
<xsl:attribute-set name="formal.title.properties" use-attribute-sets="normal.para.spacing">
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="hyphenate">false</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.6em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.8em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!--###################################################
|
||||
Programlistings
|
||||
################################################### -->
|
||||
|
||||
<!-- Verbatim text formatting (programlistings) -->
|
||||
<xsl:attribute-set name="monospace.verbatim.properties">
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.small * 1.0"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="verbatim.properties">
|
||||
<xsl:attribute name="space-before.minimum">1em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.optimum">1em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">1em</xsl:attribute>
|
||||
<xsl:attribute name="border-color">#444444</xsl:attribute>
|
||||
<xsl:attribute name="border-style">solid</xsl:attribute>
|
||||
<xsl:attribute name="border-width">0.1pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-top">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="padding-left">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="padding-right">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="padding-bottom">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="margin-left">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="margin-right">0.5em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Shade (background) programlistings -->
|
||||
<xsl:param name="shade.verbatim">1</xsl:param>
|
||||
<xsl:attribute-set name="shade.verbatim.style">
|
||||
<xsl:attribute name="background-color">#F0F0F0</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!--###################################################
|
||||
Callouts
|
||||
################################################### -->
|
||||
|
||||
<!-- Use images for callouts instead of (1) (2) (3) -->
|
||||
<xsl:param name="callout.graphics">0</xsl:param>
|
||||
<xsl:param name="callout.unicode">1</xsl:param>
|
||||
|
||||
<!-- Place callout marks at this column in annotated areas -->
|
||||
<xsl:param name="callout.defaultcolumn">90</xsl:param>
|
||||
|
||||
<!--###################################################
|
||||
Admonitions
|
||||
################################################### -->
|
||||
|
||||
<!-- Use nice graphics for admonitions -->
|
||||
<xsl:param name="admon.graphics">'1'</xsl:param>
|
||||
<xsl:param name="admon.graphics.path">src/docbkx/resources/images/admons/</xsl:param>
|
||||
|
||||
<!--###################################################
|
||||
Misc
|
||||
################################################### -->
|
||||
|
||||
<!-- Placement of titles -->
|
||||
<xsl:param name="formal.title.placement">
|
||||
figure after
|
||||
example before
|
||||
equation before
|
||||
table before
|
||||
procedure before
|
||||
</xsl:param>
|
||||
|
||||
<!-- Format Variable Lists as Blocks (prevents horizontal overflow) -->
|
||||
<xsl:param name="variablelist.as.blocks">1</xsl:param>
|
||||
|
||||
<!-- The horrible list spacing problems -->
|
||||
<xsl:attribute-set name="list.block.spacing">
|
||||
<xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!--###################################################
|
||||
colored and hyphenated links
|
||||
################################################### -->
|
||||
<xsl:template match="ulink">
|
||||
<fo:basic-link external-destination="{@url}"
|
||||
xsl:use-attribute-sets="xref.properties"
|
||||
text-decoration="underline"
|
||||
color="blue">
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(child::node())=0">
|
||||
<xsl:value-of select="@url"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</fo:basic-link>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="link">
|
||||
<fo:basic-link internal-destination="{@linkend}"
|
||||
xsl:use-attribute-sets="xref.properties"
|
||||
text-decoration="underline"
|
||||
color="blue">
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(child::node())=0">
|
||||
<xsl:value-of select="@linkend"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</fo:basic-link>
|
||||
</xsl:template>
|
||||
<!--
|
||||
|
||||
<xsl:template match="xref">
|
||||
<fo:basic-link internal-destination="{@linkend}"
|
||||
xsl:use-attribute-sets="xref.properties"
|
||||
text-decoration="underline"
|
||||
color="blue">
|
||||
<xsl:apply-templates/>
|
||||
</fo:basic-link>
|
||||
</xsl:template>
|
||||
-->
|
||||
|
||||
</xsl:stylesheet>
|
||||
44
docs/src/reference/resources/xsl/highlight-fo.xsl
Normal 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 olor="#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>
|
||||
42
docs/src/reference/resources/xsl/highlight.xsl
Normal 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>
|
||||
145
docs/src/reference/resources/xsl/html-custom.xsl
Normal file
@@ -0,0 +1,145 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<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:import href="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/>
|
||||
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/highlight.xsl"/>
|
||||
|
||||
<xsl:param name="chunk.section.depth">'5'</xsl:param>
|
||||
<xsl:param name="use.id.as.filename">'1'</xsl:param>
|
||||
|
||||
<!-- Only use scaling in FO -->
|
||||
<xsl:param name="ignore.image.scaling">1</xsl:param>
|
||||
|
||||
<!-- Use code syntax highlighting -->
|
||||
<xsl:param name="highlight.source">1</xsl:param>
|
||||
|
||||
<!-- Extensions -->
|
||||
<xsl:param name="use.extensions">0</xsl:param>
|
||||
<xsl:param name="tablecolumns.extension">0</xsl:param>
|
||||
<xsl:param name="callout.extensions">1</xsl:param>
|
||||
|
||||
<!-- Activate Graphics -->
|
||||
<xsl:param name="admon.graphics" select="1"/>
|
||||
<xsl:param name="admon.graphics.path">images/admon/</xsl:param>
|
||||
<xsl:param name="admon.graphics.extension">.png</xsl:param>
|
||||
<xsl:param name="callout.graphics" select="1" />
|
||||
<xsl:param name="callout.defaultcolumn">120</xsl:param>
|
||||
<xsl:param name="callout.graphics.path">images/callouts/</xsl:param>
|
||||
<xsl:param name="callout.graphics.extension">.png</xsl:param>
|
||||
|
||||
<xsl:param name="table.borders.with.css" select="1"/>
|
||||
<xsl:param name="html.stylesheet">css/manual.css</xsl:param>
|
||||
<xsl:param name="html.stylesheet.type">text/css</xsl:param>
|
||||
<xsl:param name="generate.toc">book toc,title</xsl:param>
|
||||
|
||||
<xsl:param name="admonition.title.properties">text-align: left</xsl:param>
|
||||
|
||||
<!-- Leave image paths as relative when navigating XInclude -->
|
||||
<xsl:param name="keep.relative.image.uris" select="1"/>
|
||||
|
||||
<!-- Label Chapters and Sections (numbering) -->
|
||||
<xsl:param name="chapter.autolabel" select="1"/>
|
||||
<xsl:param name="section.autolabel" select="1"/>
|
||||
<xsl:param name="section.autolabel.max.depth" select="2"/>
|
||||
|
||||
<xsl:param name="section.label.includes.component.label" select="1"/>
|
||||
<xsl:param name="table.footnote.number.format" select="'1'"/>
|
||||
|
||||
<!-- Show only Sections up to level 3 in the TOCs -->
|
||||
<xsl:param name="toc.section.depth">3</xsl:param>
|
||||
|
||||
<!-- Remove "Chapter" from the Chapter titles... -->
|
||||
<xsl:param name="local.l10n.xml" select="document('')"/>
|
||||
<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
|
||||
<l:l10n language="en">
|
||||
<l:context name="title-numbered">
|
||||
<l:template name="chapter" text="%n. %t"/>
|
||||
<l:template name="section" text="%n %t"/>
|
||||
</l:context>
|
||||
</l:l10n>
|
||||
</l:i18n>
|
||||
|
||||
<xsl:template match='xslthl:keyword' mode="xslthl">
|
||||
<span class="hl-keyword"><xsl:apply-templates mode="xslthl"/></span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='xslthl:comment' mode="xslthl">
|
||||
<span class="hl-comment"><xsl:apply-templates mode="xslthl"/></span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='xslthl:oneline-comment' mode="xslthl">
|
||||
<span class="hl-comment"><xsl:apply-templates mode="xslthl"/></span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='xslthl:multiline-comment' mode="xslthl">
|
||||
<span class="hl-multiline-comment"><xsl:apply-templates mode="xslthl"/></span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='xslthl:tag' mode="xslthl">
|
||||
<span class="hl-tag"><xsl:apply-templates mode="xslthl"/></span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='xslthl:attribute' mode="xslthl">
|
||||
<span class="hl-attribute"><xsl:apply-templates mode="xslthl"/></span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='xslthl:value' mode="xslthl">
|
||||
<span class="hl-value"><xsl:apply-templates mode="xslthl"/></span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='xslthl:string' mode="xslthl">
|
||||
<span class="hl-string"><xsl:apply-templates mode="xslthl"/></span>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Google Analytics -->
|
||||
<xsl:template name="user.head.content">
|
||||
<xsl:comment>Begin Google Analytics code</xsl:comment>
|
||||
<script type="text/javascript">
|
||||
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
||||
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var pageTracker = _gat._getTracker("UA-2728886-3");
|
||||
pageTracker._setDomainName("none");
|
||||
pageTracker._setAllowLinker(true);
|
||||
pageTracker._trackPageview();
|
||||
</script>
|
||||
<xsl:comment>End Google Analytics code</xsl:comment>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Loopfuse -->
|
||||
<xsl:template name="user.footer.content">
|
||||
<xsl:comment>Begin LoopFuse code</xsl:comment>
|
||||
<script src="http://loopfuse.net/webrecorder/js/listen.js" type="text/javascript">
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
_lf_cid = "LF_48be82fa";
|
||||
_lf_remora();
|
||||
</script>
|
||||
<xsl:comment>End LoopFuse code</xsl:comment>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
142
docs/src/reference/resources/xsl/html-single-custom.xsl
Normal file
@@ -0,0 +1,142 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<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:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/>
|
||||
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/highlight.xsl"/>
|
||||
|
||||
<!-- Only use scaling in FO -->
|
||||
<xsl:param name="ignore.image.scaling">1</xsl:param>
|
||||
|
||||
<!-- Use code syntax highlighting -->
|
||||
<xsl:param name="highlight.source">1</xsl:param>
|
||||
|
||||
<!-- Extensions -->
|
||||
<xsl:param name="use.extensions">0</xsl:param>
|
||||
<xsl:param name="tablecolumns.extension">0</xsl:param>
|
||||
<xsl:param name="callout.extensions">1</xsl:param>
|
||||
|
||||
<!-- Activate Graphics -->
|
||||
<xsl:param name="admon.graphics" select="1"/>
|
||||
<xsl:param name="admon.graphics.path">images/admon/</xsl:param>
|
||||
<xsl:param name="admon.graphics.extension">.png</xsl:param>
|
||||
<xsl:param name="callout.graphics" select="1" />
|
||||
<xsl:param name="callout.defaultcolumn">120</xsl:param>
|
||||
<xsl:param name="callout.graphics.path">images/callouts/</xsl:param>
|
||||
<xsl:param name="callout.graphics.extension">.png</xsl:param>
|
||||
|
||||
<xsl:param name="table.borders.with.css" select="1"/>
|
||||
<xsl:param name="html.stylesheet">css/manual.css</xsl:param>
|
||||
<xsl:param name="html.stylesheet.type">text/css</xsl:param>
|
||||
<xsl:param name="generate.toc">book toc,title</xsl:param>
|
||||
|
||||
<xsl:param name="admonition.title.properties">text-align: left</xsl:param>
|
||||
|
||||
<!-- Leave image paths as relative when navigating XInclude -->
|
||||
<xsl:param name="keep.relative.image.uris" select="1"/>
|
||||
|
||||
<!-- Label Chapters and Sections (numbering) -->
|
||||
<xsl:param name="chapter.autolabel" select="1"/>
|
||||
<xsl:param name="section.autolabel" select="1"/>
|
||||
<xsl:param name="section.autolabel.max.depth" select="2"/>
|
||||
|
||||
<xsl:param name="section.label.includes.component.label" select="1"/>
|
||||
<xsl:param name="table.footnote.number.format" select="'1'"/>
|
||||
|
||||
<!-- Show only Sections up to level 2 in the TOCs -->
|
||||
<xsl:param name="toc.section.depth">2</xsl:param>
|
||||
|
||||
<!-- Remove "Chapter" from the Chapter titles... -->
|
||||
<xsl:param name="local.l10n.xml" select="document('')"/>
|
||||
<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
|
||||
<l:l10n language="en">
|
||||
<l:context name="title-numbered">
|
||||
<l:template name="chapter" text="%n. %t"/>
|
||||
<l:template name="section" text="%n %t"/>
|
||||
</l:context>
|
||||
</l:l10n>
|
||||
</l:i18n>
|
||||
|
||||
<xsl:template match='xslthl:keyword' mode="xslthl">
|
||||
<span class="hl-keyword"><xsl:apply-templates mode="xslthl"/></span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='xslthl:comment' mode="xslthl">
|
||||
<span class="hl-comment"><xsl:apply-templates mode="xslthl"/></span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='xslthl:oneline-comment' mode="xslthl">
|
||||
<span class="hl-comment"><xsl:apply-templates mode="xslthl"/></span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='xslthl:multiline-comment' mode="xslthl">
|
||||
<span class="hl-multiline-comment"><xsl:apply-templates mode="xslthl"/></span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='xslthl:tag' mode="xslthl">
|
||||
<span class="hl-tag"><xsl:apply-templates mode="xslthl"/></span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='xslthl:attribute' mode="xslthl">
|
||||
<span class="hl-attribute"><xsl:apply-templates mode="xslthl"/></span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='xslthl:value' mode="xslthl">
|
||||
<span class="hl-value"><xsl:apply-templates mode="xslthl"/></span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='xslthl:string' mode="xslthl">
|
||||
<span class="hl-string"><xsl:apply-templates mode="xslthl"/></span>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Google Analytics -->
|
||||
<xsl:template name="user.head.content">
|
||||
<xsl:comment>Begin Google Analytics code</xsl:comment>
|
||||
<script type="text/javascript">
|
||||
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
||||
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var pageTracker = _gat._getTracker("UA-2728886-3");
|
||||
pageTracker._setDomainName("none");
|
||||
pageTracker._setAllowLinker(true);
|
||||
pageTracker._trackPageview();
|
||||
</script>
|
||||
<xsl:comment>End Google Analytics code</xsl:comment>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Loopfuse -->
|
||||
<xsl:template name="user.footer.content">
|
||||
<xsl:comment>Begin LoopFuse code</xsl:comment>
|
||||
<script src="http://loopfuse.net/webrecorder/js/listen.js" type="text/javascript">
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
_lf_cid = "LF_48be82fa";
|
||||
_lf_remora();
|
||||
</script>
|
||||
<xsl:comment>End LoopFuse code</xsl:comment>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
107
docs/src/reference/resources/xsl/html.xsl
Normal file
@@ -0,0 +1,107 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This is the XSL HTML configuration file for the Spring
|
||||
Reference Documentation.
|
||||
-->
|
||||
<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:import href="urn:docbkx:stylesheet"/>
|
||||
<xsl:import href="highlight.xsl"/>
|
||||
|
||||
<!--###################################################
|
||||
HTML Settings
|
||||
################################################### -->
|
||||
|
||||
<!-- These extensions are required for table printing and other stuff -->
|
||||
<xsl:param name="tablecolumns.extension">0</xsl:param>
|
||||
<xsl:param name="graphicsize.extension">0</xsl:param>
|
||||
<xsl:param name="ignore.image.scaling">1</xsl:param>
|
||||
|
||||
<!--###################################################
|
||||
Table Of Contents
|
||||
################################################### -->
|
||||
|
||||
<!-- Generate the TOCs for named components only -->
|
||||
<xsl:param name="generate.toc">
|
||||
book toc
|
||||
</xsl:param>
|
||||
|
||||
<!-- Show only Sections up to level 3 in the TOCs -->
|
||||
<xsl:param name="toc.section.depth">3</xsl:param>
|
||||
|
||||
<!--###################################################
|
||||
Labels
|
||||
################################################### -->
|
||||
|
||||
<!-- Label Chapters and Sections (numbering) -->
|
||||
<xsl:param name="chapter.autolabel">1</xsl:param>
|
||||
<xsl:param name="section.autolabel" select="1"/>
|
||||
<xsl:param name="section.label.includes.component.label" select="1"/>
|
||||
|
||||
<!--###################################################
|
||||
Callouts
|
||||
################################################### -->
|
||||
|
||||
<!-- Use images for callouts instead of (1) (2) (3) -->
|
||||
<xsl:param name="callout.graphics">1</xsl:param>
|
||||
|
||||
<!-- Place callout marks at this column in annotated areas -->
|
||||
<xsl:param name="callout.defaultcolumn">90</xsl:param>
|
||||
|
||||
<!--###################################################
|
||||
Admonitions
|
||||
################################################### -->
|
||||
|
||||
<!-- Use nice graphics for admonitions -->
|
||||
<xsl:param name="admon.graphics">1</xsl:param>
|
||||
<xsl:param name="admon.graphics.path">images/admons/</xsl:param>
|
||||
<!--###################################################
|
||||
Misc
|
||||
################################################### -->
|
||||
<!-- Placement of titles -->
|
||||
<xsl:param name="formal.title.placement">
|
||||
figure after
|
||||
example before
|
||||
equation before
|
||||
table before
|
||||
procedure before
|
||||
</xsl:param>
|
||||
<xsl:template match="author" mode="titlepage.mode">
|
||||
<xsl:if test="name(preceding-sibling::*[1]) = 'author'">
|
||||
<xsl:text>, </xsl:text>
|
||||
</xsl:if>
|
||||
<span class="{name(.)}">
|
||||
<xsl:call-template name="person.name"/>
|
||||
(<xsl:value-of select="affiliation"/>)
|
||||
<xsl:apply-templates mode="titlepage.mode" select="./contrib"/>
|
||||
</span>
|
||||
</xsl:template>
|
||||
<xsl:template match="authorgroup" mode="titlepage.mode">
|
||||
<div class="{name(.)}">
|
||||
<h2>Authors</h2>
|
||||
<p/>
|
||||
<xsl:apply-templates mode="titlepage.mode"/>
|
||||
</div>
|
||||
</xsl:template>
|
||||
<!--###################################################
|
||||
Headers and Footers
|
||||
################################################### -->
|
||||
<!-- let's have a Spring and I21 banner across the top of each page -->
|
||||
<xsl:template name="user.header.navigation">
|
||||
<div style="background-color:white;border:none;height:73px;border:1px solid black;">
|
||||
<a style="border:none;" href="http://www.springframework.org/osgi/"
|
||||
title="The Spring Framework - Spring Data">
|
||||
<img style="border:none;" src="images/xdev-spring_logo.jpg"/>
|
||||
</a>
|
||||
<a style="border:none;" href="http://www.SpringSource.com/" title="SpringSource - Spring from the Source">
|
||||
<img style="border:none;position:absolute;padding-top:5px;right:42px;" src="images/s2-banner-rhs.png"/>
|
||||
</a>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
||||
221
docs/src/reference/resources/xsl/html_chunk.xsl
Normal file
@@ -0,0 +1,221 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This is the XSL HTML configuration file for the Spring Reference Documentation.
|
||||
-->
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||
version="1.0">
|
||||
|
||||
<xsl:import href="urn:docbkx:stylesheet"/>
|
||||
<xsl:import href="highlight.xsl"/>
|
||||
|
||||
|
||||
<!--###################################################
|
||||
HTML Settings
|
||||
################################################### -->
|
||||
<xsl:param name="chunk.section.depth">'5'</xsl:param>
|
||||
<xsl:param name="use.id.as.filename">'1'</xsl:param>
|
||||
<xsl:param name="tablecolumns.extension">0</xsl:param>
|
||||
<xsl:param name="graphicsize.extension">0</xsl:param>
|
||||
<xsl:param name="ignore.image.scaling">1</xsl:param>
|
||||
<!--###################################################
|
||||
Table Of Contents
|
||||
################################################### -->
|
||||
<!-- Generate the TOCs for named components only -->
|
||||
<xsl:param name="generate.toc">
|
||||
book toc
|
||||
qandaset toc
|
||||
</xsl:param>
|
||||
<!-- Show only Sections up to level 3 in the TOCs -->
|
||||
<xsl:param name="toc.section.depth">3</xsl:param>
|
||||
<!--###################################################
|
||||
Labels
|
||||
################################################### -->
|
||||
<!-- Label Chapters and Sections (numbering) -->
|
||||
<xsl:param name="chapter.autolabel">1</xsl:param>
|
||||
<xsl:param name="section.autolabel" select="1"/>
|
||||
<xsl:param name="section.label.includes.component.label" select="1"/>
|
||||
<!--###################################################
|
||||
Callouts
|
||||
################################################### -->
|
||||
<!-- Place callout marks at this column in annotated areas -->
|
||||
<xsl:param name="callout.graphics">1</xsl:param>
|
||||
<xsl:param name="callout.defaultcolumn">90</xsl:param>
|
||||
|
||||
<!--###################################################
|
||||
Admonitions
|
||||
################################################### -->
|
||||
|
||||
<!-- Use nice graphics for admonitions -->
|
||||
<xsl:param name="admon.graphics">1</xsl:param>
|
||||
<xsl:param name="admon.graphics.path">images/admons/</xsl:param>
|
||||
<!--###################################################
|
||||
Misc
|
||||
################################################### -->
|
||||
<!-- Placement of titles -->
|
||||
<xsl:param name="formal.title.placement">
|
||||
figure after
|
||||
example before
|
||||
equation before
|
||||
table before
|
||||
procedure before
|
||||
</xsl:param>
|
||||
<xsl:template match="author" mode="titlepage.mode">
|
||||
<xsl:if test="name(preceding-sibling::*[1]) = 'author'">
|
||||
<xsl:text>, </xsl:text>
|
||||
</xsl:if>
|
||||
<span class="{name(.)}">
|
||||
<xsl:call-template name="person.name"/>
|
||||
(<xsl:value-of select="affiliation"/>)
|
||||
<xsl:apply-templates mode="titlepage.mode" select="./contrib"/>
|
||||
<!--
|
||||
<xsl:apply-templates mode="titlepage.mode" select="./affiliation"/>
|
||||
-->
|
||||
</span>
|
||||
</xsl:template>
|
||||
<xsl:template match="authorgroup" mode="titlepage.mode">
|
||||
<div class="{name(.)}">
|
||||
<h2>Authors</h2>
|
||||
<p/>
|
||||
<xsl:apply-templates mode="titlepage.mode"/>
|
||||
</div>
|
||||
</xsl:template>
|
||||
<!--###################################################
|
||||
Headers and Footers
|
||||
################################################### -->
|
||||
<!-- let's have a Spring and I21 banner across the top of each page -->
|
||||
<xsl:template name="user.header.navigation">
|
||||
<div style="background-color:white;border:none;height:73px;border:1px solid black;">
|
||||
<a style="border:none;" href="http://www.springframework.org/osgi/"
|
||||
title="The Spring Framework - Spring Data">
|
||||
<img style="border:none;" src="images/xdev-spring_logo.jpg"/>
|
||||
</a>
|
||||
<a style="border:none;" href="http://www.SpringSource.com/" title="SpringSource - Spring from the Source">
|
||||
<img style="border:none;position:absolute;padding-top:5px;right:42px;" src="images/s2-banner-rhs.png"/>
|
||||
</a>
|
||||
</div>
|
||||
</xsl:template>
|
||||
<!-- no other header navigation (prev, next, etc.) -->
|
||||
<xsl:template name="header.navigation"/>
|
||||
<xsl:param name="navig.showtitles">1</xsl:param>
|
||||
<!-- let's have a 'Sponsored by SpringSource' strapline (or somesuch) across the bottom of each page -->
|
||||
<xsl:template name="footer.navigation">
|
||||
<xsl:param name="prev" select="/foo"/>
|
||||
<xsl:param name="next" select="/foo"/>
|
||||
<xsl:param name="nav.context"/>
|
||||
<xsl:variable name="home" select="/*[1]"/>
|
||||
<xsl:variable name="up" select="parent::*"/>
|
||||
<xsl:variable name="row1" select="count($prev) > 0
|
||||
or count($up) > 0
|
||||
or count($next) > 0"/>
|
||||
<xsl:variable name="row2" select="($prev and $navig.showtitles != 0)
|
||||
or (generate-id($home) != generate-id(.)
|
||||
or $nav.context = 'toc')
|
||||
or ($chunk.tocs.and.lots != 0
|
||||
and $nav.context != 'toc')
|
||||
or ($next and $navig.showtitles != 0)"/>
|
||||
<xsl:if test="$suppress.navigation = '0' and $suppress.footer.navigation = '0'">
|
||||
<div class="navfooter">
|
||||
<xsl:if test="$footer.rule != 0">
|
||||
<hr/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$row1 or $row2">
|
||||
<table width="100%" summary="Navigation footer">
|
||||
<xsl:if test="$row1">
|
||||
<tr>
|
||||
<td width="40%" align="left">
|
||||
<xsl:if test="count($prev)>0">
|
||||
<a accesskey="p">
|
||||
<xsl:attribute name="href">
|
||||
<xsl:call-template name="href.target">
|
||||
<xsl:with-param name="object" select="$prev"/>
|
||||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
<xsl:call-template name="navig.content">
|
||||
<xsl:with-param name="direction" select="'prev'"/>
|
||||
</xsl:call-template>
|
||||
</a>
|
||||
</xsl:if>
|
||||
<xsl:text> </xsl:text>
|
||||
</td>
|
||||
|
||||
<td width="20%" align="center">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$home != . or $nav.context = 'toc'">
|
||||
<a accesskey="h">
|
||||
<xsl:attribute name="href">
|
||||
<xsl:call-template name="href.target">
|
||||
<xsl:with-param name="object" select="$home"/>
|
||||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
<xsl:call-template name="navig.content">
|
||||
<xsl:with-param name="direction" select="'home'"/>
|
||||
</xsl:call-template>
|
||||
</a>
|
||||
<xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
|
||||
<xsl:text> | </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:when>
|
||||
<xsl:otherwise> </xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
|
||||
<a accesskey="t">
|
||||
<xsl:attribute name="href">
|
||||
<xsl:apply-templates select="/*[1]" mode="recursive-chunk-filename">
|
||||
<xsl:with-param name="recursive" select="true()"/>
|
||||
</xsl:apply-templates>
|
||||
<xsl:text>-toc</xsl:text>
|
||||
<xsl:value-of select="$html.ext"/>
|
||||
</xsl:attribute>
|
||||
<xsl:call-template name="gentext">
|
||||
<xsl:with-param name="key" select="'nav-toc'"/>
|
||||
</xsl:call-template>
|
||||
</a>
|
||||
</xsl:if>
|
||||
</td>
|
||||
<td width="40%" align="right">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:if test="count($next)>0">
|
||||
<a accesskey="n">
|
||||
<xsl:attribute name="href">
|
||||
<xsl:call-template name="href.target">
|
||||
<xsl:with-param name="object" select="$next"/>
|
||||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
<xsl:call-template name="navig.content">
|
||||
<xsl:with-param name="direction" select="'next'"/>
|
||||
</xsl:call-template>
|
||||
</a>
|
||||
</xsl:if>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<xsl:if test="$row2">
|
||||
<tr>
|
||||
<td width="40%" align="left" valign="top">
|
||||
<xsl:if test="$navig.showtitles != 0">
|
||||
<xsl:apply-templates select="$prev" mode="object.title.markup"/>
|
||||
</xsl:if>
|
||||
<xsl:text> </xsl:text>
|
||||
</td>
|
||||
<td width="20%" align="center">
|
||||
<span style="color:white;font-size:90%;">
|
||||
<a href="http://www.SpringSource.com/"
|
||||
title="SpringSource - Spring from the Source">Sponsored by SpringSource
|
||||
</a>
|
||||
</span>
|
||||
</td>
|
||||
<td width="40%" align="right" valign="top">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:if test="$navig.showtitles != 0">
|
||||
<xsl:apply-templates select="$next" mode="object.title.markup"/>
|
||||
</xsl:if>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
</table>
|
||||
</xsl:if>
|
||||
</div>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
522
docs/src/reference/resources/xsl/pdf-custom.xsl
Normal file
@@ -0,0 +1,522 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<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:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
|
||||
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/highlight.xsl"/>
|
||||
|
||||
<!-- Use nice graphics for admonitions -->
|
||||
<xsl:param name="admon.graphics">'1'</xsl:param>
|
||||
<xsl:param name="admon.graphics.path">images/admon/</xsl:param>
|
||||
<xsl:param name="admon.graphics.extension">.png</xsl:param>
|
||||
|
||||
<!-- resize the admon graphics. they're width 36pt by default
|
||||
even though the graphics that ship with docbook are 24x24 -->
|
||||
<xsl:template match="*" mode="admon.graphic.width">
|
||||
<xsl:param name="node" select="."/>
|
||||
<xsl:text>24pt</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:param name="paper.type" select="'A4'"/>
|
||||
<xsl:param name="page.margin.top" select="'1cm'"/>
|
||||
<xsl:param name="region.before.extent" select="'1cm'"/>
|
||||
<xsl:param name="body.margin.top" select="'1.5cm'"/>
|
||||
|
||||
<xsl:param name="body.margin.bottom" select="'1.5cm'"/>
|
||||
<xsl:param name="region.after.extent" select="'1cm'"/>
|
||||
<xsl:param name="page.margin.bottom" select="'1cm'"/>
|
||||
<xsl:param name="title.margin.left" select="'0cm'"/>
|
||||
|
||||
<!--###################################################
|
||||
Header
|
||||
################################################### -->
|
||||
|
||||
<!-- More space in the center header for long text -->
|
||||
<xsl:attribute-set name="header.content.properties">
|
||||
<xsl:attribute name="font-family">
|
||||
<xsl:value-of select="$body.font.family"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="margin-left">-5em</xsl:attribute>
|
||||
<xsl:attribute name="margin-right">-5em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!--###################################################
|
||||
Table of Contents
|
||||
################################################### -->
|
||||
|
||||
<xsl:param name="generate.toc">
|
||||
book toc,title
|
||||
</xsl:param>
|
||||
|
||||
<!--###################################################
|
||||
Custom Header
|
||||
################################################### -->
|
||||
|
||||
<xsl:template name="header.content">
|
||||
<xsl:param name="pageclass" select="''"/>
|
||||
<xsl:param name="sequence" select="''"/>
|
||||
<xsl:param name="position" select="''"/>
|
||||
<xsl:param name="gentext-key" select="''"/>
|
||||
|
||||
<xsl:variable name="Version">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//productname">
|
||||
<xsl:value-of select="//productname"/><xsl:text> </xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>please define productname in your docbook file!</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$sequence='blank'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$position='center'">
|
||||
<xsl:value-of select="$Version"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$pageclass='titlepage'">
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$position='center'">
|
||||
<xsl:value-of select="$Version"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!--###################################################
|
||||
Custom Footer
|
||||
################################################### -->
|
||||
|
||||
<xsl:template name="footer.content">
|
||||
<xsl:param name="pageclass" select="''"/>
|
||||
<xsl:param name="sequence" select="''"/>
|
||||
<xsl:param name="position" select="''"/>
|
||||
<xsl:param name="gentext-key" select="''"/>
|
||||
|
||||
<xsl:variable name="Version">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//releaseinfo">
|
||||
<xsl:value-of select="//releaseinfo"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="Title">
|
||||
<xsl:value-of select="//title"/>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$sequence='blank'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$double.sided != 0 and $position = 'left'">
|
||||
<xsl:value-of select="$Version"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$double.sided = 0 and $position = 'center'">
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
<fo:page-number/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$pageclass='titlepage'">
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$double.sided != 0 and $sequence = 'even' and $position='left'">
|
||||
<fo:page-number/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$double.sided != 0 and $sequence = 'odd' and $position='right'">
|
||||
<fo:page-number/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$double.sided = 0 and $position='right'">
|
||||
<fo:page-number/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$double.sided != 0 and $sequence = 'odd' and $position='left'">
|
||||
<xsl:value-of select="$Version"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$double.sided != 0 and $sequence = 'even' and $position='right'">
|
||||
<xsl:value-of select="$Version"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$double.sided = 0 and $position='left'">
|
||||
<xsl:value-of select="$Version"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$position='center'">
|
||||
<xsl:value-of select="$Title"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="processing-instruction('hard-pagebreak')">
|
||||
<fo:block break-before='page'/>
|
||||
</xsl:template>
|
||||
|
||||
<!--###################################################
|
||||
Extensions
|
||||
################################################### -->
|
||||
|
||||
<!-- These extensions are required for table printing and other stuff -->
|
||||
<xsl:param name="use.extensions">0</xsl:param>
|
||||
<xsl:param name="tablecolumns.extension">0</xsl:param>
|
||||
<xsl:param name="callout.extensions">0</xsl:param>
|
||||
<xsl:param name="callouts.extensions">0</xsl:param>
|
||||
<xsl:param name="fop1.extensions">1</xsl:param>
|
||||
|
||||
<!--###################################################
|
||||
Paper & Page Size
|
||||
################################################### -->
|
||||
|
||||
<!-- Paper type, no headers on blank pages, no double sided printing -->
|
||||
<xsl:param name="double.sided">0</xsl:param>
|
||||
<xsl:param name="headers.on.blank.pages">0</xsl:param>
|
||||
<xsl:param name="footers.on.blank.pages">0</xsl:param>
|
||||
|
||||
<!--###################################################
|
||||
Fonts & Styles
|
||||
################################################### -->
|
||||
|
||||
<xsl:param name="hyphenate">false</xsl:param>
|
||||
|
||||
<!-- Default Font size -->
|
||||
<xsl:param name="body.font.master">11</xsl:param>
|
||||
<xsl:param name="body.font.small">8</xsl:param>
|
||||
|
||||
<!-- Line height in body text -->
|
||||
<xsl:param name="line-height">1.4</xsl:param>
|
||||
|
||||
<!-- Chapter title size -->
|
||||
<xsl:attribute-set name="chapter.titlepage.recto.style">
|
||||
<xsl:attribute name="text-align">left</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master * 1.8"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Why is the font-size for chapters hardcoded in the XSL FO templates?
|
||||
Let's remove it, so this sucker can use our attribute-set only... -->
|
||||
<xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
|
||||
<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||
xsl:use-attribute-sets="chapter.titlepage.recto.style">
|
||||
<xsl:call-template name="component.title">
|
||||
<xsl:with-param name="node" select="ancestor-or-self::chapter[1]"/>
|
||||
</xsl:call-template>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Sections 1, 2 and 3 titles have a small bump factor and padding -->
|
||||
<xsl:attribute-set name="section.title.level1.properties">
|
||||
<xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master * 1.5"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="section.title.level2.properties">
|
||||
<xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">0.6em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.6em</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master * 1.25"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="section.title.level3.properties">
|
||||
<xsl:attribute name="space-before.optimum">0.4em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.4em</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master * 1.0"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="section.title.level4.properties">
|
||||
<xsl:attribute name="space-before.optimum">0.3em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">0.3em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.3em</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master * 0.9"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Use code syntax highlighting -->
|
||||
<xsl:param name="highlight.source" select="1"/>
|
||||
<xsl:param name="highlight.default.language" select="xml" />
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
<!--###################################################
|
||||
Tables
|
||||
################################################### -->
|
||||
|
||||
<!-- Some padding inside tables -->
|
||||
<xsl:attribute-set name="table.cell.padding">
|
||||
<xsl:attribute name="padding-left">4pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-right">4pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-top">4pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-bottom">4pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Only hairlines as frame and cell borders in tables -->
|
||||
<xsl:param name="table.frame.border.thickness">0.1pt</xsl:param>
|
||||
<xsl:param name="table.cell.border.thickness">0.1pt</xsl:param>
|
||||
|
||||
<!--###################################################
|
||||
Labels
|
||||
################################################### -->
|
||||
|
||||
<!-- Label Chapters and Sections (numbering) -->
|
||||
<xsl:param name="chapter.autolabel" select="1"/>
|
||||
<xsl:param name="section.autolabel" select="1"/>
|
||||
<xsl:param name="section.autolabel.max.depth" select="1"/>
|
||||
|
||||
<xsl:param name="section.label.includes.component.label" select="1"/>
|
||||
<xsl:param name="table.footnote.number.format" select="'1'"/>
|
||||
|
||||
<!--###################################################
|
||||
Programlistings
|
||||
################################################### -->
|
||||
|
||||
<!-- Verbatim text formatting (programlistings) -->
|
||||
<xsl:attribute-set name="monospace.verbatim.properties">
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.small * 1.0"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="verbatim.properties">
|
||||
<xsl:attribute name="space-before.minimum">1em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.optimum">1em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
|
||||
<xsl:attribute name="border-color">#444444</xsl:attribute>
|
||||
<xsl:attribute name="border-style">solid</xsl:attribute>
|
||||
<xsl:attribute name="border-width">0.1pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-top">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="padding-left">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="padding-right">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="padding-bottom">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="margin-left">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="margin-right">0.5em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Shade (background) programlistings -->
|
||||
<xsl:param name="shade.verbatim">1</xsl:param>
|
||||
<xsl:attribute-set name="shade.verbatim.style">
|
||||
<xsl:attribute name="background-color">#F0F0F0</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="list.block.spacing">
|
||||
<xsl:attribute name="space-before.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="example.properties">
|
||||
<xsl:attribute name="space-before.minimum">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.optimum">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!--###################################################
|
||||
Title information for Figures, Examples etc.
|
||||
################################################### -->
|
||||
|
||||
<xsl:attribute-set name="formal.title.properties" use-attribute-sets="normal.para.spacing">
|
||||
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
||||
<xsl:attribute name="font-style">italic</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="hyphenate">false</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!--###################################################
|
||||
Callouts
|
||||
################################################### -->
|
||||
|
||||
<!-- don't use images for callouts -->
|
||||
<xsl:param name="callout.graphics">0</xsl:param>
|
||||
<xsl:param name="callout.unicode">1</xsl:param>
|
||||
|
||||
<!-- Place callout marks at this column in annotated areas -->
|
||||
<xsl:param name="callout.defaultcolumn">90</xsl:param>
|
||||
|
||||
<!--###################################################
|
||||
Misc
|
||||
################################################### -->
|
||||
|
||||
<!-- Placement of titles -->
|
||||
<xsl:param name="formal.title.placement">
|
||||
figure after
|
||||
example after
|
||||
equation before
|
||||
table before
|
||||
procedure before
|
||||
</xsl:param>
|
||||
|
||||
<!-- Format Variable Lists as Blocks (prevents horizontal overflow) -->
|
||||
<xsl:param name="variablelist.as.blocks">1</xsl:param>
|
||||
|
||||
<xsl:param name="body.start.indent">0pt</xsl:param>
|
||||
|
||||
<!-- Show only Sections up to level 3 in the TOCs -->
|
||||
<xsl:param name="toc.section.depth">3</xsl:param>
|
||||
|
||||
<!-- Remove "Chapter" from the Chapter titles... -->
|
||||
<xsl:param name="local.l10n.xml" select="document('')"/>
|
||||
<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
|
||||
<l:l10n language="en">
|
||||
<l:context name="title-numbered">
|
||||
<l:template name="chapter" text="%n. %t"/>
|
||||
<l:template name="section" text="%n %t"/>
|
||||
</l:context>
|
||||
<l:context name="title">
|
||||
<l:template name="example" text="Example %n %t"/>
|
||||
</l:context>
|
||||
</l:l10n>
|
||||
</l:i18n>
|
||||
|
||||
<!--###################################################
|
||||
colored and hyphenated links
|
||||
################################################### -->
|
||||
<xsl:template match="ulink">
|
||||
<fo:basic-link external-destination="{@url}"
|
||||
xsl:use-attribute-sets="xref.properties"
|
||||
text-decoration="underline"
|
||||
color="blue">
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(child::node())=0">
|
||||
<xsl:value-of select="@url"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</fo:basic-link>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="link">
|
||||
<fo:basic-link internal-destination="{@linkend}"
|
||||
xsl:use-attribute-sets="xref.properties"
|
||||
text-decoration="underline"
|
||||
color="blue">
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(child::node())=0">
|
||||
<xsl:value-of select="@linkend"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</fo:basic-link>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
523
docs/src/reference/resources/xsl/pdf-custom.xsl.bak
Normal file
@@ -0,0 +1,523 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<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:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
|
||||
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/highlight.xsl"/>
|
||||
-->
|
||||
|
||||
<!-- Use nice graphics for admonitions -->
|
||||
<xsl:param name="admon.graphics">'1'</xsl:param>
|
||||
<xsl:param name="admon.graphics.path">images/admon/</xsl:param>
|
||||
<xsl:param name="admon.graphics.extension">.png</xsl:param>
|
||||
|
||||
<!-- resize the admon graphics. they're width 36pt by default
|
||||
even though the graphics that ship with docbook are 24x24 -->
|
||||
<xsl:template match="*" mode="admon.graphic.width">
|
||||
<xsl:param name="node" select="."/>
|
||||
<xsl:text>24pt</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:param name="paper.type" select="'A4'"/>
|
||||
<xsl:param name="page.margin.top" select="'1cm'"/>
|
||||
<xsl:param name="region.before.extent" select="'1cm'"/>
|
||||
<xsl:param name="body.margin.top" select="'1.5cm'"/>
|
||||
|
||||
<xsl:param name="body.margin.bottom" select="'1.5cm'"/>
|
||||
<xsl:param name="region.after.extent" select="'1cm'"/>
|
||||
<xsl:param name="page.margin.bottom" select="'1cm'"/>
|
||||
<xsl:param name="title.margin.left" select="'0cm'"/>
|
||||
|
||||
<!--###################################################
|
||||
Header
|
||||
################################################### -->
|
||||
|
||||
<!-- More space in the center header for long text -->
|
||||
<xsl:attribute-set name="header.content.properties">
|
||||
<xsl:attribute name="font-family">
|
||||
<xsl:value-of select="$body.font.family"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="margin-left">-5em</xsl:attribute>
|
||||
<xsl:attribute name="margin-right">-5em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!--###################################################
|
||||
Table of Contents
|
||||
################################################### -->
|
||||
|
||||
<xsl:param name="generate.toc">
|
||||
book toc,title
|
||||
</xsl:param>
|
||||
|
||||
<!--###################################################
|
||||
Custom Header
|
||||
################################################### -->
|
||||
|
||||
<xsl:template name="header.content">
|
||||
<xsl:param name="pageclass" select="''"/>
|
||||
<xsl:param name="sequence" select="''"/>
|
||||
<xsl:param name="position" select="''"/>
|
||||
<xsl:param name="gentext-key" select="''"/>
|
||||
|
||||
<xsl:variable name="Version">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//productname">
|
||||
<xsl:value-of select="//productname"/><xsl:text> </xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>please define productname in your docbook file!</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$sequence='blank'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$position='center'">
|
||||
<xsl:value-of select="$Version"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$pageclass='titlepage'">
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$position='center'">
|
||||
<xsl:value-of select="$Version"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!--###################################################
|
||||
Custom Footer
|
||||
################################################### -->
|
||||
|
||||
<xsl:template name="footer.content">
|
||||
<xsl:param name="pageclass" select="''"/>
|
||||
<xsl:param name="sequence" select="''"/>
|
||||
<xsl:param name="position" select="''"/>
|
||||
<xsl:param name="gentext-key" select="''"/>
|
||||
|
||||
<xsl:variable name="Version">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//releaseinfo">
|
||||
<xsl:value-of select="//releaseinfo"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="Title">
|
||||
<xsl:value-of select="//title"/>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$sequence='blank'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$double.sided != 0 and $position = 'left'">
|
||||
<xsl:value-of select="$Version"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$double.sided = 0 and $position = 'center'">
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
<fo:page-number/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$pageclass='titlepage'">
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$double.sided != 0 and $sequence = 'even' and $position='left'">
|
||||
<fo:page-number/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$double.sided != 0 and $sequence = 'odd' and $position='right'">
|
||||
<fo:page-number/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$double.sided = 0 and $position='right'">
|
||||
<fo:page-number/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$double.sided != 0 and $sequence = 'odd' and $position='left'">
|
||||
<xsl:value-of select="$Version"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$double.sided != 0 and $sequence = 'even' and $position='right'">
|
||||
<xsl:value-of select="$Version"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$double.sided = 0 and $position='left'">
|
||||
<xsl:value-of select="$Version"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$position='center'">
|
||||
<xsl:value-of select="$Title"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="processing-instruction('hard-pagebreak')">
|
||||
<fo:block break-before='page'/>
|
||||
</xsl:template>
|
||||
|
||||
<!--###################################################
|
||||
Extensions
|
||||
################################################### -->
|
||||
|
||||
<!-- These extensions are required for table printing and other stuff -->
|
||||
<xsl:param name="use.extensions">1</xsl:param>
|
||||
<xsl:param name="tablecolumns.extension">0</xsl:param>
|
||||
<xsl:param name="callout.extensions">1</xsl:param>
|
||||
<xsl:param name="fop1.extensions">1</xsl:param>
|
||||
|
||||
<!--###################################################
|
||||
Paper & Page Size
|
||||
################################################### -->
|
||||
|
||||
<!-- Paper type, no headers on blank pages, no double sided printing -->
|
||||
<xsl:param name="double.sided">0</xsl:param>
|
||||
<xsl:param name="headers.on.blank.pages">0</xsl:param>
|
||||
<xsl:param name="footers.on.blank.pages">0</xsl:param>
|
||||
|
||||
<!--###################################################
|
||||
Fonts & Styles
|
||||
################################################### -->
|
||||
|
||||
<xsl:param name="hyphenate">false</xsl:param>
|
||||
|
||||
<!-- Default Font size -->
|
||||
<xsl:param name="body.font.master">11</xsl:param>
|
||||
<xsl:param name="body.font.small">8</xsl:param>
|
||||
|
||||
<!-- Line height in body text -->
|
||||
<xsl:param name="line-height">1.4</xsl:param>
|
||||
|
||||
<!-- Chapter title size -->
|
||||
<xsl:attribute-set name="chapter.titlepage.recto.style">
|
||||
<xsl:attribute name="text-align">left</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master * 1.8"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Why is the font-size for chapters hardcoded in the XSL FO templates?
|
||||
Let's remove it, so this sucker can use our attribute-set only... -->
|
||||
<xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
|
||||
<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||
xsl:use-attribute-sets="chapter.titlepage.recto.style">
|
||||
<xsl:call-template name="component.title">
|
||||
<xsl:with-param name="node" select="ancestor-or-self::chapter[1]"/>
|
||||
</xsl:call-template>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Sections 1, 2 and 3 titles have a small bump factor and padding -->
|
||||
<xsl:attribute-set name="section.title.level1.properties">
|
||||
<xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master * 1.5"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="section.title.level2.properties">
|
||||
<xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">0.6em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.6em</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master * 1.25"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="section.title.level3.properties">
|
||||
<xsl:attribute name="space-before.optimum">0.4em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.4em</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master * 1.0"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="section.title.level4.properties">
|
||||
<xsl:attribute name="space-before.optimum">0.3em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">0.3em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.3em</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master * 0.9"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Use code syntax highlighting -->
|
||||
<xsl:param name="highlight.source" select="1"/>
|
||||
<xsl:param name="highlight.default.language" select="xml" />
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
<!--###################################################
|
||||
Tables
|
||||
################################################### -->
|
||||
|
||||
<!-- Some padding inside tables -->
|
||||
<xsl:attribute-set name="table.cell.padding">
|
||||
<xsl:attribute name="padding-left">4pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-right">4pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-top">4pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-bottom">4pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Only hairlines as frame and cell borders in tables -->
|
||||
<xsl:param name="table.frame.border.thickness">0.1pt</xsl:param>
|
||||
<xsl:param name="table.cell.border.thickness">0.1pt</xsl:param>
|
||||
|
||||
<!--###################################################
|
||||
Labels
|
||||
################################################### -->
|
||||
|
||||
<!-- Label Chapters and Sections (numbering) -->
|
||||
<xsl:param name="chapter.autolabel" select="1"/>
|
||||
<xsl:param name="section.autolabel" select="1"/>
|
||||
<xsl:param name="section.autolabel.max.depth" select="1"/>
|
||||
|
||||
<xsl:param name="section.label.includes.component.label" select="1"/>
|
||||
<xsl:param name="table.footnote.number.format" select="'1'"/>
|
||||
|
||||
<!--###################################################
|
||||
Programlistings
|
||||
################################################### -->
|
||||
|
||||
<!-- Verbatim text formatting (programlistings) -->
|
||||
<xsl:attribute-set name="monospace.verbatim.properties">
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.small * 1.0"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="verbatim.properties">
|
||||
<xsl:attribute name="space-before.minimum">1em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.optimum">1em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
|
||||
<xsl:attribute name="border-color">#444444</xsl:attribute>
|
||||
<xsl:attribute name="border-style">solid</xsl:attribute>
|
||||
<xsl:attribute name="border-width">0.1pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-top">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="padding-left">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="padding-right">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="padding-bottom">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="margin-left">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="margin-right">0.5em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Shade (background) programlistings -->
|
||||
<xsl:param name="shade.verbatim">1</xsl:param>
|
||||
<xsl:attribute-set name="shade.verbatim.style">
|
||||
<xsl:attribute name="background-color">#F0F0F0</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="list.block.spacing">
|
||||
<xsl:attribute name="space-before.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="example.properties">
|
||||
<xsl:attribute name="space-before.minimum">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.optimum">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!--###################################################
|
||||
Title information for Figures, Examples etc.
|
||||
################################################### -->
|
||||
|
||||
<xsl:attribute-set name="formal.title.properties" use-attribute-sets="normal.para.spacing">
|
||||
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
||||
<xsl:attribute name="font-style">italic</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="hyphenate">false</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!--###################################################
|
||||
Callouts
|
||||
################################################### -->
|
||||
|
||||
<!-- don't use images for callouts -->
|
||||
<xsl:param name="callout.graphics">0</xsl:param>
|
||||
<xsl:param name="callout.unicode">1</xsl:param>
|
||||
|
||||
<!-- Place callout marks at this column in annotated areas -->
|
||||
<xsl:param name="callout.defaultcolumn">90</xsl:param>
|
||||
|
||||
<!--###################################################
|
||||
Misc
|
||||
################################################### -->
|
||||
|
||||
<!-- Placement of titles -->
|
||||
<xsl:param name="formal.title.placement">
|
||||
figure after
|
||||
example after
|
||||
equation before
|
||||
table before
|
||||
procedure before
|
||||
</xsl:param>
|
||||
|
||||
<!-- Format Variable Lists as Blocks (prevents horizontal overflow) -->
|
||||
<xsl:param name="variablelist.as.blocks">1</xsl:param>
|
||||
|
||||
<xsl:param name="body.start.indent">0pt</xsl:param>
|
||||
|
||||
<!-- Show only Sections up to level 3 in the TOCs -->
|
||||
<xsl:param name="toc.section.depth">3</xsl:param>
|
||||
|
||||
<!-- Remove "Chapter" from the Chapter titles... -->
|
||||
<xsl:param name="local.l10n.xml" select="document('')"/>
|
||||
<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
|
||||
<l:l10n language="en">
|
||||
<l:context name="title-numbered">
|
||||
<l:template name="chapter" text="%n. %t"/>
|
||||
<l:template name="section" text="%n %t"/>
|
||||
</l:context>
|
||||
<l:context name="title">
|
||||
<l:template name="example" text="Example %n %t"/>
|
||||
</l:context>
|
||||
</l:l10n>
|
||||
</l:i18n>
|
||||
|
||||
<!--###################################################
|
||||
colored and hyphenated links
|
||||
################################################### -->
|
||||
<xsl:template match="ulink">
|
||||
<fo:basic-link external-destination="{@url}"
|
||||
xsl:use-attribute-sets="xref.properties"
|
||||
text-decoration="underline"
|
||||
color="blue">
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(child::node())=0">
|
||||
<xsl:value-of select="@url"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</fo:basic-link>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="link">
|
||||
<fo:basic-link internal-destination="{@linkend}"
|
||||
xsl:use-attribute-sets="xref.properties"
|
||||
text-decoration="underline"
|
||||
color="blue">
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(child::node())=0">
|
||||
<xsl:value-of select="@linkend"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</fo:basic-link>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
33
gradle.properties
Normal file
@@ -0,0 +1,33 @@
|
||||
## Dependecies Version
|
||||
|
||||
# Logging
|
||||
log4jVersion = 1.2.14
|
||||
slf4jVersion = 1.6.4
|
||||
|
||||
# Common libraries
|
||||
springVersion = 3.1.1.RELEASE
|
||||
commonsioVersion = 1.4
|
||||
cglibVersion = 2.2.2
|
||||
jlineVersion=1.0.S2-B
|
||||
jansiVersion=1.6
|
||||
|
||||
|
||||
# Testing
|
||||
junitVersion = 4.7
|
||||
mockitoVersion = 1.8.5
|
||||
|
||||
# Manifest properties
|
||||
|
||||
## OSGi ranges
|
||||
spring.range = "[3.0.0, 4.0.0)"
|
||||
hadoop.range = "[0.20.2, 2.0)"
|
||||
hive.range = "[0.8, 1.0)"
|
||||
hbase.range = "[0.90, 1.0)"
|
||||
batch.range = "[2.1, 2.2)"
|
||||
pig.range = "[0.9, 1.0.0)"
|
||||
thrift.range = "[0.7, 0.8)"
|
||||
|
||||
# --------------------
|
||||
# Project wide version
|
||||
# --------------------
|
||||
springShellVersion=1.0.0.BUILD-SNAPSHOT
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
6
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
#Mon Sep 19 20:44:55 EEST 2011
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=http\://repo.gradle.org/gradle/distributions/gradle-1.0-milestone-3-bin.zip
|
||||
168
gradlew
vendored
Normal file
@@ -0,0 +1,168 @@
|
||||
#!/bin/bash
|
||||
|
||||
##############################################################################
|
||||
## ##
|
||||
## Gradle wrapper script for UN*X ##
|
||||
## ##
|
||||
##############################################################################
|
||||
|
||||
# Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together.
|
||||
# GRADLE_OPTS="$GRADLE_OPTS -Xmx512m"
|
||||
# JAVA_OPTS="$JAVA_OPTS -Xmx512m"
|
||||
|
||||
GRADLE_APP_NAME=Gradle
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn ( ) {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die ( ) {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
esac
|
||||
|
||||
# Attempt to set JAVA_HOME if it's not already set.
|
||||
if [ -z "$JAVA_HOME" ] ; then
|
||||
if $darwin ; then
|
||||
[ -z "$JAVA_HOME" -a -d "/Library/Java/Home" ] && export JAVA_HOME="/Library/Java/Home"
|
||||
[ -z "$JAVA_HOME" -a -d "/System/Library/Frameworks/JavaVM.framework/Home" ] && export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home"
|
||||
else
|
||||
javaExecutable="`which javac`"
|
||||
[ -z "$javaExecutable" -o "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ] && die "JAVA_HOME not set and cannot find javac to deduce location, please set JAVA_HOME."
|
||||
# readlink(1) is not available as standard on Solaris 10.
|
||||
readLink=`which readlink`
|
||||
[ `expr "$readLink" : '\([^ ]*\)'` = "no" ] && die "JAVA_HOME not set and readlink not available, please set JAVA_HOME."
|
||||
javaExecutable="`readlink -f \"$javaExecutable\"`"
|
||||
javaHome="`dirname \"$javaExecutable\"`"
|
||||
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
|
||||
export JAVA_HOME="$javaHome"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched.
|
||||
if $cygwin ; then
|
||||
[ -n "$JAVACMD" ] && JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||
fi
|
||||
|
||||
STARTER_MAIN_CLASS=org.gradle.wrapper.GradleWrapperMain
|
||||
CLASSPATH=`dirname "$0"`/gradle/wrapper/gradle-wrapper.jar
|
||||
WRAPPER_PROPERTIES=`dirname "$0"`/gradle/wrapper/gradle-wrapper.properties
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -z "$JAVACMD" ] ; then
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
fi
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
if [ -z "$JAVA_HOME" ] ; then
|
||||
warn "JAVA_HOME environment variable is not set"
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query businessSystem maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add GRADLE_APP_NAME to the JAVA_OPTS as -Xdock:name
|
||||
if $darwin; then
|
||||
JAVA_OPTS="$JAVA_OPTS -Xdock:name=$GRADLE_APP_NAME"
|
||||
# we may also want to set -Xdock:image
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
JAVA_HOME=`cygpath --path --mixed "$JAVA_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
GRADLE_APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
exec "$JAVACMD" $JAVA_OPTS $GRADLE_OPTS \
|
||||
-classpath "$CLASSPATH" \
|
||||
-Dorg.gradle.appname="$GRADLE_APP_BASE_NAME" \
|
||||
-Dorg.gradle.wrapper.properties="$WRAPPER_PROPERTIES" \
|
||||
$STARTER_MAIN_CLASS \
|
||||
"$@"
|
||||
82
gradlew.bat
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem ##
|
||||
@rem Gradle startup script for Windows ##
|
||||
@rem ##
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
@rem Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together.
|
||||
@rem set GRADLE_OPTS=%GRADLE_OPTS% -Xmx512m
|
||||
@rem set JAVA_OPTS=%JAVA_OPTS% -Xmx512m
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.\
|
||||
|
||||
@rem Find java.exe
|
||||
set JAVA_EXE=java.exe
|
||||
if not defined JAVA_HOME goto init
|
||||
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
echo.
|
||||
goto end
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set STARTER_MAIN_CLASS=org.gradle.wrapper.GradleWrapperMain
|
||||
set CLASSPATH=%DIRNAME%\gradle\wrapper\gradle-wrapper.jar
|
||||
set WRAPPER_PROPERTIES=%DIRNAME%\gradle\wrapper\gradle-wrapper.properties
|
||||
|
||||
set GRADLE_OPTS=%JAVA_OPTS% %GRADLE_OPTS% -Dorg.gradle.wrapper.properties="%WRAPPER_PROPERTIES%"
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %GRADLE_OPTS% -classpath "%CLASSPATH%" %STARTER_MAIN_CLASS% %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
if not "%OS%"=="Windows_NT" echo 1 > nul | choice /n /c:1
|
||||
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit "%ERRORLEVEL%"
|
||||
exit /b "%ERRORLEVEL%"
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
176
maven.gradle
Normal file
@@ -0,0 +1,176 @@
|
||||
apply plugin: 'maven'
|
||||
|
||||
// Create a source jar for uploading
|
||||
task sourceJar(type: Jar, dependsOn: jar) {
|
||||
classifier = 'sources'
|
||||
from sourceSets.main.allSource
|
||||
}
|
||||
|
||||
// Create a javadoc jar for uploading
|
||||
task javadocJar(type: Jar, dependsOn: javadoc) {
|
||||
classifier = 'javadoc'
|
||||
from javadoc.destinationDir
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives sourceJar
|
||||
archives javadocJar
|
||||
}
|
||||
|
||||
// Configuration for SpringSource s3 maven deployer
|
||||
configurations {
|
||||
deployerJars
|
||||
}
|
||||
dependencies {
|
||||
deployerJars "org.springframework.build.aws:org.springframework.build.aws.maven:3.0.0.RELEASE"
|
||||
}
|
||||
|
||||
task generatePom {
|
||||
group = 'Build'
|
||||
description = 'Generates a Maven POM file suitable for use in building the project'
|
||||
|
||||
generatedPomFileName = "pom.xml"
|
||||
|
||||
// ensure changes in the classpath trigger regeneration of poms
|
||||
inputs.files(project.sourceSets.main.compileClasspath)
|
||||
|
||||
// ensure version changes in gradle.properties trigger regeneration of poms
|
||||
inputs.files(new File(project.rootProject.rootDir, Project.GRADLE_PROPERTIES))
|
||||
|
||||
// enable partial cleaning with `gradle cleanGeneratePom`
|
||||
outputs.files(generatedPomFileName)
|
||||
|
||||
doLast() {
|
||||
// customize the pom creation process
|
||||
p = pom {
|
||||
project {
|
||||
name = project.description
|
||||
properties {
|
||||
setProperty('project.build.sourceEncoding', 'UTF8')
|
||||
}
|
||||
build {
|
||||
plugins {
|
||||
plugin {
|
||||
groupId = 'org.apache.maven.plugins'
|
||||
artifactId = 'maven-compiler-plugin'
|
||||
configuration {
|
||||
source = '1.6'
|
||||
target = '1.6'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// customizing the artifact id is a special case that must be configured
|
||||
// after the pom is fully configured, otherwise it'll be overwritten
|
||||
p.whenConfigured { pom -> pom.artifactId = project.name }
|
||||
|
||||
customizePom(p)
|
||||
|
||||
// write the pom.xml file out to the filesystem
|
||||
p.writeTo(generatedPomFileName)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Remove the archive configuration from the runtime configuration, so that anything added to archives
|
||||
// (such as the source jar) is no longer included in the runtime classpath
|
||||
configurations.default.extendsFrom = [configurations.runtime] as Set
|
||||
// Add the main jar into the default configuration
|
||||
artifacts { 'default' jar }
|
||||
|
||||
gradle.taskGraph.whenReady {graph ->
|
||||
if (graph.hasTask(uploadArchives)) {
|
||||
// check properties defined and fail early
|
||||
s3AccessKey
|
||||
s3SecretAccessKey
|
||||
}
|
||||
}
|
||||
|
||||
def deployer = null
|
||||
|
||||
uploadArchives {
|
||||
description = "Maven deploy of archives artifacts to SpringSource Maven repos" // url appended below
|
||||
group = "Distribution"
|
||||
// Maven deployment
|
||||
def releaseRepositoryUrl = "file://${project.properties.mavenSyncRepoDir}"
|
||||
def milestoneRepositoryUrl = 's3://maven.springframework.org/milestone'
|
||||
def snapshotRepositoryUrl = 's3://maven.springframework.org/snapshot'
|
||||
|
||||
// add a configuration with a classpath that includes our s3 maven deployer
|
||||
configurations { deployerJars }
|
||||
dependencies {
|
||||
deployerJars "org.springframework.build.aws:org.springframework.build.aws.maven:3.0.0.RELEASE"
|
||||
}
|
||||
|
||||
deployer = repositories.mavenDeployer {
|
||||
configuration = configurations.deployerJars
|
||||
// releaseBuild
|
||||
if (releaseBuild) {
|
||||
logger.info("Deploying to local Maven repo " + releaseRepositoryUrl)
|
||||
// "mavenSyncRepoDir" should be set in properties
|
||||
repository(url: releaseRepositoryUrl)
|
||||
} else {
|
||||
s3credentials = [userName: project.properties.s3AccessKey, passphrase: project.properties.s3SecretAccessKey]
|
||||
repository(url: milestoneRepositoryUrl) {
|
||||
authentication(s3credentials)
|
||||
}
|
||||
snapshotRepository(url: snapshotRepositoryUrl) {
|
||||
authentication(s3credentials)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
customizePom(deployer.pom)
|
||||
}
|
||||
|
||||
install {
|
||||
customizePom(repositories.mavenInstaller.pom)
|
||||
}
|
||||
|
||||
def customizePom(pom) {
|
||||
def optionalDeps = ['log4j','jsr250-api']
|
||||
|
||||
//pom.scopeMappings.addMapping(10, configurations.provided, 'provided')
|
||||
pom.whenConfigured { p ->
|
||||
// Remove test scope dependencies from published poms
|
||||
//p.dependencies = p.dependencies.findAll {it.scope != 'test'}
|
||||
|
||||
// Flag optional deps
|
||||
def opDeps = configurations.testRuntime.allDependencies.findAll { gradleDep ->
|
||||
gradleDep.asDynamicObject.hasProperty('optional') && gradleDep.optional
|
||||
}
|
||||
|
||||
p.dependencies.findAll { dep ->
|
||||
optionalDeps.contains(dep.artifactId) ||
|
||||
dep.groupId.startsWith('org.slf4j') ||
|
||||
opDeps.any { op ->
|
||||
(dep.groupId == op.group && dep.artifactId == op.name)
|
||||
}
|
||||
}*.optional = true
|
||||
|
||||
p.groupId = "org.springframework.data"
|
||||
}
|
||||
|
||||
pom.project {
|
||||
licenses {
|
||||
license {
|
||||
name 'The Apache Software License, Version 2.0'
|
||||
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
||||
distribution 'repo'
|
||||
}
|
||||
}
|
||||
|
||||
// similar to Spring's configuration
|
||||
dependencies {
|
||||
dependency {
|
||||
artifactId = groupId = 'commons-logging'
|
||||
scope = 'compile'
|
||||
optional = 'true'
|
||||
version = '1.1.1'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
41
pom.xml
@@ -18,7 +18,7 @@
|
||||
<properties>
|
||||
<jar.mainclass>org.springframework.shell.Bootstrap</jar.mainclass>
|
||||
<maven.test.failure.ignore>true</maven.test.failure.ignore>
|
||||
<spring.framework.version>3.0.6.RELEASE</spring.framework.version>
|
||||
<spring.framework.version>3.1.1.RELEASE</spring.framework.version>
|
||||
</properties> <dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
@@ -37,24 +37,20 @@
|
||||
<artifactId>spring-context</artifactId>
|
||||
<version>${spring.framework.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- CGLIB needed for use of @Configuration class based
|
||||
extension points -->
|
||||
<dependency>
|
||||
<groupId>cglib</groupId>
|
||||
<artifactId>cglib</artifactId>
|
||||
<version>2.2.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.14</version>
|
||||
</dependency>
|
||||
<!--
|
||||
<dependency>
|
||||
<groupId>org.springframework.roo</groupId>
|
||||
<artifactId>org.springframework.roo.shell.jline</artifactId>
|
||||
<version>1.2.0.RELEASE</version>
|
||||
</dependency>
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.roo</groupId>
|
||||
<artifactId>org.springframework.roo.shell</artifactId>
|
||||
<version>1.2.0.RELEASE</version>
|
||||
</dependency>
|
||||
<!-- consider removing dependency -->
|
||||
<!-- consider removing dependency on commons-io -->
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
@@ -71,12 +67,13 @@
|
||||
<groupId>org.fusesource.jansi</groupId>
|
||||
<artifactId>jansi</artifactId>
|
||||
<version>1.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.roo.wrapping</groupId>
|
||||
<artifactId>org.springframework.roo.wrapping.json-simple</artifactId>
|
||||
<version>1.1.0.0010</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-all</artifactId>
|
||||
<version>1.8.5</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
@@ -128,7 +125,10 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
<!-- jline 1.0.S2-B is here
|
||||
http://shrub.appspot.com/spring-roo-repository.springsource.org/release/net/sourceforge/jline/jline/1.0.S2-B/
|
||||
-->
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>spring-roo-repository</id>
|
||||
@@ -136,4 +136,5 @@
|
||||
<url>http://spring-roo-repository.springsource.org/release</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
</project>
|
||||
|
||||
1
settings.gradle
Normal file
@@ -0,0 +1 @@
|
||||
rootProject.name = 'spring-shell'
|
||||
488
src/main/java/org/springframework/roo/shell/AbstractShell.java
Normal file
@@ -0,0 +1,488 @@
|
||||
package org.springframework.roo.shell;
|
||||
|
||||
import static org.springframework.roo.support.util.StringUtils.LINE_SEPARATOR;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.text.DateFormat;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.jar.Manifest;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.zip.ZipEntry;
|
||||
|
||||
import org.springframework.roo.shell.event.AbstractShellStatusPublisher;
|
||||
import org.springframework.roo.shell.event.ShellStatus;
|
||||
import org.springframework.roo.shell.event.ShellStatus.Status;
|
||||
import org.springframework.roo.support.logging.HandlerUtils;
|
||||
import org.springframework.roo.support.util.Assert;
|
||||
import org.springframework.roo.support.util.IOUtils;
|
||||
import org.springframework.roo.support.util.MathUtils;
|
||||
import org.springframework.roo.support.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Provides a base {@link Shell} implementation.
|
||||
*
|
||||
* @author Ben Alex
|
||||
*/
|
||||
public abstract class AbstractShell extends AbstractShellStatusPublisher implements Shell {
|
||||
|
||||
// Constants
|
||||
private static final String MY_SLOT = AbstractShell.class.getName();
|
||||
|
||||
//TODO Abstract out to make configurable.
|
||||
protected static final String ROO_PROMPT = "spring> ";
|
||||
|
||||
// Public static fields; don't rename, make final, or make non-public, as
|
||||
// they are part of the public API, e.g. are changed by STS.
|
||||
public static String completionKeys = "TAB";
|
||||
public static String shellPrompt = ROO_PROMPT;
|
||||
|
||||
// Instance fields
|
||||
protected final Logger logger = HandlerUtils.getLogger(getClass());
|
||||
protected boolean inBlockComment;
|
||||
protected ExitShellRequest exitShellRequest;
|
||||
|
||||
/**
|
||||
* Returns any classpath resources with the given path
|
||||
*
|
||||
* @param path the path for which to search (never null)
|
||||
* @return <code>null</code> if the search can't be performed
|
||||
* @since 1.2.0
|
||||
*/
|
||||
protected abstract Collection<URL> findResources(String path);
|
||||
|
||||
protected abstract String getHomeAsString();
|
||||
|
||||
protected abstract ExecutionStrategy getExecutionStrategy();
|
||||
|
||||
protected abstract Parser getParser();
|
||||
|
||||
@CliCommand(value = { "script" }, help = "Parses the specified resource file and executes its commands")
|
||||
public void script(
|
||||
@CliOption(key = { "", "file" }, help = "The file to locate and execute", mandatory = true) final File script,
|
||||
@CliOption(key = "lineNumbers", mandatory = false, specifiedDefaultValue = "true", unspecifiedDefaultValue = "false", help = "Display line numbers when executing the script") final boolean lineNumbers) {
|
||||
|
||||
Assert.notNull(script, "Script file to parse is required");
|
||||
double startedNanoseconds = System.nanoTime();
|
||||
final InputStream inputStream = openScript(script);
|
||||
|
||||
BufferedReader in = null;
|
||||
try {
|
||||
in = new BufferedReader(new InputStreamReader(inputStream));
|
||||
String line;
|
||||
int i = 0;
|
||||
while ((line = in.readLine()) != null) {
|
||||
i++;
|
||||
if (lineNumbers) {
|
||||
logger.fine("Line " + i + ": " + line);
|
||||
} else {
|
||||
logger.fine(line);
|
||||
}
|
||||
if (!"".equals(line.trim())) {
|
||||
boolean success = executeScriptLine(line);
|
||||
if (success && ((line.trim().startsWith("q") || line.trim().startsWith("ex")))) {
|
||||
break;
|
||||
} else if (!success) {
|
||||
// Abort script processing, given something went wrong
|
||||
throw new IllegalStateException("Script execution aborted");
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new IllegalStateException(e);
|
||||
} finally {
|
||||
IOUtils.closeQuietly(inputStream, in);
|
||||
double executionDurationInSeconds = (System.nanoTime() - startedNanoseconds) / 1000000000D;
|
||||
logger.fine("Script required " + MathUtils.round(executionDurationInSeconds, 3) + " seconds to execute");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens the given script for reading
|
||||
*
|
||||
* @param script the script to read (required)
|
||||
* @return a non-<code>null</code> input stream
|
||||
*/
|
||||
private InputStream openScript(final File script) {
|
||||
try {
|
||||
return new BufferedInputStream(new FileInputStream(script));
|
||||
} catch (final FileNotFoundException fnfe) {
|
||||
// Try to find the script via the classloader
|
||||
final Collection<URL> urls = findResources(script.getName());
|
||||
|
||||
// Handle search failure
|
||||
Assert.notNull(urls, "Unexpected error looking for '" + script.getName() + "'");
|
||||
|
||||
// Handle the search being OK but the file simply not being present
|
||||
Assert.notEmpty(urls, "Script '" + script + "' not found on disk or in classpath");
|
||||
Assert.isTrue(urls.size() == 1, "More than one '" + script + "' was found in the classpath; unable to continue");
|
||||
try {
|
||||
return urls.iterator().next().openStream();
|
||||
} catch (IOException e) {
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the single line from a script.
|
||||
* <p>
|
||||
* This method can be overridden by sub-classes to pre-process script lines.
|
||||
*/
|
||||
protected boolean executeScriptLine(final String line) {
|
||||
return executeCommand(line);
|
||||
}
|
||||
|
||||
public boolean executeCommand(String line) {
|
||||
// Another command was attempted
|
||||
setShellStatus(ShellStatus.Status.PARSING);
|
||||
|
||||
final ExecutionStrategy executionStrategy = getExecutionStrategy();
|
||||
boolean flashedMessage = false;
|
||||
while (executionStrategy == null || !executionStrategy.isReadyForCommands()) {
|
||||
// Wait
|
||||
try {
|
||||
Thread.sleep(500);
|
||||
} catch (InterruptedException ignore) {}
|
||||
if (!flashedMessage) {
|
||||
flash(Level.INFO, "Please wait - still loading", MY_SLOT);
|
||||
flashedMessage = true;
|
||||
}
|
||||
}
|
||||
if (flashedMessage) {
|
||||
flash(Level.INFO, "", MY_SLOT);
|
||||
}
|
||||
|
||||
ParseResult parseResult = null;
|
||||
try {
|
||||
// We support simple block comments; ie a single pair per line
|
||||
if (!inBlockComment && line.contains("/*") && line.contains("*/")) {
|
||||
blockCommentBegin();
|
||||
String lhs = line.substring(0, line.lastIndexOf("/*"));
|
||||
if (line.contains("*/")) {
|
||||
line = lhs + line.substring(line.lastIndexOf("*/") + 2);
|
||||
blockCommentFinish();
|
||||
} else {
|
||||
line = lhs;
|
||||
}
|
||||
}
|
||||
if (inBlockComment) {
|
||||
if (!line.contains("*/")) {
|
||||
return true;
|
||||
}
|
||||
blockCommentFinish();
|
||||
line = line.substring(line.lastIndexOf("*/") + 2);
|
||||
}
|
||||
// We also support inline comments (but only at start of line, otherwise valid
|
||||
// command options like http://www.helloworld.com will fail as per ROO-517)
|
||||
if (!inBlockComment && (line.trim().startsWith("//") || line.trim().startsWith("#"))) { // # support in ROO-1116
|
||||
line = "";
|
||||
}
|
||||
// Convert any TAB characters to whitespace (ROO-527)
|
||||
line = line.replace('\t', ' ');
|
||||
if ("".equals(line.trim())) {
|
||||
setShellStatus(Status.EXECUTION_SUCCESS);
|
||||
return true;
|
||||
}
|
||||
parseResult = getParser().parse(line);
|
||||
if (parseResult == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
setShellStatus(Status.EXECUTING);
|
||||
Object result = executionStrategy.execute(parseResult);
|
||||
setShellStatus(Status.EXECUTION_RESULT_PROCESSING);
|
||||
if (result != null) {
|
||||
if (result instanceof ExitShellRequest) {
|
||||
exitShellRequest = (ExitShellRequest) result;
|
||||
// Give ProcessManager a chance to close down its threads before the overall OSGi framework is terminated (ROO-1938)
|
||||
executionStrategy.terminate();
|
||||
} else if (result instanceof Iterable<?>) {
|
||||
for (Object o : (Iterable<?>) result) {
|
||||
logger.info(o.toString());
|
||||
}
|
||||
} else {
|
||||
logger.info(result.toString());
|
||||
}
|
||||
}
|
||||
|
||||
logCommandIfRequired(line, true);
|
||||
setShellStatus(Status.EXECUTION_SUCCESS, line, parseResult);
|
||||
return true;
|
||||
} catch (RuntimeException e) {
|
||||
setShellStatus(Status.EXECUTION_FAILED, line, parseResult);
|
||||
// We rely on execution strategy to log it
|
||||
try {
|
||||
logCommandIfRequired(line, false);
|
||||
} catch (Exception ignored) {}
|
||||
return false;
|
||||
} finally {
|
||||
setShellStatus(Status.USER_INPUT);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows a subclass to log the execution of a well-formed command. This is invoked after a command
|
||||
* has completed, and indicates whether the command returned normally or returned an exception. Note
|
||||
* that attempted commands that are not well-formed (eg they are missing a mandatory argument) will
|
||||
* never be presented to this method, as the command execution is never actually attempted in those
|
||||
* cases. This method is only invoked if an attempt is made to execute a particular command.
|
||||
*
|
||||
* <p>
|
||||
* Implementations should consider specially handling the "script" commands, and also
|
||||
* indicating whether a command was successful or not. Implementations that wish to behave
|
||||
* consistently with other {@link AbstractShell} subclasses are encouraged to simply override
|
||||
* {@link #logCommandToOutput(String)} instead, and only override this method if you actually
|
||||
* need to fine-tune the output logic.
|
||||
*
|
||||
* @param line the parsed line (any comments have been removed; never null)
|
||||
* @param successful if the command was successful or not
|
||||
*/
|
||||
protected void logCommandIfRequired(final String line, final boolean successful) {
|
||||
if (line.startsWith("script")) {
|
||||
logCommandToOutput((successful ? "// " : "// [failed] ") + line);
|
||||
} else {
|
||||
logCommandToOutput((successful ? "" : "// [failed] ") + line);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows a subclass to actually write the resulting logged command to some form of output. This
|
||||
* frees subclasses from needing to implement the logic within {@link #logCommandIfRequired(String, boolean)}.
|
||||
*
|
||||
* <p>
|
||||
* Implementations should invoke {@link #getExitShellRequest()} to monitor any attempts to exit the shell and
|
||||
* release resources such as output log files.
|
||||
*
|
||||
* @param processedLine the line that should be appended to some type of output (excluding the \n character)
|
||||
*/
|
||||
protected void logCommandToOutput(final String processedLine) {}
|
||||
|
||||
/**
|
||||
* Base implementation of the {@link Shell#setPromptPath(String)} method, designed for simple shell
|
||||
* implementations. Advanced implementations (eg those that support ANSI codes etc) will likely want
|
||||
* to override this method and set the {@link #shellPrompt} variable directly.
|
||||
*
|
||||
* @param path to set (can be null or empty; must NOT be formatted in any special way eg ANSI codes)
|
||||
*/
|
||||
public void setPromptPath(final String path) {
|
||||
if (path == null || "".equals(path)) {
|
||||
shellPrompt = ROO_PROMPT;
|
||||
} else {
|
||||
shellPrompt = path + " " + ROO_PROMPT;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Default implementation of {@link Shell#setPromptPath(String, boolean))} method to satisfy STS compatibility.
|
||||
*
|
||||
* @param path to set (can be null or empty)
|
||||
* @param overrideStyle
|
||||
*/
|
||||
public void setPromptPath(String path, boolean overrideStyle) {
|
||||
setPromptPath(path);
|
||||
}
|
||||
|
||||
public ExitShellRequest getExitShellRequest() {
|
||||
return exitShellRequest;
|
||||
}
|
||||
|
||||
@CliCommand(value = { "//", ";" }, help = "Inline comment markers (start of line only)")
|
||||
public void inlineComment() {}
|
||||
|
||||
@CliCommand(value = { "/*" }, help = "Start of block comment")
|
||||
public void blockCommentBegin() {
|
||||
Assert.isTrue(!inBlockComment, "Cannot open a new block comment when one already active");
|
||||
inBlockComment = true;
|
||||
}
|
||||
|
||||
@CliCommand(value = { "*/" }, help = "End of block comment")
|
||||
public void blockCommentFinish() {
|
||||
Assert.isTrue(inBlockComment, "Cannot close a block comment when it has not been opened");
|
||||
inBlockComment = false;
|
||||
}
|
||||
|
||||
@CliCommand(value = { "system properties" }, help = "Shows the shell's properties")
|
||||
public String props() {
|
||||
final Set<String> data = new TreeSet<String>(); // For repeatability
|
||||
for (final Entry<Object, Object> entry : System.getProperties().entrySet()) {
|
||||
data.add(entry.getKey() + " = " + entry.getValue());
|
||||
}
|
||||
|
||||
return StringUtils.collectionToDelimitedString(data, LINE_SEPARATOR) + LINE_SEPARATOR;
|
||||
}
|
||||
|
||||
@CliCommand(value = { "date" }, help = "Displays the local date and time")
|
||||
public String date() {
|
||||
return DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL).format(new Date());
|
||||
}
|
||||
|
||||
@CliCommand(value = { "flash test" }, help = "Tests message flashing")
|
||||
public void flashCustom() throws Exception {
|
||||
flash(Level.FINE, "Hello world", "a");
|
||||
Thread.sleep(150);
|
||||
flash(Level.FINE, "Short world", "a");
|
||||
Thread.sleep(150);
|
||||
flash(Level.FINE, "Small", "a");
|
||||
Thread.sleep(150);
|
||||
flash(Level.FINE, "Downloading xyz", "b");
|
||||
Thread.sleep(150);
|
||||
flash(Level.FINE, "", "a");
|
||||
Thread.sleep(150);
|
||||
flash(Level.FINE, "Downloaded xyz", "b");
|
||||
Thread.sleep(150);
|
||||
flash(Level.FINE, "System online", "c");
|
||||
Thread.sleep(150);
|
||||
flash(Level.FINE, "System ready", "c");
|
||||
Thread.sleep(150);
|
||||
flash(Level.FINE, "System farewell", "c");
|
||||
Thread.sleep(150);
|
||||
flash(Level.FINE, "", "c");
|
||||
Thread.sleep(150);
|
||||
flash(Level.FINE, "", "b");
|
||||
}
|
||||
|
||||
@CliCommand(value = { "version" }, help = "Displays shell version")
|
||||
public String version(@CliOption(key = "", help = "Special version flags") final String extra) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
if ("jaime".equals(extra)) {
|
||||
sb.append(" /\\ /l").append(LINE_SEPARATOR);
|
||||
sb.append(" ((.Y(!").append(LINE_SEPARATOR);
|
||||
sb.append(" \\ |/").append(LINE_SEPARATOR);
|
||||
sb.append(" / 6~6,").append(LINE_SEPARATOR);
|
||||
sb.append(" \\ _ +-.").append(LINE_SEPARATOR);
|
||||
sb.append(" \\`-=--^-' \\").append(LINE_SEPARATOR);
|
||||
sb.append(" \\ \\ |\\--------------------------+").append(LINE_SEPARATOR);
|
||||
sb.append(" _/ \\ | Thanks for loading Roo! |").append(LINE_SEPARATOR);
|
||||
sb.append(" ( . Y +---------------------------+").append(LINE_SEPARATOR);
|
||||
sb.append(" /\"\\ `---^--v---.").append(LINE_SEPARATOR);
|
||||
sb.append(" / _ `---\"T~~\\/~\\/").append(LINE_SEPARATOR);
|
||||
sb.append(" / \" ~\\. !").append(LINE_SEPARATOR);
|
||||
sb.append(" _ Y Y.~~~ /'").append(LINE_SEPARATOR);
|
||||
sb.append(" Y^| | | Roo 7").append(LINE_SEPARATOR);
|
||||
sb.append(" | l | / . /'").append(LINE_SEPARATOR);
|
||||
sb.append(" | `L | Y .^/ ~T").append(LINE_SEPARATOR);
|
||||
sb.append(" | l ! | |/ | | ____ ____ ____").append(LINE_SEPARATOR);
|
||||
sb.append(" | .`\\/' | Y | ! / __ \\/ __ \\/ __ \\").append(LINE_SEPARATOR);
|
||||
sb.append(" l \"~ j l j L______ / /_/ / / / / / / /").append(LINE_SEPARATOR);
|
||||
sb.append(" \\,____{ __\"\" ~ __ ,\\_,\\_ / _, _/ /_/ / /_/ /").append(LINE_SEPARATOR);
|
||||
sb.append(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~ /_/ |_|\\____/\\____/").append(" ").append(versionInfo()).append(LINE_SEPARATOR);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
sb.append(" ____ ____ ____ ").append(LINE_SEPARATOR);
|
||||
sb.append(" / __ \\/ __ \\/ __ \\ ").append(LINE_SEPARATOR);
|
||||
sb.append(" / /_/ / / / / / / / ").append(LINE_SEPARATOR);
|
||||
sb.append(" / _, _/ /_/ / /_/ / ").append(LINE_SEPARATOR);
|
||||
sb.append("/_/ |_|\\____/\\____/ ").append(" ").append(versionInfo()).append(LINE_SEPARATOR);
|
||||
sb.append(LINE_SEPARATOR);
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public static String versionInfo() {
|
||||
// Try to determine the bundle version
|
||||
String bundleVersion = null;
|
||||
String gitCommitHash = null;
|
||||
JarFile jarFile = null;
|
||||
try {
|
||||
URL classContainer = AbstractShell.class.getProtectionDomain().getCodeSource().getLocation();
|
||||
if (classContainer.toString().endsWith(".jar")) {
|
||||
// Attempt to obtain the "Bundle-Version" version from the manifest
|
||||
jarFile = new JarFile(new File(classContainer.toURI()), false);
|
||||
ZipEntry manifestEntry = jarFile.getEntry("META-INF/MANIFEST.MF");
|
||||
Manifest manifest = new Manifest(jarFile.getInputStream(manifestEntry));
|
||||
bundleVersion = manifest.getMainAttributes().getValue("Bundle-Version");
|
||||
gitCommitHash = manifest.getMainAttributes().getValue("Git-Commit-Hash");
|
||||
}
|
||||
} catch (IOException ignoreAndMoveOn) {
|
||||
} catch (URISyntaxException ignoreAndMoveOn) {
|
||||
} finally {
|
||||
IOUtils.closeQuietly(jarFile);
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
if (bundleVersion != null) {
|
||||
sb.append(bundleVersion);
|
||||
}
|
||||
|
||||
if (gitCommitHash != null && gitCommitHash.length() > 7) {
|
||||
if (sb.length() > 0) {
|
||||
sb.append(" "); // to separate from version
|
||||
}
|
||||
sb.append("[rev ");
|
||||
sb.append(gitCommitHash.substring(0,7));
|
||||
sb.append("]");
|
||||
}
|
||||
|
||||
if (sb.length() == 0) {
|
||||
sb.append("UNKNOWN VERSION");
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public String getShellPrompt() {
|
||||
return shellPrompt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtains the home directory for the current shell instance.
|
||||
*
|
||||
* <p>
|
||||
* Note: calls the {@link #getHomeAsString()} method to allow subclasses to provide the home directory location as
|
||||
* string using different environment-specific strategies.
|
||||
*
|
||||
* <p>
|
||||
* If the path indicated by {@link #getHomeAsString()} exists and refers to a directory, that directory
|
||||
* is returned.
|
||||
*
|
||||
* <p>
|
||||
* If the path indicated by {@link #getHomeAsString()} exists and refers to a file, an exception is thrown.
|
||||
*
|
||||
* <p>
|
||||
* If the path indicated by {@link #getHomeAsString()} does not exist, it will be created as a directory.
|
||||
* If this fails, an exception will be thrown.
|
||||
*
|
||||
* @return the home directory for the current shell instance (which is guaranteed to exist and be a directory)
|
||||
*/
|
||||
public File getHome() {
|
||||
String rooHome = getHomeAsString();
|
||||
File f = new File(rooHome);
|
||||
Assert.isTrue(!f.exists() || (f.exists() && f.isDirectory()), "Path '" + f.getAbsolutePath() + "' must be a directory, or it must not exist");
|
||||
if (!f.exists()) {
|
||||
f.mkdirs();
|
||||
}
|
||||
Assert.isTrue(f.exists() && f.isDirectory(), "Path '" + f.getAbsolutePath() + "' is not a directory; please specify roo.home system property correctly");
|
||||
return f;
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple implementation of {@link #flash(Level, String, String)} that simply displays the message via the logger. It is
|
||||
* strongly recommended shell implementations override this method with a more effective approach.
|
||||
*/
|
||||
public void flash(final Level level, final String message, final String slot) {
|
||||
Assert.notNull(level, "Level is required for a flash message");
|
||||
Assert.notNull(message, "Message is required for a flash message");
|
||||
Assert.hasText(slot, "Slot name must be specified for a flash message");
|
||||
if (!("".equals(message))) {
|
||||
logger.log(level, message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package org.springframework.roo.shell;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Annotates a method that can indicate whether a particular command is presently
|
||||
* available or not.
|
||||
*
|
||||
* <p>
|
||||
* This annotation must only be applied to a public no-argument method that returns primitive boolean.
|
||||
* The method should be inexpensive to evaluate, as this method can be called very
|
||||
* frequently. If expensive operations are necessary to compute command availability,
|
||||
* it is suggested the method return a boolean field that is maintained using the observer
|
||||
* pattern.
|
||||
*
|
||||
* <p>
|
||||
* It is possible that a particular availability method might be able to represent the
|
||||
* availability status of multiple commands. As such, an availability indicator annotation
|
||||
* will indicate the commands that it applies to. If a specific command has multiple
|
||||
* aliases (ie by using an array for {@link CliCommand#value()}), only one of the commands
|
||||
* need to be specified in the {@link CliAvailabilityIndicator} annotation.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @since 1.0
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.METHOD)
|
||||
public @interface CliAvailabilityIndicator {
|
||||
|
||||
/**
|
||||
* @return the name of the command or commands that this availability indicator represents
|
||||
*/
|
||||
String[] value();
|
||||
}
|
||||
22
src/main/java/org/springframework/roo/shell/CliCommand.java
Normal file
@@ -0,0 +1,22 @@
|
||||
package org.springframework.roo.shell;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.METHOD)
|
||||
public @interface CliCommand {
|
||||
|
||||
/**
|
||||
* @return one or more strings which must serve as the start of a particular command in order to match this method
|
||||
* (these must be unique within the entire application; if not unique, behaviour is not specified)
|
||||
*/
|
||||
String[] value();
|
||||
|
||||
/**
|
||||
* @return a help message for this command (the default is a blank String, which means there is no help)
|
||||
*/
|
||||
String help() default "";
|
||||
}
|
||||
63
src/main/java/org/springframework/roo/shell/CliOption.java
Normal file
@@ -0,0 +1,63 @@
|
||||
package org.springframework.roo.shell;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.PARAMETER)
|
||||
public @interface CliOption {
|
||||
|
||||
/**
|
||||
* @return if true, the user cannot specify this option and it is provided by the shell infrastructure
|
||||
* (defaults to false)
|
||||
*/
|
||||
boolean systemProvided() default false;
|
||||
|
||||
/**
|
||||
* @return the name of the option, which must be unique within this {@link CliCommand} (an empty String may
|
||||
* be given, which would denote this option is the default for the command)
|
||||
*/
|
||||
String[] key();
|
||||
|
||||
/**
|
||||
* @return true if this option must be specified one way or the other by the user (defaults to false)
|
||||
*/
|
||||
boolean mandatory() default false;
|
||||
|
||||
/**
|
||||
* @return the default value to use if this option is unspecified by the user (defaults to __NULL__, which causes null to
|
||||
* be presented to any non-primitive parameter)
|
||||
*/
|
||||
String unspecifiedDefaultValue() default "__NULL__";
|
||||
|
||||
/**
|
||||
* @return the default value to use if this option is included by the user, but they didn't specify an
|
||||
* actual value (most commonly used for flags; defaults to __NULL__, which causes null to
|
||||
* be presented to any non-primitive parameter)
|
||||
*/
|
||||
String specifiedDefaultValue() default "__NULL__";
|
||||
|
||||
/**
|
||||
* Returns a string providing context-specific information (e.g. a comma-delimited
|
||||
* set of keywords) to the {@link Converter} that handles the annotated parameter's type.
|
||||
* <p>
|
||||
* For example, if a method parameter "thing" of type "Thing" is annotated as
|
||||
* follows:
|
||||
* <pre>@CliOption(..., optionContext = "foo,bar", ...) Thing thing</pre>
|
||||
* ... then the {@link Converter} that converts the text entered by the user
|
||||
* into an instance of Thing will be passed "foo,bar" as the value of the
|
||||
* <code>optionContext</code> parameter in its public methods. This allows
|
||||
* the behaviour of that Converter to be individually customised for each
|
||||
* {@link CliOption} of each {@link CliCommand}.
|
||||
*
|
||||
* @return a non-<code>null</code> string (can be empty)
|
||||
*/
|
||||
String optionContext() default "";
|
||||
|
||||
/**
|
||||
* @return a help message for this option (the default is a blank String, which means there is no help)
|
||||
*/
|
||||
String help() default "";
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package org.springframework.roo.shell;
|
||||
|
||||
/**
|
||||
* Utility methods relating to shell option contexts
|
||||
*/
|
||||
public final class CliOptionContext {
|
||||
|
||||
// Class fields
|
||||
private static ThreadLocal<String> optionContextHolder = new ThreadLocal<String>();
|
||||
|
||||
/**
|
||||
* Returns the option context for the current thread.
|
||||
*
|
||||
* @return <code>null</code> if none has been set
|
||||
*/
|
||||
public static String getOptionContext() {
|
||||
return optionContextHolder.get();
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores the given option context for the current thread.
|
||||
*
|
||||
* @param optionContext the option context to store
|
||||
*/
|
||||
public static void setOptionContext(final String optionContext) {
|
||||
optionContextHolder.set(optionContext);
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the option context for the current thread.
|
||||
*/
|
||||
public static void resetOptionContext() {
|
||||
optionContextHolder.remove();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor is private to prevent instantiation
|
||||
*/
|
||||
private CliOptionContext() {}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package org.springframework.roo.shell;
|
||||
|
||||
/**
|
||||
* Utility methods relating to shell simple parser contexts.
|
||||
*/
|
||||
public final class CliSimpleParserContext {
|
||||
|
||||
// Class fields
|
||||
private static ThreadLocal<SimpleParser> simpleParserContextHolder = new ThreadLocal<SimpleParser>();
|
||||
|
||||
public static Parser getSimpleParserContext() {
|
||||
return simpleParserContextHolder.get();
|
||||
}
|
||||
|
||||
public static void setSimpleParserContext(final SimpleParser simpleParserContext) {
|
||||
simpleParserContextHolder.set(simpleParserContext);
|
||||
}
|
||||
|
||||
public static void resetSimpleParserContext() {
|
||||
simpleParserContextHolder.remove();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor is private to prevent instantiation
|
||||
*/
|
||||
private CliSimpleParserContext() {}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package org.springframework.roo.shell;
|
||||
|
||||
/**
|
||||
* Marker interface indicating a provider of one or more shell commands.
|
||||
*/
|
||||
public interface CommandMarker {}
|
||||
92
src/main/java/org/springframework/roo/shell/Completion.java
Normal file
@@ -0,0 +1,92 @@
|
||||
package org.springframework.roo.shell;
|
||||
|
||||
import org.springframework.roo.support.util.AnsiEscapeCode;
|
||||
import org.springframework.roo.support.util.StringUtils;
|
||||
|
||||
public class Completion {
|
||||
|
||||
// Fields
|
||||
private final int order;
|
||||
private final String formattedValue;
|
||||
private final String heading;
|
||||
private final String value;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
public Completion(final String value) {
|
||||
this(value, value, null, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param value
|
||||
* @param formattedValue
|
||||
* @param heading
|
||||
* @param order
|
||||
*/
|
||||
public Completion(final String value, final String formattedValue, String heading, final int order) {
|
||||
this.formattedValue = formattedValue;
|
||||
this.order = order;
|
||||
this.value = value;
|
||||
if (StringUtils.hasText(heading)) {
|
||||
heading = AnsiEscapeCode.decorate(heading, AnsiEscapeCode.UNDERSCORE, AnsiEscapeCode.FG_GREEN);
|
||||
}
|
||||
this.heading = heading;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getFormattedValue() {
|
||||
return formattedValue;
|
||||
}
|
||||
|
||||
public String getHeading() {
|
||||
return heading;
|
||||
}
|
||||
|
||||
public int getOrder() {
|
||||
return order;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return order + ". " + heading + " - " + value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final Completion that = (Completion) o;
|
||||
if (formattedValue != null ? !formattedValue.equals(that.formattedValue) : that.formattedValue != null) {
|
||||
return false;
|
||||
}
|
||||
if (heading != null ? !heading.equals(that.heading) : that.heading != null) {
|
||||
return false;
|
||||
}
|
||||
if (value != null ? !value.equals(that.value) : that.value != null) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = value != null ? value.hashCode() : 0;
|
||||
result = 31 * result + (formattedValue != null ? formattedValue.hashCode() : 0);
|
||||
result = 31 * result + (heading != null ? heading.hashCode() : 0);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
58
src/main/java/org/springframework/roo/shell/Converter.java
Normal file
@@ -0,0 +1,58 @@
|
||||
package org.springframework.roo.shell;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Converts between Strings (as displayed by and entered via the shell) and Java objects
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @param <T> the type being converted to/from
|
||||
*/
|
||||
public interface Converter<T> {
|
||||
|
||||
/**
|
||||
* Indicates whether this converter supports the given type in the given option context
|
||||
*
|
||||
* @param type the type being checked
|
||||
* @param optionContext a non-<code>null</code> string that customises the
|
||||
* behaviour of this converter for a given {@link CliOption} of a given
|
||||
* {@link CliCommand}; the contents will have special meaning to this
|
||||
* converter (e.g. be a comma-separated list of keywords known to this
|
||||
* converter)
|
||||
* @return see above
|
||||
*/
|
||||
boolean supports(Class<?> type, String optionContext);
|
||||
|
||||
/**
|
||||
* Converts from the given String value to type T
|
||||
*
|
||||
* @param value the value to convert
|
||||
* @param targetType the type being converted to; can't be <code>null</code>
|
||||
* @param optionContext a non-<code>null</code> string that customises the
|
||||
* behaviour of this converter for a given {@link CliOption} of a given
|
||||
* {@link CliCommand}; the contents will have special meaning to this
|
||||
* converter (e.g. be a comma-separated list of keywords known to this
|
||||
* converter)
|
||||
* @return see above
|
||||
* @throws RuntimeException if the given value could not be converted
|
||||
*/
|
||||
T convertFromText(String value, Class<?> targetType, String optionContext);
|
||||
|
||||
/**
|
||||
* Populates the given list with the possible completions
|
||||
*
|
||||
* @param completions the list to populate; can't be <code>null</code>
|
||||
* @param targetType the type of parameter for which a string is being entered
|
||||
* @param existingData what the user has typed so far
|
||||
* @param optionContext a non-<code>null</code> string that customises the
|
||||
* behaviour of this converter for a given {@link CliOption} of a given
|
||||
* {@link CliCommand}; the contents will have special meaning to this
|
||||
* converter (e.g. be a comma-separated list of keywords known to this
|
||||
* converter)
|
||||
* @param target
|
||||
* @return <code>true</code> if all the added completions are complete
|
||||
* values, or <code>false</code> if the user can press TAB to add further
|
||||
* information to some or all of them
|
||||
*/
|
||||
boolean getAllPossibleValues(List<Completion> completions, Class<?> targetType, String existingData, String optionContext, MethodTarget target);
|
||||
}
|
||||