svn commit: r39084 - projects/sgml2xml/share/mk
Gabor Kovesdan
gabor at FreeBSD.org
Thu Jun 21 15:48:59 UTC 2012
Author: gabor
Date: Thu Jun 21 15:48:59 2012
New Revision: 39084
URL: http://svn.freebsd.org/changeset/doc/39084
Log:
- Add XML declaration to Jade
- Use xmllint for validation
Approved by: doceng (implicit)
Modified:
projects/sgml2xml/share/mk/doc.docbook.mk
Modified: projects/sgml2xml/share/mk/doc.docbook.mk
==============================================================================
--- projects/sgml2xml/share/mk/doc.docbook.mk Thu Jun 21 15:47:17 2012 (r39083)
+++ projects/sgml2xml/share/mk/doc.docbook.mk Thu Jun 21 15:48:59 2012 (r39084)
@@ -129,16 +129,16 @@ STYLESHEET_TYPE?= dsssl
DSLHTML?= ${DOC_PREFIX}/share/sgml/spellcheck.dsl
.endif
+XMLLINT?= /usr/local/bin/xmllint
+XMLDECL?= /usr/local/share/sgml/docbook/dsssl/modular/dtds/decls/xml.dcl
+
.if exists(${PREFIX}/bin/jade) && !defined(OPENJADE)
JADE?= ${PREFIX}/bin/jade
JADECATALOG?= ${PREFIX}/share/sgml/jade/catalog
-NSGMLS?= ${PREFIX}/bin/nsgmls
-NSGMLSWARNINGS= -wempty -wunclosed
SX?= ${PREFIX}/bin/sx
.else
JADE?= ${PREFIX}/bin/openjade
JADECATALOG?= ${PREFIX}/share/sgml/openjade/catalog
-NSGMLS?= ${PREFIX}/bin/onsgmls
JADEFLAGS+= -V openjade
SX?= ${PREFIX}/bin/osx
.endif
@@ -519,7 +519,7 @@ index.html HTML.manifest: ${SRCS} ${LOCA
${LOCAL_IMAGES_TXT} ${HTML_SPLIT_INDEX} ${LOCAL_CSS_SHEET}
${GEN_INDEX_SGML_CMD}
${JADE_CMD} -V html-manifest ${HTMLOPTS} -ioutput.html.images \
- ${JADEOPTS} -t sgml ${MASTERDOC}
+ ${JADEOPTS} -t sgml ${XMLDECL} ${MASTERDOC}
.elif ${STYLESHEET_TYPE} == "xsl"
index.html: ${DOC}.xml ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} \
${HTML_SPLIT_INDEX} ${LOCAL_CSS_SHEET}
@@ -539,7 +539,7 @@ ${DOC}.html: ${SRCS} ${LOCAL_IMAGES_LIB}
${LOCAL_IMAGES_TXT} ${HTML_INDEX} ${LOCAL_CSS_SHEET}
${GEN_INDEX_SGML_CMD}
${JADE_CMD} -V nochunks ${HTMLOPTS} -ioutput.html.images \
- ${JADEOPTS} -t sgml ${MASTERDOC} > ${.TARGET} || \
+ ${JADEOPTS} -t sgml ${XMLDECL} ${MASTERDOC} > ${.TARGET} || \
(${RM} -f ${.TARGET} && false)
.elif ${STYLESHEET_TYPE} == "xsl"
${DOC}.html: ${DOC}.xml ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} \
@@ -560,7 +560,7 @@ ${DOC}.html: ${DOC}.xml ${LOCAL_IMAGES_L
${DOC}.html-text: ${SRCS} ${HTML_INDEX} ${LOCAL_IMAGES_TXT}
${GEN_INDEX_SGML_CMD}
${JADE_CMD} -V nochunks ${HTMLTXTOPTS} \
- ${JADEOPTS} -t sgml ${MASTERDOC} > ${.TARGET} || \
+ ${JADEOPTS} -t sgml ${XMLDECL} ${MASTERDOC} > ${.TARGET} || \
(${RM} -f ${.TARGET} && false)
.elif ${STYLESHEET_TYPE} == "xsl"
${DOC}.html-text: ${DOC}.xml ${HTML_INDEX}
@@ -620,7 +620,7 @@ ${DOC}.rtf: ${SRCS} ${LOCAL_IMAGES_EPS}
${LOCAL_IMAGES_TXT} ${LOCAL_IMAGES_PNG}
${GEN_INDEX_SGML_CMD}
${JADE_CMD} -V rtf-backend ${PRINTOPTS} -ioutput.rtf.images \
- ${JADEOPTS} -t rtf -o ${.TARGET}-nopng ${MASTERDOC}
+ ${JADEOPTS} -t rtf -o ${.TARGET}-nopng ${XMLDECL} ${MASTERDOC}
${FIXRTF} ${FIXRTFOPTS} < ${.TARGET}-nopng > ${.TARGET}
.else
${DOC}.rtf:
@@ -642,7 +642,7 @@ ${DOC}.tex: ${SRCS} ${LOCAL_IMAGES_EPS}
${LOCAL_IMAGES_TXT} ${LOCAL_IMAGES_EN}
${GEN_INDEX_SGML_CMD}
${JADE_CMD} -V tex-backend ${PRINTOPTS} \
- ${JADEOPTS} -t tex -o ${.TARGET} ${MASTERDOC}
+ ${JADEOPTS} -t tex -o ${.TARGET} ${XMLDECL} ${MASTERDOC}
${DOC}.tex-ps: ${DOC}.tex
${LN} -f ${.ALLSRC} ${.TARGET}
@@ -654,7 +654,7 @@ ${DOC}.tex-pdf: ${SRCS} ${IMAGES_PDF} ${
${RM} -f ${.TARGET}
${CAT} ${PDFTEX_DEF} > ${.TARGET}
${JADE_CMD} -V tex-backend ${PRINTOPTS} -ioutput.print.pdf \
- ${JADEOPTS} -t tex -o /dev/stdout ${MASTERDOC} >> ${.TARGET}
+ ${JADEOPTS} -t tex -o /dev/stdout ${XMLDECL} ${MASTERDOC} >> ${.TARGET}
.endif
.if !target(${DOC}.dvi)
@@ -735,8 +735,7 @@ ${DOC}.${_curformat}:
#
lint validate:
- ${NSGMLS} ${NSGMLSWARNINGS} -s ${NSGMLSFLAGS} ${SGMLFLAGS} ${CATALOGS} ${MASTERDOC}
-
+ @${XMLLINT} --nonet --noout --noent --valid ${MASTERDOC}
# ------------------------------------------------------------------------
#
@@ -754,12 +753,12 @@ lint validate:
${HTML_INDEX}: ${SRCS} ${LOCAL_IMAGES_TXT}
${INIT_INDEX_SGML_CMD}
${JADE_CMD} -V html-index -V nochunks ${HTMLOPTS} -ioutput.html.images \
- ${JADEOPTS} -t sgml ${MASTERDOC} > /dev/null
+ ${JADEOPTS} -t sgml ${XMLDECL} ${MASTERDOC} > /dev/null
${HTML_SPLIT_INDEX}: ${SRCS} ${LOCAL_IMAGES_TXT}
${INIT_INDEX_SGML_CMD}
${JADE_CMD} -V html-index ${HTMLOPTS} -ioutput.html.images \
- ${JADEOPTS} -t sgml ${MASTERDOC} > /dev/null
+ ${JADEOPTS} -t sgml ${XMLDECL} ${MASTERDOC} > /dev/null
.if !target(${PRINT_INDEX})
${PRINT_INDEX}: ${HTML_INDEX}
More information about the svn-doc-projects
mailing list