- Add support for RELAX NG validation since it is the normative DB 5.0
schema. The DTD validation still does a good job so there is no need to install Java; RNG validation is optional
This commit is contained in:
parent
6fa732ff1a
commit
a4722b0475
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/projects/db5/; revision=42133
3 changed files with 71 additions and 0 deletions
|
@ -69,6 +69,8 @@ HTML2PDBOPTS?= -y -d0 -Idef ${HTML2PDBFLAGS}
|
|||
HTML2TXT?= ${PREFIX}/bin/w3m
|
||||
HTML2TXTOPTS?= -dump ${HTML2TXTFLAGS}
|
||||
|
||||
JING?= ${PREFIX}/bin/jing
|
||||
|
||||
XMLLINT?= ${PREFIX}/bin/xmllint
|
||||
XSLTPROC?= ${PREFIX}/bin/xsltproc
|
||||
|
||||
|
|
|
@ -56,6 +56,8 @@
|
|||
|
||||
MASTERDOC?= ${.CURDIR}/${DOC}.xml
|
||||
|
||||
DB5RNC?= ${DOC_PREFIX}/share/xml/freebsd50.rnc
|
||||
|
||||
XSLPROF?= /usr/local/share/xsl/docbook-ns/profiling/profile.xsl
|
||||
XSLXHTML?= ${DOC_PREFIX}/${LANGCODE}/share/xsl/freebsd-xhtml.xsl
|
||||
XSLXHTMLCHUNK?= ${DOC_PREFIX}/${LANGCODE}/share/xsl/freebsd-xhtml-chunk.xsl
|
||||
|
@ -387,6 +389,10 @@ lint validate: ${SRCS} ${schxslts}
|
|||
false; \
|
||||
fi )
|
||||
.endfor
|
||||
.endif
|
||||
.if exists(${JING})
|
||||
@${ECHO} "==> Validating with RELAX NG"
|
||||
@${JING} -c ${DB5RNC} ${DOC}.parsed.xml
|
||||
.endif
|
||||
@${RM} -rf ${CLEANFILES} ${CLEANDIRS} ${DOC}.parsed.xml
|
||||
|
||||
|
|
63
share/xml/freebsd50.rnc
Normal file
63
share/xml/freebsd50.rnc
Normal file
|
@ -0,0 +1,63 @@
|
|||
default namespace db = "http://docbook.org/ns/docbook"
|
||||
|
||||
# $FreeBSD$
|
||||
|
||||
# ======================================================================
|
||||
|
||||
include "/usr/local/share/xml/docbook/5.0/rng/docbook.rnc" inherit = db {
|
||||
|
||||
# XXX: trademark not allowed in lineannotation in normal DocBook 5.0
|
||||
db.lineannotation =
|
||||
element lineannotation { db.lineannotation.attlist, (db._text | db.trademark)* }
|
||||
|
||||
# XXX: trademark not allowed in application in normal DocBook 5.0
|
||||
db.application =
|
||||
element application { db.application.attlist, (db._text | db.trademark)* }
|
||||
|
||||
# XXX: trademark not allowed in contrib in normal DocBook 5.0
|
||||
db.contrib =
|
||||
element contrib { db.contrib.attlist, (db._text | db.trademark)* }
|
||||
|
||||
# XXX: email not allowed in attribution in normal DocBook 5.0
|
||||
db.attribution =
|
||||
element attribution {
|
||||
db.attribution.attlist,
|
||||
(db._text
|
||||
| db.person
|
||||
| db.personname
|
||||
| db.citetitle
|
||||
| db.citation
|
||||
| db.email )*
|
||||
}
|
||||
|
||||
# FreeBSD extension: add buildtarget element to allowed inlines
|
||||
db.extension.inlines = db.buildtarget
|
||||
| db.revnumber
|
||||
# | db.trademark
|
||||
|
||||
|
||||
# FreeBSD extension: edition and releasetype profiling attributes
|
||||
db.effectivity.attributes =
|
||||
db.arch.attribute?
|
||||
& db.audience.attribute?
|
||||
& db.condition.attribute?
|
||||
& db.conformance.attribute?
|
||||
& db.os.attribute?
|
||||
& db.revision.attribute?
|
||||
& db.security.attribute?
|
||||
& db.userlevel.attribute?
|
||||
& db.vendor.attribute?
|
||||
& db.wordsize.attribute?
|
||||
& db.edition.attribute?
|
||||
& db.releasetype.attribute?
|
||||
}
|
||||
|
||||
# FreeBSD extension: buildtarget for make targets
|
||||
db.buildtarget = element buildtarget { (text | db.replaceable)* }
|
||||
|
||||
# FreeBSD extension: profiling attribute for edition (online, print)
|
||||
db.edition.attribute = attribute edition { text }
|
||||
|
||||
# FreeBSD extension: profiling attribute for release type (release,
|
||||
# current, snapshot)
|
||||
db.releasetype.attribute = attribute releasetype { text }
|
Loading…
Reference in a new issue