Control: tags -1 +patch Hi Michael, Berlin BSP here.
Given that it's too late now to get a mallard-rng package into Stretch, I suggest to ship the mallard-1.0.rng file as part of the yelp-tools package for now (e.g. as /usr/share/yelp-tools/mallard/mallard-1.0.rng) and simply use that as relaxng schema in yelp-check: --- a/tools/yelp-check.in +++ b/tools/yelp-check.in @@ -931,46 +931,9 @@ } . yelp_validate_page () { - # Using temp files because pipes create subshells, making it really - # hard to return the right exit status in a portable way. - if [ "x$check_rng_dir" = "x" ]; then - check_rng_dir=`mktemp -d "${TMPDIR:-/tmp}"/yelp-XXXXXXXX` - fi check_out_file=`mktemp "${TMPDIR:-/tmp}"/yelp-XXXXXXXX` - check_rng_file=`( - echo '<xsl:stylesheet' - echo ' xmlns:cache="http://projectmallard.org/cache/1.0/"' - echo ' xmlns:xsl="http://www.w3.org/1999/XSL/Transform"' - echo ' version="1.0">' - echo '<xsl:output method="text"/>' - echo '<xsl:template match="/*">' - echo '<xsl:choose>' - echo '<xsl:when test="string(@version) != '"''"'">' - echo '<xsl:value-of select="@version"/>' - echo '</xsl:when>' - echo '<xsl:when test="/cache:cache">' - echo '<xsl:text>cache/1.0 1.0</xsl:text>' - echo '</xsl:when>' - echo '<xsl:otherwise>' - echo '<xsl:text>1.0</xsl:text>' - echo '</xsl:otherwise>' - echo '</xsl:choose>' - echo '</xsl:template>' - echo '</xsl:stylesheet>' - ) | xsltproc - "$1"` - check_rng_file=`urlencode "$check_rng_file" /`.rng - if [ ! -f "$check_rng_dir/$check_rng_file" ]; then - # If we've already made an RNG file for this version string, don't - # do it again. We've urlencoded the file name + slashes, because - # version strings often contain slashes. But xsltproc treats the - # -o option as a URL and urldecodes, so doubly urlencode, because - # we want the urlencoded string to be the on-disk name. - xsltproc -o "$check_rng_dir/"`urlencode "$check_rng_file"` \ - --param rng.strict "$check_strict" \ - --stringparam rng.strict.allow "$check_strict_allow" \ - "$xsl_mal_rng" "$1" - fi - xmllint --noout --xinclude --noent --relaxng "$check_rng_dir/$check_rng_file" "$1" > "$check_out_file" 2>&1 + check_rng_file="/usr/share/yelp-tools/mallard/mallard-1.0.rng" + xmllint --noout --xinclude --noent --relaxng "$check_rng_file" "$1" > "$check_out_file" 2>&1 ret="$?" cat "$check_out_file" | grep -v 'validates$' rm "$check_out_file" Do you want me to prepare an NMU or would you prefer to validate or improve upon the fix in some way? Florian