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 08:08, Dew, Simon wrote:
Hi

Thanks for taking the time to look at this, Norm and Shaun.

On 12/12/2013 15:46, Shaun McCance wrote:

In my experience, this only happens when the wrapper element (info in
this case) is optional.

Okay. Well, the info section for a book can be a very big place to look
for errors.

You could still use xmllint to handle XInclude, outputting to a temp
file, and use jing for validation.

So, Alex Kleider, if you want helpful error messages, there's your
answer :-)

Although one of the nice things about using xmllint for the
whole shebang is that it internally tracks the file that elements come
from, and reports the actual file name and line number of the error
(when it gets the location of the error right).

It's also lightning fast. I do miss it sometimes.



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?

Alex

Simon Dew

Technical Author | Stanley Security Solutions
1 Park Gate Close, Bredbury, Stockport SK6 2SZ, U.K.

Simon.Dew@SBDInc.com | +44 (0) 161 406 3405
www.stanleysecuritysolutions.co.uk

Registered Office: Stanley House, Bramble Road, Swindon
Registered in England and Wales No. 181585 VAT No. 232 2446 95


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