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] Best practice in validating db5 with relax-ng?


Hi Francesco,

> 1) how I should validate a large document splitted in several files
> using MSV tools (relames.jar), as specified in the howto? Should I
> validate all the xml files separately or is there a way to do
> validating while processing XInclude directives (sample commands are
> largely appreciated)?

I can not recommend validating XML files separately. You can have
cross references (for example, xref) that point from one file into
another. These can not be resolved when you validate your files
seperately.

What I usually do is to resolve the XInclude elements through xmllint
(Options --postvalid --xinclude), create an intermediate DocBook5 XML
file and validate it with msv,  jing, ... 

From a practical point of view, it's a bit cumbersome to use two
tools just to validate a document. The best approach would be that 
all RELAX NG validators recognize and resolve XInclude elements 
themself. I don't know if such a solution exists. 


> 2) In general, should I perform always validating before any
> processing (XInclude and/or xslt)?

That depends. As mentioned above, XInclude processing should be
performed *before* validation. XSLT processing is normally done
*after* validation (if you want to transform your DocBook document
into HTML, PDF, ...)


> I've even an unrelated, probably OT, question: I appreciate the choice
> to move to relax-ng, but will ever come the time relax-ng schemas will
> be highly integrated with libxml2 tools like DTD schemas were? For
> example, I very liked the concept of "installing" schemas in
> /etx/xml/catalog . I'm pretty sure the success of Docbook+relax-ng is
> highly related to their integration with common tools you can find in
> any linux/*nix installation (xsltproc, xmllint, ...).

If I understood you right, I think it should be a matter of configuring
the correct entries in the XML catalog. The packager of your favorite
Linux distribution should create all the necessary parts. Maybe ask
the packager of your distribution?

For openSUSE we did it with the release candidates already, although I
think there is room for improvement. See here:

http://download.opensuse.org/repositories/home:/thomas-schraitle/openSUSE_10.3/
(unfortunately broken ATM due to hardware error, will be back soon)

Hope that helps,
Tom


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