XInclude causing problems with certain tags

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Djelibeybi
Posts: 9
Joined: Tue May 04, 2004 9:12 am

XInclude causing problems with certain tags

Post by Djelibeybi »

Hey gang,

I've got a weird thing happening with oXygen and I can't figure out what's going on. I have a technical manual I'm writing in DocBook, with each chapter and appendix as a separate XML file, which are all grouped together in a master XML file using <xi:include> tags.

If I produce HTML from the individual files, it transforms successfully. If I try to do the master XML file, I get the following error:

Code: Select all

SystemID: null
Description: E org.xml.sax.SAXParseException: Error attempting to parse XML file (href='chapters/ch03-static-html.xml').
This occurs at the first instance of a <programlisting> tag (or <literallayout> or <screen> or any other literal tag, it seems). I can't figure out for the life of me why its doing this, as each page transforms successfully by itself.

Any clues? Hints? Advice?
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

Oxygen has a sample DocBook with XInclude shipped with the 5.0 distribution:

samples/docbook/sampleXInclude.xml
samples/docbook/section1.xml
samples/docbook/section2.xml
samples/docbook/section2.xml


I edited section1.xml and added <programlisting>test</programlisting> inside para. The transformation works fine.

Please try to see if you have problems doing the same thing. Also make sure that the XInclude support is enabled (it is disabled by default), for that see the Options->Preferecese --- XML->XML Parser options --- Enable XInclude processing.

Another thing is to validate your master file before trying to transform it. See if you get any errors and if yes if they make sense.

Best Regards,
George
Djelibeybi
Posts: 9
Joined: Tue May 04, 2004 9:12 am

Post by Djelibeybi »

george wrote:I edited section1.xml and added <programlisting>test</programlisting> inside para. The transformation works fine.
Hmm.. seems to have been a DOCTYPE declaration error. I was using the 4.2 DTD from oasis.org and switching to the docbook.org one made the problem go away. That was the only difference I could see between the samples and my files.
Post Reply