diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..cac07840 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Mac Finder files +.DS_Store diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 00000000..f5233523 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,3 @@ +# These owners will be the default owners for everything in +# the repo. +* @oreillymedia/tools-team \ No newline at end of file diff --git a/htmlbook-xsl/common.xsl b/htmlbook-xsl/common.xsl index 159d734a..1bcdbbe3 100755 --- a/htmlbook-xsl/common.xsl +++ b/htmlbook-xsl/common.xsl @@ -189,11 +189,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -241,6 +282,10 @@ - + + + - + + + + + + + + + + e:accessibility-terms + e:accessibility-features + e:accessibility-hazards + + + + + + + + + + + + + + + + + + + e:term + e:feature + e:hazard + + + + + + + + + + + + + + + + + + e:term + e:feature + e:hazard + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -379,6 +473,31 @@ true + + + + + + + + + + + + + + + + + + + + + + + + + @@ -421,16 +540,6 @@ - - - - - - - - - - @@ -454,7 +563,7 @@ - + diff --git a/htmlbook-xsl/param.xsl b/htmlbook-xsl/param.xsl index 0d2e369b..92694616 100755 --- a/htmlbook-xsl/param.xsl +++ b/htmlbook-xsl/param.xsl @@ -223,6 +223,9 @@ sidebar refsect1 refsect2 refentry +note +tip +warning diff --git a/htmlbook-xsl/tocgen.xsl b/htmlbook-xsl/tocgen.xsl index c5ed6bff..39ab3406 100755 --- a/htmlbook-xsl/tocgen.xsl +++ b/htmlbook-xsl/tocgen.xsl @@ -23,10 +23,12 @@ + + + diff --git a/htmlbook-xsl/xrefgen.xsl b/htmlbook-xsl/xrefgen.xsl index 96ac1738..fb3dba3c 100755 --- a/htmlbook-xsl/xrefgen.xsl +++ b/htmlbook-xsl/xrefgen.xsl @@ -201,7 +201,7 @@ - + @@ -246,6 +246,64 @@ + + + + + + + + + + + + + Cannot output gentext for XREF to Admonition (id: + + ) that does not contain a descendant h1 element + + + ??? + + + + + + + + + + + + + + + + + + + + + + + + + + + + Cannot output gentext for XREF to refsection (id: + + ) that does not contain a descendant h6 element + + + ??? + + + + + + + @@ -550,23 +608,6 @@ - - - - - - - - - - - - - - - - - @@ -727,6 +768,10 @@ contains(substring-after($data-xrefstyle-attr, 'select:'), 'labelnumber')">template:%n xref-number-and-title + + xref-number-and-title + + xref-number-and-title diff --git a/htmlbook-xsl/xspec/.gitignore b/htmlbook-xsl/xspec/.gitignore new file mode 100644 index 00000000..7d289b4e --- /dev/null +++ b/htmlbook-xsl/xspec/.gitignore @@ -0,0 +1,3 @@ +# OS generated files # +###################### +.DS_Store \ No newline at end of file diff --git a/htmlbook-xsl/xspec/bin/xspec.sh b/htmlbook-xsl/xspec/bin/xspec.sh index 541f3d52..37f7cf5c 100755 --- a/htmlbook-xsl/xspec/bin/xspec.sh +++ b/htmlbook-xsl/xspec/bin/xspec.sh @@ -20,7 +20,7 @@ ## and used instead. You just have to ensure it is visible from here ## (aka "ensure it is in the $PATH"). Even without packaging support, ## this script is a useful way to launch Saxon from the shell. -## +## ## TODO: With the Packaging System, there should be no need to set the ## XSPEC_HOME, as we could use absolute public URIs for the public ## components... @@ -34,21 +34,23 @@ usage() { if test -n "$1"; then echo "$1" - echo; + echo fi - echo "Usage: xspec [-t|-q|-c|-h] filename [coverage]" + echo "Usage: xspec [-t|-q|-s|-c|-j|-catalog file|-h] file" echo - echo " filename the XSpec document" - echo " -t test an XSLT stylesheet (the default)" - echo " -q test an XQuery module (mutually exclusive with -t)" - echo " -c output test coverage report" - echo " -h display this help message" - echo " coverage deprecated, use -c instead" + echo " file the XSpec document" + echo " -t test an XSLT stylesheet (the default)" + echo " -q test an XQuery module (mutually exclusive with -t and -s)" + echo " -s test a Schematron schema (mutually exclusive with -t and -q)" + echo " -c output test coverage report (XSLT only)" + echo " -j output JUnit report" + echo " -catalog file use XML Catalog file to locate resources" + echo " -h display this help message" } die() { echo - echo "*** $@" >&2 + echo "*** $*" >&2 exit 1 } @@ -57,25 +59,40 @@ die() { # script for Saxon [1]. If it is present, that means the user already # configured it, so there is no point to duplicate the logic here. # Just use it. -# [1]http://code.google.com/p/expath-pkg/source/browse/trunk/saxon/pkg-saxon/src/shell/saxon -if which saxon > /dev/null 2>&1; then +if command -v saxon > /dev/null 2>&1 && saxon --help | grep "EXPath Packaging" > /dev/null 2>&1; then echo Saxon script found, use it. echo xslt() { - saxon --add-cp "${XSPEC_HOME}/java/" --xsl "$@" + saxon \ + --java -Dxspec.coverage.ignore="${TEST_DIR}" \ + --java -Dxspec.coverage.xml="${COVERAGE_XML}" \ + --java -Dxspec.xspecfile="${XSPEC}" \ + --add-cp "${XSPEC_HOME}/java/" ${CATALOG:+"$CATALOG"} --xsl "$@" } xquery() { - saxon --add-cp "${XSPEC_HOME}/java/" --xq "$@" + saxon \ + --java -Dxspec.coverage.ignore="${TEST_DIR}" \ + --java -Dxspec.coverage.xml="${COVERAGE_XML}" \ + --java -Dxspec.xspecfile="${XSPEC}" \ + --add-cp "${XSPEC_HOME}/java/" ${CATALOG:+"$CATALOG"} --xq "$@" } else echo Saxon script not found, invoking JVM directly instead. echo xslt() { - java -cp "$CP" net.sf.saxon.Transform "$@" + java \ + -Dxspec.coverage.ignore="${TEST_DIR}" \ + -Dxspec.coverage.xml="${COVERAGE_XML}" \ + -Dxspec.xspecfile="${XSPEC}" \ + -cp "$CP" net.sf.saxon.Transform ${CATALOG:+"$CATALOG"} "$@" } xquery() { - java -cp "$CP" net.sf.saxon.Query "$@" + java \ + -Dxspec.coverage.ignore="${TEST_DIR}" \ + -Dxspec.coverage.xml="${COVERAGE_XML}" \ + -Dxspec.xspecfile="${XSPEC}" \ + -cp "$CP" net.sf.saxon.Query ${CATALOG:+"$CATALOG"} "$@" } fi @@ -84,14 +101,14 @@ fi ## # the command to use to open the final HTML report -if [ `uname` = "Darwin" ]; then - OPEN=open -else - OPEN=see -fi +#if [ $(uname) = "Darwin" ]; then +# OPEN=open +#else +# OPEN=see +#fi # the classpath delimiter (aka ':', except ';' on Cygwin) -if uname | grep -i cygwin >/dev/null 2>&1; then +if uname | grep -i cygwin > /dev/null 2>&1; then CP_DELIM=";" else CP_DELIM=":" @@ -100,45 +117,45 @@ fi # set XSPEC_HOME if it has not been set by the user (set it to the # parent dir of this script) if test -z "$XSPEC_HOME"; then - XSPEC_HOME=`dirname $0`; - XSPEC_HOME=`dirname $XSPEC_HOME`; + XSPEC_HOME=$(dirname "$0") + XSPEC_HOME=$(dirname "$XSPEC_HOME") fi # safety checks if test \! -d "${XSPEC_HOME}"; then echo "ERROR: XSPEC_HOME is not a directory: ${XSPEC_HOME}" - exit 1; + exit 1 fi if test \! -f "${XSPEC_HOME}/src/compiler/generate-common-tests.xsl"; then echo "ERROR: XSPEC_HOME seems to be corrupted: ${XSPEC_HOME}" - exit 1; + exit 1 fi # set SAXON_CP (either it has been by the user, or set it from SAXON_HOME) +unset USE_SAXON_HOME + if test -z "$SAXON_CP"; then - # Set this variable in your environment or here, if you don't set SAXON_CP - # SAXON_HOME=/path/to/saxon/dir if test -z "$SAXON_HOME"; then - echo "SAXON_CP and SAXON_HOME both not set!" -# die "SAXON_CP and SAXON_HOME both not set!" + echo "SAXON_CP and SAXON_HOME both not set!" + # die "SAXON_CP and SAXON_HOME both not set!" + else + USE_SAXON_HOME=1 + for f in \ + "${SAXON_HOME}"/saxon9?e.jar \ + "${SAXON_HOME}"/saxon-?e-??.?*.jar; do + [ -f "${f}" ] && SAXON_CP="${f}" + done fi - if test -f "${SAXON_HOME}/saxon9ee.jar"; then - SAXON_CP="${SAXON_HOME}/saxon9ee.jar"; - elif test -f "${SAXON_HOME}/saxon9pe.jar"; then - SAXON_CP="${SAXON_HOME}/saxon9pe.jar"; - elif test -f "${SAXON_HOME}/saxon9he.jar"; then - SAXON_CP="${SAXON_HOME}/saxon9he.jar"; - elif test -f "${SAXON_HOME}/saxon9sa.jar"; then - SAXON_CP="${SAXON_HOME}/saxon9sa.jar"; - elif test -f "${SAXON_HOME}/saxon9.jar"; then - SAXON_CP="${SAXON_HOME}/saxon9.jar"; - elif test -f "${SAXON_HOME}/saxon8sa.jar"; then - SAXON_CP="${SAXON_HOME}/saxon8sa.jar"; - elif test -f "${SAXON_HOME}/saxon8.jar"; then - SAXON_CP="${SAXON_HOME}/saxon8.jar"; +fi + +if [ -n "${USE_SAXON_HOME}" ]; then + if [ -z "${SAXON_CP}" ]; then + echo "Saxon jar cannot be found in SAXON_HOME: $SAXON_HOME" + # die "Saxon jar cannot be found in SAXON_HOME: $SAXON_HOME" else - echo "Saxon jar cannot be found in SAXON_HOME: $SAXON_HOME" -# die "Saxon jar cannot be found in SAXON_HOME: $SAXON_HOME" + if test -f "${SAXON_HOME}/xml-resolver-1.2.jar"; then + SAXON_CP="${SAXON_CP}${CP_DELIM}${SAXON_HOME}/xml-resolver-1.2.jar" + fi fi fi @@ -148,7 +165,7 @@ CP="${SAXON_CP}${CP_DELIM}${XSPEC_HOME}/java/" ## options ################################################################### ## -while echo "$1" | grep -- ^- >/dev/null 2>&1; do +while echo "$1" | grep -- ^- > /dev/null 2>&1; do case "$1" in # XSLT -t) @@ -156,32 +173,79 @@ while echo "$1" | grep -- ^- >/dev/null 2>&1; do usage "-t and -q are mutually exclusive" exit 1 fi - XSLT=1;; + if test -n "$SCHEMATRON"; then + usage "-s and -t are mutually exclusive" + exit 1 + fi + XSLT=1 + ;; # XQuery -q) if test -n "$XSLT"; then usage "-t and -q are mutually exclusive" exit 1 fi - XQUERY=1;; + if test -n "$SCHEMATRON"; then + usage "-s and -q are mutually exclusive" + exit 1 + fi + XQUERY=1 + ;; + # Schematron + -s) + if test -n "$XQUERY"; then + usage "-s and -q are mutually exclusive" + exit 1 + fi + if test -n "$XSLT"; then + usage "-s and -t are mutually exclusive" + exit 1 + fi + SCHEMATRON=1 + ;; # Coverage -c) - COVERAGE=1;; + COVERAGE=1 + ;; + # JUnit report + -j) + JUNIT=1 + ;; + # Catalog + -catalog) + shift + XML_CATALOG="$1" + ;; # Help! -h) usage - exit 0;; + exit 0 + ;; # Unknown option! -*) usage "Error: Unknown option: $1" - exit 1;; + exit 1 + ;; esac - shift; + shift done +# Coverage is only for XSLT +if [ -n "${COVERAGE}" ] && [ -n "${XQUERY}${SCHEMATRON}" ]; then + usage "Coverage is supported only for XSLT" + exit 1 +fi + +# set CATALOG option for Saxon if XML_CATALOG has been set +if test -n "$XML_CATALOG"; then + CATALOG="-catalog:$XML_CATALOG" +else + CATALOG= +fi + # set XSLT if XQuery has not been set (that's the default) if test -z "$XQUERY"; then - XSLT=1; + XSLT=1 fi XSPEC=$1 @@ -191,46 +255,82 @@ if [ ! -f "$XSPEC" ]; then fi if [ -n "$2" ]; then - if [ "$2" != coverage ]; then - usage "Error: Extra option: $2" - exit 1 - fi - echo "Long-form option 'coverage' deprecated, use '-c' instead." - COVERAGE=1 - if [ -n "$3" ]; then - usage "Error: Extra option: $3" - exit 1 - fi + usage "Error: Extra option: $2" + exit 1 fi ## ## files and dirs ############################################################ ## -TEST_DIR=$(dirname "$XSPEC")/xspec -TARGET_FILE_NAME=$(basename "$XSPEC" | sed 's:\...*$::') +# TEST_DIR (may be relative, may not exist) +if [ -z "$TEST_DIR" ]; then + TEST_DIR=$(dirname "$XSPEC")/xspec +fi + +TARGET_FILE_NAME=$(basename "$XSPEC" | sed 's:\.[^.]*$::') +COMPILED="${TEST_DIR}/${TARGET_FILE_NAME}-compiled" if test -n "$XSLT"; then - COMPILED=$TEST_DIR/$TARGET_FILE_NAME.xsl + COMPILED="${COMPILED}.xsl" else - COMPILED=$TEST_DIR/$TARGET_FILE_NAME.xq + COMPILED="${COMPILED}.xq" fi COVERAGE_XML=$TEST_DIR/$TARGET_FILE_NAME-coverage.xml -COVERAGE_HTML=$TEST_DIR/$TARGET_FILE_NAME-coverage.html +if [ -z "${COVERAGE_HTML}" ]; then + COVERAGE_HTML="${TEST_DIR}/${TARGET_FILE_NAME}-coverage.html" +fi RESULT=$TEST_DIR/$TARGET_FILE_NAME-result.xml HTML=$TEST_DIR/$TARGET_FILE_NAME-result.html +JUNIT_RESULT=$TEST_DIR/$TARGET_FILE_NAME-junit.xml COVERAGE_CLASS=com.jenitennison.xslt.tests.XSLTCoverageTraceListener if [ ! -d "$TEST_DIR" ]; then echo "Creating XSpec Directory at $TEST_DIR..." mkdir "$TEST_DIR" echo -fi +fi ## ## compile the suite ######################################################### ## +if test -n "$SCHEMATRON"; then + SCH_PREPROCESSED_XSPEC="${TEST_DIR}/${TARGET_FILE_NAME}-sch-preprocessed.xspec" + SCH_PREPROCESSED_XSL="${TEST_DIR}/${TARGET_FILE_NAME}-sch-preprocessed.xsl" + + SCHUT_TO_XSLT_PARAMS=() + if [ -n "${SCHEMATRON_XSLT_INCLUDE}" ]; then + SCHUT_TO_XSLT_PARAMS+=("+STEP1-PREPROCESSOR-DOC=${SCHEMATRON_XSLT_INCLUDE}") + fi + if [ -n "${SCHEMATRON_XSLT_EXPAND}" ]; then + SCHUT_TO_XSLT_PARAMS+=("+STEP2-PREPROCESSOR-DOC=${SCHEMATRON_XSLT_EXPAND}") + fi + if [ -n "${SCHEMATRON_XSLT_COMPILE}" ]; then + SCHUT_TO_XSLT_PARAMS+=("+STEP3-PREPROCESSOR-DOC=${SCHEMATRON_XSLT_COMPILE}") + fi + + echo + echo "Converting Schematron into XSLT..." + xslt \ + -o:"${SCH_PREPROCESSED_XSL}" \ + -s:"${XSPEC}" \ + -xsl:"${XSPEC_HOME}/src/schematron/schut-to-xslt.xsl" \ + "${SCHUT_TO_XSLT_PARAMS[@]}" \ + || die "Error converting Schematron into XSLT" + + echo + echo "Converting Schematron XSpec into XSLT XSpec..." + xslt -o:"${SCH_PREPROCESSED_XSPEC}" \ + -s:"${XSPEC}" \ + -xsl:"${XSPEC_HOME}/src/schematron/schut-to-xspec.xsl" \ + +stylesheet-doc="${SCH_PREPROCESSED_XSL}" \ + || die "Error converting Schematron XSpec into XSLT XSpec" + XSPEC="${SCH_PREPROCESSED_XSPEC}" + + echo +fi + if test -n "$XSLT"; then COMPILE_SHEET=generate-xspec-tests.xsl else @@ -246,29 +346,40 @@ echo ## run the suite ############################################################# ## +# Init otherwise SC2154 +saxon_custom_options_array=() + +# Split options taking quotes into account (like command arguments) +# https://superuser.com/q/1066455 +declare -a "saxon_custom_options_array=(${SAXON_CUSTOM_OPTIONS})" + echo "Running Tests..." if test -n "$XSLT"; then # for XSLT if test -n "$COVERAGE"; then - echo "Collecting test coverage data; suppressing progress report..." - xslt -T:$COVERAGE_CLASS \ - -o:"$RESULT" -s:"$XSPEC" -xsl:"$COMPILED" \ - -it:{http://www.jenitennison.com/xslt/xspec}main 2> "$COVERAGE_XML" \ + echo "Collecting test coverage data..." + xslt "${saxon_custom_options_array[@]}" \ + -T:$COVERAGE_CLASS \ + -o:"$RESULT" -xsl:"$COMPILED" \ + -it:"{http://www.jenitennison.com/xslt/xspec}main" \ || die "Error collecting test coverage data" else - xslt -o:"$RESULT" -s:"$XSPEC" -xsl:"$COMPILED" \ - -it:{http://www.jenitennison.com/xslt/xspec}main \ + xslt "${saxon_custom_options_array[@]}" \ + -o:"$RESULT" -xsl:"$COMPILED" \ + -it:"{http://www.jenitennison.com/xslt/xspec}main" \ || die "Error running the test suite" fi else # for XQuery if test -n "$COVERAGE"; then - echo "Collecting test coverage data; suppressing progress report..." - xquery -T:$COVERAGE_CLASS \ - -o:"$RESULT" -s:"$XSPEC" "$COMPILED" 2> "$COVERAGE_XML" \ + echo "Collecting test coverage data..." + xquery "${saxon_custom_options_array[@]}" \ + -T:$COVERAGE_CLASS \ + -o:"$RESULT" -q:"$COMPILED" \ || die "Error collecting test coverage data" else - xquery -o:"$RESULT" -s:"$XSPEC" "$COMPILED" \ + xquery "${saxon_custom_options_array[@]}" \ + -o:"$RESULT" -q:"$COMPILED" \ || die "Error running the test suite" fi fi @@ -277,25 +388,53 @@ fi ## format the report ######################################################### ## +if [ -z "${HTML_REPORTER_XSL}" ]; then + HTML_REPORTER_XSL="${XSPEC_HOME}/src/reporter/format-xspec-report.xsl" +fi +if [ -z "${COVERAGE_REPORTER_XSL}" ]; then + COVERAGE_REPORTER_XSL="$XSPEC_HOME/src/reporter/coverage-report.xsl" +fi + echo echo "Formatting Report..." xslt -o:"$HTML" \ -s:"$RESULT" \ - -xsl:"$XSPEC_HOME/src/reporter/format-xspec-report.xsl" \ - || die "Error formating the report" + -xsl:"${HTML_REPORTER_XSL}" \ + inline-css=true \ + || die "Error formatting the report" if test -n "$COVERAGE"; then - xslt -l:on \ + echo + echo "Formatting Coverage Report..." + xslt -config:"${XSPEC_HOME}/src/reporter/coverage-report-config.xml" \ -o:"$COVERAGE_HTML" \ -s:"$COVERAGE_XML" \ - -xsl:"$XSPEC_HOME/src/reporter/coverage-report.xsl" \ - "tests=$XSPEC" \ - "pwd=file:`pwd`/" \ - || die "Error formating the coverage report" + -xsl:"${COVERAGE_REPORTER_XSL}" \ + inline-css=true \ + || die "Error formatting the coverage report" echo "Report available at $COVERAGE_HTML" #$OPEN "$COVERAGE_HTML" +elif test -n "$JUNIT"; then + echo + echo "Generating JUnit Report..." + xslt -o:"$JUNIT_RESULT" \ + -s:"$RESULT" \ + -xsl:"$XSPEC_HOME/src/reporter/junit-report.xsl" \ + || die "Error formatting the JUnit report" + echo "Report available at $JUNIT_RESULT" else echo "Report available at $HTML" #$OPEN "$HTML" fi -echo "Done." +## +## cleanup +## +if test -n "$SCHEMATRON"; then + rm -f "$SCH_PREPROCESSED_XSPEC" + rm -f "$TEST_DIR/$TARGET_FILE_NAME-var.txt" + rm -f "$TEST_DIR/$TARGET_FILE_NAME-step1.sch" + rm -f "$TEST_DIR/$TARGET_FILE_NAME-step2.sch" + rm -f "$SCH_PREPROCESSED_XSL" +fi + +echo "Done." \ No newline at end of file diff --git a/htmlbook-xsl/xspec/chunk.xspec b/htmlbook-xsl/xspec/chunk.xspec index 2fa57527..ce1a518a 100755 --- a/htmlbook-xsl/xspec/chunk.xspec +++ b/htmlbook-xsl/xspec/chunk.xspec @@ -47,7 +47,9 @@ toc:lower-roman - + @@ -56,7 +58,9 @@ toc:lower-roman - + @@ -68,7 +72,9 @@ toc:lower-roman - +

Here comes a cross-reference: see PLACEHOLDER

@@ -96,7 +102,9 @@ toc:lower-roman - +

Here comes an XREF with an href pointing to another file:

@@ -183,7 +191,9 @@ toc:lower-roman - +
DO NOT TOUCH ME @@ -260,7 +270,9 @@ toc:lower-roman - +

Here comes a cross-reference: see

@@ -282,7 +294,9 @@ toc:lower-roman - +

Here comes a cross-reference: see

@@ -304,7 +318,9 @@ toc:lower-roman - +

Here comes a cross-reference: see

@@ -356,7 +372,9 @@ toc:lower-roman
- + ... @@ -370,42 +388,54 @@ toc:lower-roman - + ... - + ... - + ... - + ... - + - + @@ -599,17 +629,23 @@ toc:lower-roman - + 1-2 - + Chapter 1, AWESOME CHAPTER - + sect1 @@ -650,7 +686,9 @@ toc:lower-roman - + chapter sidebar @@ -659,7 +697,9 @@ sidebar - + chapter sidebar @@ -668,7 +708,9 @@ sidebar - + chapter sidebar @@ -677,14 +719,18 @@ sidebar - + - + diff --git a/htmlbook-xsl/xspec/common.xspec b/htmlbook-xsl/xspec/common.xspec index ab4f6c45..13578a9f 100755 --- a/htmlbook-xsl/xspec/common.xspec +++ b/htmlbook-xsl/xspec/common.xspec @@ -353,6 +353,235 @@ sect5:none I-2 + + + + + + + +
+

This is a chapter

+

A paragraph for good measure!

+ +
+
I am formal and have a caption.
+

$2 + 2 = 4$

+
+

A paragraph for good measure!

+ +
+

$2 + 2 = 5$

+
+

A paragraph for good measure!

+ +
+
+

$2 + 2 = 16$

+
+
+
+ + + + + + 1 + + + + + + + + + + + + + + + + 2 + + + + + + + + 1-1 + + + + + + + + + + + + + + + + 1-2 + + +
+ + + + +
+

This is a chapter

+

A paragraph for good measure!

+ +
+
I am formal and have a caption.
+

$2 + 2 = 4$

+
+

A paragraph for good measure!

+ +
+

$2 + 2 = 5$

+
+

A paragraph for good measure!

+ +
+
+

$2 + 2 = 16$

+
+
+
+ + + + + + 1 + + + + + + + + + + + + + + + + 2 + + + + + + + + P-1 + + + + + + + + + + + + + + + + P-2 + + +
+ + + + + + +
+

This is a chapter

+

A paragraph for good measure!

+ +
+
I am formal and have a caption.
+

$2 + 2 = 4$

+
+

A paragraph for good measure!

+ +
+

$2 + 2 = 5$

+
+

A paragraph for good measure!

+ +
+
+

$2 + 2 = 16$

+
+
+
+ + + + + + 1 + + + + + + + + + + + + + + + + 2 + + + + + + + + A-1 + + + + + + + + + + + + + + + + A-2 + + +
+
+ @@ -1085,7 +1314,9 @@ sect5:none - +
@@ -1109,7 +1340,9 @@ sect5:none - +
@@ -1141,7 +1374,9 @@ sect5:none - + @@ -1189,7 +1424,9 @@ sect5:none - + @@ -1277,7 +1514,7 @@ sect5:none - + refentry @@ -1328,7 +1565,7 @@ sect5:none - + chapter sidebar @@ -1408,7 +1645,7 @@ sect1 underline - + @@ -1676,4 +1913,4 @@ sect1 4 - + \ No newline at end of file diff --git a/htmlbook-xsl/xspec/elements.xspec b/htmlbook-xsl/xspec/elements.xspec index f3a50b68..b4d7c872 100755 --- a/htmlbook-xsl/xspec/elements.xspec +++ b/htmlbook-xsl/xspec/elements.xspec @@ -153,7 +153,9 @@ sect5:1 - +

This is the Chapter title

@@ -164,7 +166,9 @@ sect5:1 - +
@@ -187,7 +191,9 @@ sect5:1 - +

This is the Section title

@@ -198,7 +204,9 @@ sect5:1 - +
@@ -221,7 +229,9 @@ sect5:1 - +

This is the Section title

@@ -232,7 +242,9 @@ sect5:1 - +
@@ -255,7 +267,9 @@ sect5:1 - +

This is the Section title

@@ -266,7 +280,9 @@ sect5:1 - +
@@ -289,7 +305,9 @@ sect5:1 - +

This is the Section title

@@ -300,7 +318,9 @@ sect5:1 - +
@@ -323,7 +343,9 @@ sect5:1 - +
This is the Section title
@@ -334,7 +356,9 @@ sect5:1 - +
@@ -359,7 +383,9 @@ sect5:1 - +

This is the Part title

@@ -404,7 +430,9 @@ sect5:1
- + @@ -434,7 +462,9 @@ sect5:1 - + @@ -480,7 +510,9 @@ sect5:1
- + @@ -510,7 +542,9 @@ sect5:1
- + @@ -557,7 +591,9 @@ sect5:1
- + @@ -587,7 +623,9 @@ sect5:1
- + @@ -633,7 +671,9 @@ sect5:1
- + @@ -663,7 +703,9 @@ sect5:1
- + @@ -709,7 +751,9 @@ sect5:1
- + @@ -739,7 +783,9 @@ sect5:1
- + @@ -785,7 +831,9 @@ sect5:1
- + @@ -815,7 +863,9 @@ sect5:1
- + @@ -864,7 +914,9 @@ sect5:1
- + @@ -901,7 +953,9 @@ sect5:1
- + @@ -943,7 +997,9 @@ sect5:1 - + @@ -973,7 +1029,9 @@ sect5:1 - + @@ -1003,7 +1061,9 @@ sect5:1 - + @@ -1033,7 +1093,9 @@ sect5:1 - + @@ -1215,7 +1277,9 @@ sect5:1
- + @@ -1227,7 +1291,9 @@ sect5:1 - + @@ -1449,7 +1515,9 @@ end - + @@ -1471,7 +1539,9 @@ end - +
import java.applet.*;
@@ -1499,7 +1569,9 @@ public class Scribble extends Applet {
     
   
     
-    
+    
       
         
         
def self.compile_file(filename, *args)
@@ -1535,7 +1607,9 @@ public class Scribble extends Applet {
       
     
 
-    
+    
       
         
         
if css_filename
@@ -1592,18 +1666,18 @@ end
- - + + And this is the footnote - + - - + + 1And this is the footnote @@ -1612,244 +1686,244 @@ end
- - + + - - 1 - - - -
- - - -
-

First chapter

-

This chapter has a couple footnotes:

-

Here's the first footnoteFootnote #1 in Chapter #1

-

Here's the second footnoteFootnote #2 in Chapter #1

-
-
-

Second chapter

-

This chapter also has a couple footnotes:

-

Here's the first footnoteFootnote #1 in Chapter #2

-

Here's the second footnoteFootnote #2 in Chapter #2

-
-
-

Here's a part

-

This part has two footnotes

-

Here's the first footnoteFootnote #1 in Part

-

Here's the second footnoteFootnote #2 in Part

-
-

Third chapter

-

This chapter also has a couple footnotes:

-

Here's the first footnoteFootnote #1 in Chapter #2

-

Here's the second footnoteFootnote #2 in Chapter #2

-

Here's a footnoteref to the second footnote

-
-
-
-

The Appendix

-

The appendix also has a couple footnotes:

-

Here's the first footnoteFootnote #1 in the Appendix

-

Here's the second footnoteFootnote #2 in the Appendix

-
-
- - - - - - - - - Footnote #2 in Chapter #2 - - - - - - - - - - - Footnote #2 in Chapter #2 - - - - - - - - - - - 4Footnote #2 in Chapter #2 - - -
- - - - - - - - - 2Footnote #2 in Chapter #2 - - - - - - - - - - + + 1 + + + +
+ + + +
+

First chapter

+

This chapter has a couple footnotes:

+

Here's the first footnoteFootnote #1 in Chapter #1

+

Here's the second footnoteFootnote #2 in Chapter #1

+
+
+

Second chapter

+

This chapter also has a couple footnotes:

+

Here's the first footnoteFootnote #1 in Chapter #2

+

Here's the second footnoteFootnote #2 in Chapter #2

+
+
+

Here's a part

+

This part has two footnotes

+

Here's the first footnoteFootnote #1 in Part

+

Here's the second footnoteFootnote #2 in Part

+
+

Third chapter

+

This chapter also has a couple footnotes:

+

Here's the first footnoteFootnote #1 in Chapter #2

+

Here's the second footnoteFootnote #2 in Chapter #2

+

Here's a footnoteref to the second footnote

+
+
+
+

The Appendix

+

The appendix also has a couple footnotes:

+

Here's the first footnoteFootnote #1 in the Appendix

+

Here's the second footnoteFootnote #2 in the Appendix

+
+
+ + + + + + + + + Footnote #2 in Chapter #2 + + + + + + + + + + + Footnote #2 in Chapter #2 + + + + + + + + + + + 4Footnote #2 in Chapter #2 + + +
+ + + + + + + + + 2Footnote #2 in Chapter #2 + + + + + + + + + + - - 4 - - - - - - - - - - + + 4 + + + + + + + + + + - - 2 - - - - - - - - - - + + 2 + + + + + + + + + + -

- 4 Footnote #2 in Chapter #2

-
-
- - - - - - - +

+ 4 Footnote #2 in Chapter #2

+ +
+ + + + + + + -

- 2 Footnote #2 in Chapter #2

-
-
- - - - - - +

+ 2 Footnote #2 in Chapter #2

+ +
+ + + + + + - - 8 - - - - - - - - - + + 8 + + + + + + + + + - - 2 - - - - - - - - - 2 - - - - - - - 4 - - - - - - - 5 - - - - - - - 7 - - - - - - - 9 - - - - - - - 2 - - - - - - - 2 - - - - - - - 1 - - - - - - - 1 - - - - - - - 1 - - - - + + 2 + + + + + + + + + 2 + + + + + + + 4 + + + + + + + 5 + + + + + + + 7 + + + + + + + 9 + + + + + + + 2 + + + + + + + 2 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + +

This is the textAnd this is the footnote

@@ -1857,7 +1931,7 @@ end

And now we've got a second paragraph that has a footnoteref here

- + @@ -1872,158 +1946,162 @@ end - - 2 + + 2
- - - - - - - - - - - - - - - - - - - - -
Four colors
VermillionReddishCeruleanBluish
ChartreuseGreenishFuschiaPurplish
TealEggplant
-
- - - - - ... - - - - - -
...
-

a Reddish

-

b Bluish

-

c Greenish

-

d Purplish

-
-
- - - - - - - - d - - - - - - - - - d - - - - - - - c - - -
- - - - - - - - - - - - - - - - - - -
Four colors
VermillionReddishCeruleanBluish
ChartreuseGreenishFuschiaPurplish
TealEggplant
-
- - - - - ... - ... - ... - - - -
...
-

a Reddish

-

b Bluish

-

c Greenish

-

d Purplish

-
-
-
- - - -
-

All about colors

-

The following tableMade with love lists some colors

- - - - - - - - - - - - -
Four colors
VermillionReddishCeruleanBluish
ChartreuseGreenishFuschiaPurplish
-

I hope you found this table accurateIf not, please send errata

-
-
- - - - - - - - - - - - - - - - - - -
- + + + + + + + + + + + + + + + + + + + + +
Four colors
VermillionReddishCeruleanBluish
ChartreuseGreenishFuschiaPurplish
TealEggplant
+
+ + + + + ... + + + + + +
...
+

a Reddish

+

b Bluish

+

c Greenish

+

d Purplish

+
+
+ + + + + + + + d + + + + + + + + + d + + + + + + + c + + +
+ + + + + + + + + + + + + + + + + + +
Four colors
VermillionReddishCeruleanBluish
ChartreuseGreenishFuschiaPurplish
TealEggplant
+
+ + + + + ... + ... + ... + + + +
...
+

a Reddish

+

b Bluish

+

c Greenish

+

d Purplish

+
+
+
+ + + +
+

All about colors

+

The following tableMade with love lists some colors

+ + + + + + + + + + + + +
Four colors
VermillionReddishCeruleanBluish
ChartreuseGreenishFuschiaPurplish
+

I hope you found this table accurateIf not, please send errata

+
+
+ + + + + + + + + + + + + + + + + + +
+ @@ -2125,7 +2203,7 @@ end
- + diff --git a/htmlbook-xsl/xspec/epub.xspec b/htmlbook-xsl/xspec/epub.xspec index ed08c02f..ae01ae9f 100755 --- a/htmlbook-xsl/xspec/epub.xspec +++ b/htmlbook-xsl/xspec/epub.xspec @@ -14,7 +14,9 @@ - +
- + ... - + ... - + ... - + ... - + ... - + ... - + - + @@ -895,7 +1033,9 @@ toc:lower-roman
- + @@ -1150,7 +1290,9 @@ toc:lower-roman - + chapter sidebar @@ -1159,7 +1301,9 @@ sidebar - + chapter sidebar @@ -1168,7 +1312,9 @@ sidebar - + chapter sidebar @@ -1177,14 +1323,18 @@ sidebar - + - + @@ -1228,6 +1378,13 @@ sidebar +
+

I'm Part of the Solution!

+
+

Appendix Title

+

Some text

+
+

AWESOME CHAPTER

Check out this pic:

@@ -1242,6 +1399,8 @@ sidebar

See for lots of awesomeness.

See for awesomeness.

+

See for app awesomeness.

+

See for part awesomeness.

See for yet more awesomeness

AWESOME SUBSECTION

@@ -1256,12 +1415,30 @@ sidebar
1-2 - + - Chapter 1, AWESOME CHAPTER + Chapter 1, “AWESOME CHAPTER“ + + + + + Appendix A, “Appendix Title“ + + + + + Part I, “I'm Part of the Solution!“ - + sect1 @@ -1397,6 +1574,19 @@ sidebar xref-number-and-title + + + app-num-title + + xref-number-and-title + + + + + part-num-title + + xref-number-and-title + bogus_xrefstyle_yo @@ -1467,5 +1657,114 @@ sidebar oreilly.com - + + + + +
+
+

I am a note title!

+

This is a note

+
+
+

I am a tip title!

+

This is a tip

+
+
+

I am a warning title!

+

This is a warning

+
+
+
+ + + + “I am a note title!” + + + + “I am a tip title!” + + + + + “I am a warning title!” + +
+ + + +
+
+

This is a note

+
+
+

This is a tip

+
+
+

This is a warning

+
+
+
+ + + + ??? + + + + + ??? + + + + + ??? + +
+ + + + + note + tip + warning + +
+

XREF to Note:

+ +

XREF to Tip:

+ +

XREF to Warning:

+ +
+

I am a title!

+

This is a note

+
+ +
+

I am a title!

+

This is a tip

+
+ +
+

I am a title!

+

This is a warning

+
+
+
+ + + ... +
+ + + ... + + + + ... + +
+ diff --git a/index.html b/index.html index 0cfa1119..78a3ade7 100644 --- a/index.html +++ b/index.html @@ -3,43 +3,43 @@ HTMLBook - +