nested XInclude

Having trouble installing Oxygen? Got a bug to report? Post it all here.
dnbrown
Posts: 5
Joined: Tue Mar 15, 2005 9:30 pm
Location: North Carolina

nested XInclude

Post by dnbrown »

I have a mutli-part document.. and have been using XInclude without a problem...

I am also able to transform each part/chapter/section without any errors..

I am now trying to break it up a little more and am attempting something like:

file1 = book include file2
file2 = include part (in file3 )
file3 = include chapter (in file4)

and I'm getting an error: Error attempting to parse XML file (href='xyz.abc.xml').

on the lowest level file. To me it seems to have something to do with the level of nesting of the XIncludes but I have been unable to confirm that. Again, I can validate each file separately without errors.

Any ideas?
Dennis
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

I created, validated and transformed to PDF successfully a DocBook document with 6 levels of XInclude nesting. It seems that you don't use the DocBook DTD module for XInclude that comes with <oXygen/>. This is necessary because Xerces does not provide XInclude builtin support. To accomplish this you must declare and use a parameter entity with this module in the DOCTYPE declaration of each part of your document which includes another one with XInclude, like this:

Code: Select all


<!ENTITY % xinclude SYSTEM "../../frameworks/docbook/dtd/xinclude.mod" >
%xinclude;
You can see an example in samples/docbook/sampleXInclude.xml. Also you must enable XInclude processing in Preferences -> XML Parser Options.

If that doesn't work please send us samples of all your document parts to support at oxygenxml dot com.

Regards,
Sorin
dnbrown
Posts: 5
Joined: Tue Mar 15, 2005 9:30 pm
Location: North Carolina

Post by dnbrown »

It works!!!

Thanks!!!!!
Dennis
Post Reply