svn commit: r41006 - in projects/xml-tools/share: mk xml
Gabor Kovesdan
gabor at FreeBSD.org
Mon Feb 18 13:03:20 UTC 2013
Author: gabor
Date: Mon Feb 18 13:03:19 2013
New Revision: 41006
URL: http://svnweb.freebsd.org/changeset/doc/41006
Log:
- Fix rendering of Handbook with (Open)Jade
Modified:
projects/xml-tools/share/mk/doc.commands.mk
projects/xml-tools/share/mk/doc.docbook.mk
projects/xml-tools/share/xml/freebsd45.dtd
Modified: projects/xml-tools/share/mk/doc.commands.mk
==============================================================================
--- projects/xml-tools/share/mk/doc.commands.mk Mon Feb 18 11:40:31 2013 (r41005)
+++ projects/xml-tools/share/mk/doc.commands.mk Mon Feb 18 13:03:19 2013 (r41006)
@@ -70,9 +70,9 @@ HTML2TXT?= ${PREFIX}/bin/w3m
HTML2TXTOPTS?= -dump ${HTML2TXTFLAGS}
.if exists(${PREFIX}/bin/jade) && !defined(OPENJADE)
-JADE?= ${PREFIX}/bin/jade
+JADE?= ${ENV} SP_ENCODING=XML ${PREFIX}/bin/jade
.else
-JADE?= ${PREFIX}/bin/openjade
+JADE?= ${ENV} SP_ENCODING=XML ${PREFIX}/bin/openjade
JADEFLAGS+= -V openjade
.endif
@@ -93,7 +93,7 @@ TEX_CMD?= ${PREFIX}/bin/tex
PDFTEX_CMD?= ${PREFIX}/bin/pdftex
.endif
LATEX_CMD?= ${PREFIX}/bin/latex
-JADETEX_CMD?= ${TEX_CMD} "&jadetex"
+JADETEX_CMD?= ${PDFTEX_CMD} "&jadetex"
JADETEX_PREPROCESS?= /bin/cat
PDFJADETEX_CMD?=${PDFTEX_CMD} "&pdfjadetex"
PDFJADETEX_PREPROCESS?= /bin/cat
Modified: projects/xml-tools/share/mk/doc.docbook.mk
==============================================================================
--- projects/xml-tools/share/mk/doc.docbook.mk Mon Feb 18 11:40:31 2013 (r41005)
+++ projects/xml-tools/share/mk/doc.docbook.mk Mon Feb 18 13:03:19 2013 (r41006)
@@ -71,9 +71,6 @@
MASTERDOC?= ${.CURDIR}/${DOC}.xml
-# List of supported SP_ENCODINGs
-SP_ENCODING_LIST?= ISO-8859-2 KOI8-R
-
# Either jade or fop
RENDERENGINE?= jade
@@ -94,7 +91,8 @@ XSLFO?= ${DOC_PREFIX}/share/xsl/freebsd
IMAGES_LIB?=
-JADEOPTS?= -w no-valid ${JADEFLAGS} -D ${IMAGES_EN_DIR}/${DOC}s/${.CURDIR:T} -D ${CANONICALOBJDIR}
+JADEOPTS?= -ijade.compat -w no-valid ${JADEFLAGS} \
+ -D ${IMAGES_EN_DIR}/${DOC}s/${.CURDIR:T} -D ${CANONICALOBJDIR}
XSLTPROCOPTS?= --nonet
KNOWN_FORMATS= html html.tar html-split html-split.tar \
@@ -326,7 +324,14 @@ NO_RTF= yes
# Parsed XML -------------------------------------------------------
${DOC}.parsed.xml: ${SRCS}
- ${XMLLINT} --nonet --noent --valid --xinclude --dropdtd ${MASTERDOC} > ${.TARGET}
+ ${GREP} '^<?xml version=.*?>' ${DOC}.xml > ${.TARGET}
+.if ${DOC} == "book"
+ ${ECHO_CMD} '<!DOCTYPE book PUBLIC "-//FreeBSD//DTD DocBook XML V4.5-Based Extension//EN" "../../../share/xml/freebsd45.dtd">' >> ${.TARGET}
+.else
+ ${ECHO_CMD} '<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook XML V4.5-Based Extension//EN" "../../../share/xml/freebsd45.dtd">' >> ${.TARGET}
+.endif
+ ${XMLLINT} --nonet --noent --valid --xinclude --dropdtd ${MASTERDOC} | \
+ ${GREP} -v '^<?xml version=.*?>' >> ${.TARGET}
# XHTML -------------------------------------------------------------
Modified: projects/xml-tools/share/xml/freebsd45.dtd
==============================================================================
--- projects/xml-tools/share/xml/freebsd45.dtd Mon Feb 18 11:40:31 2013 (r41005)
+++ projects/xml-tools/share/xml/freebsd45.dtd Mon Feb 18 13:03:19 2013 (r41006)
@@ -3,7 +3,17 @@
<!ENTITY % output.print "IGNORE"> <!-- Print output is being generated -->
<!ENTITY % output.print.pdf "IGNORE"> <!-- PDF output -->
+<!-- XXX: Jade is given a totally parsed document with XML tools
+ so it does not need to pull in entity sets and catalogs
+ are only provided in XML format, yet this compatibility
+ nit is necessary otherwise it would look for the entity sets
+ and fail, lacking SGML catalogs.
+-->
<!ENTITY % jade.compat "IGNORE">
+<![%jade.compat;[
+<!ENTITY % freebsd.entities "IGNORE">
+]]>
+<!ENTITY % freebsd.entities "INCLUDE">
<!ENTITY % local.tech.char.class "|hostid|username|groupname|devicename|maketarget|makevar|svnref|xi:include">
@@ -41,6 +51,7 @@
"/usr/local/share/xml/docbook/4.5/docbookx.dtd">
%orig-docbook;
+<![%freebsd.entities;[
<!ENTITY % authors PUBLIC "-//FreeBSD//ENTITIES DocBook Author Entities//EN"
"authors.ent">
%authors;
@@ -52,6 +63,7 @@
<!ENTITY % orig-entities PUBLIC "-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//EN"
"entities.ent">
%orig-entities;
+]]>
<!ELEMENT hostid (%cptr.char.mix;)*>
<!ATTLIST hostid
More information about the svn-doc-projects
mailing list