OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook] xi:include problem


On 2013-12-12 23:50, davep wrote:
On 12/12/13 19:04, Alex Kleider wrote:



The problem (already aluded to in the thread from which I've spun off
this one) with
a) using xmllint to expand xIncludes
and then
b) validating with jing,
is that the validation must be done on the output of xmllint and when
jing reports an error it provides a location in the output file, but we
want to fix the problem in the original file.

The way I'm solving the problem is making each xIncluded file a valid
DocBook file and validating each included file before using xmllint and
then doing a final validation.  This restricts me to making each
xIncluded component an <article> since I think this is the lowest level
element that can be a valid DocBook.


Comments?  Are there better ways?


Sounds sensible, though if you just want to 'stop' and see the errors,
simply stop processing when (if) xmllint reports an error?

I do agree about the intermediate file being a nuisance though.


regards

I have figured out how to solve my problem. It's probably 'old news' to most but ...

I use the following script:
"""
if [ -n "$2" ];
then
    outfile="$2";
else
    outfile="/dev/stdout";
fi
infile=$1

rng=/usr/share/xml/docbook/schema/rng/5.0/docbook.rng

xmllint  --relaxng $rng --xinclude $infile > $outfile
"""



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]