This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
main() { | |
local dita_home="$HOME/Git/dita-ot/src/main" | |
local input="$PWD/dita-1.2-specification.ditamap" | |
local classpath="$dita_home/lib/ant-apache-resolver-1.9.4.jar" | |
classpath=$classpath:"$dita_home/lib/ant-launcher.jar" | |
classpath=$classpath:"$dita_home/lib/ant.jar" | |
classpath=$classpath:"$dita_home/lib/commons-codec-1.9.jar" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Fixtures { | |
val Stylesheet = new File("/opt/dita-ot/xsl/preprocess/conrefImpl.xsl") | |
} | |
class MySpecification extends XsltSpecification(Fixtures.Stylesheet) { | |
"@conref to existing element is resolved" >> { | |
becomes( | |
<p domains="(topic hi-d)" conref="a.dita#b/c"/>, | |
<p domains="(topic hi-d)">d</p>, | |
MockFile("a.dita", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare namespace saxon="http://saxon.sf.net/"; | |
declare option saxon:output "method=xml"; | |
declare option saxon:output "indent=yes"; | |
declare option saxon:output "omit-xml-declaration=yes"; | |
(: Requires Saxon-PE or Saxon-EE, unfortunately. :) | |
declare variable $stylesheet := local:prepare-stylesheet("test.xsl"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/> | |
<xsl:template match="@* | node()"> | |
<xsl:copy> | |
<xsl:apply-templates select="@* | node()"/> | |
</xsl:copy> | |
</xsl:template> |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
property: started Sun Mar 13 00:18:02 EET 2016 | |
property: finished Sun Mar 13 00:18:03 EET 2016 (706ms) | |
dirname: started Sun Mar 13 00:18:03 EET 2016 | |
dirname: finished Sun Mar 13 00:18:03 EET 2016 (2ms) | |
condition: started Sun Mar 13 00:18:03 EET 2016 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Enable the Gradle daemon and run this until failure: | |
// while gradle --rerun-tasks; do :; done | |
import org.gradle.api.internal.ClassPathRegistry | |
import org.gradle.api.internal.DefaultClassPathProvider | |
import org.gradle.api.internal.DefaultClassPathRegistry | |
import org.gradle.api.internal.classpath.DefaultModuleRegistry | |
import org.gradle.api.internal.classpath.ModuleRegistry | |
import org.gradle.api.internal.project.antbuilder.DefaultIsolatedAntBuilder | |
import org.gradle.internal.classloader.DefaultClassLoaderFactory |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Save this as settings.gradle in the project root directory | |
startParameter.setBuildFile(new File(rootDir, 'build.gradle')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function prompt_lambda_precmd { | |
setopt LOCAL_OPTIONS | |
unsetopt XTRACE KSH_ARRAYS | |
prompt_lambda_pwd | |
# Get Git repository information. | |
if (( $+functions[git-info] )); then | |
git-info | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:template match="*[contains(@class, ' topic/topic ')]"> | |
<xsl:message terminate="yes"> | |
<xsl:call-template name="getVariable"> | |
<xsl:with-param name="id" select="'Warning'"/> | |
</xsl:call-template> | |
</xsl:message> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Define a Saxon integrated extension function that checks whether | |
; the given element has the given DITA class. | |
; | |
; For example, given: | |
; | |
; <topic id="topic" class="- topic/topic "> ... </topic> | |
; | |
; This XPath function, when defined and aliased under the "dita" | |
; namespace prefix, will return true for that element: | |
; |