Problems getting XInclude to work in eclipse plugin
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 2
- Joined: Wed Jan 30, 2008 7:55 pm
Problems getting XInclude to work in eclipse plugin
I am working with docbook documents. I need the XInclude to work, because the document is large.
Any idea how I can solve that issue?
I would dearly like to use your product (currently a trial license): the docbook editor makes a very good impression, and the plugin appears to be very stable. Great work.
Thanks in advance
/stefan
Code: Select all
I find many instructions, but somehow they all do not work. I understand that I need some module entry, I also find examples in your plugin distributions. What I do not see (probably because I never worked much with DTD, XML, XSL, etc) is how I can get that module into the system.
The example in the eclipse help system uses a relative path to get the XInclude.mod file. But that does not appeal to me, as that path may change on different users' machines.
So the question is how I get that xinclude.mod into my catalog file. Next question would be: which catalog file am I using / should I modify?
Likely my next problem: I tried to create a PDF file from my rudimentary docbook file without include (copy/paste approach). Then I got some FOP error saying:
[Saxon6.5.5] The process 'FOP' ended with code: 1.
The error was:
31.01.2008 11:20:09 org.apache.fop.hyphenation.Hyphenator getHyphenationTree
SCHWERWIEGEND: Couldn't find hyphenation pattern en
31.01.2008 11:20:10 org.apache.fop.cli.Main startFOP
SCHWERWIEGEND: Exception
net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: file:///C:/ec-ws33/gcap-fnportal-verification4/crud.oxygen/book.xml_xslt:11:-1: Error(11/-1): fo:wrapper is not a valid child element of fo:inline: An fo:inline that is a descendant of an fo:leader or fo:footnote may not have block-level children, unless it has a nearer ancestor that is an fo:inline-container.
at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
at org.apache.fop.cli.Main.startFOP(Main.java:166)
at org.apache.fop.cli.Main.main(Main.java:197)
I would dearly like to use your product (currently a trial license): the docbook editor makes a very good impression, and the plugin appears to be very stable. Great work.
Thanks in advance
/stefan
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Problems getting XInclude to work in eclipse plugin
Post by sorin_ristache »
Hello,
The URI http://www.docbook.org/xml/4.4/xinclude.mod is resolved with the predefined XML catalog which is enabled by default in Window -> Preferences -> oXygen -> XML -> XML Catalog -- Use default catalog (in oXygen standalone the path is: menu Options -> Preferences -> XML -> XML Catalog -- Use default catalog). You can see the file path of the default XML catalog under the checkbox Use default catalog. You can use it to map the reference to xinclude.mod to the local version of the file that comes with oXygen or to map other URLs to their local versions that come with oXygen but you should not edit it if you do not know exactly what you are doing. The recommended way to add your own XML catalog entries is to add a new XML catalog to the list of catalogs using the New button on the same Preferences page.
If you use a DocBook 5 XML document you do not have to include any module in order to have XInclude support because the DocBook 5 schema is a Relax NG schema with built-in XInclude support. You can see where it is located by looking at the predefined DocBook 5 document type in the Preferences dialog (menu Window -> Preferences -> oXygen -> Document Type Association -- DocBook 5): edit the DocBook 5 document type and look in the Schema tab of the Document Type dialog.
Does the predefined Docbook PDF scenario create the result file sampleXInclude.pdf successfully in your Eclipse installation from the sampleXInclude.xml file that I mentioned above without editing the predefined Docbook PDF scenario in any way? It does that on my computer.
Regards,
Sorin
If you edit DocBook 4 XML documents in oXygen just look at the file samples/docbook/v4/sampleXInclude.xml from the oXygen example XML project created in Eclipse from menu File -> New -> Other -> Sample XML project. (In oXygen standalone just look at the same file from the default oXygen project, called sample.xpr and located in the folder [oXygen-install-folder]/samples, that is the project loaded by default in oXygen when you start the application for the first time, and the next times if you do not change the current oXygen project). That file includes the xinclude.mod module with a URI resolved by the predefined oXygen XML catalog:sbo wrote:The example in the eclipse help system uses a relative path to get the XInclude.mod file. But that does not appeal to me, as that path may change on different users' machines.
So the question is how I get that xinclude.mod into my catalog file. Next question would be: which catalog file am I using / should I modify?
Code: Select all
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.docbook.org/xml/4.4/docbookx.dtd" [
<!ENTITY % xinclude SYSTEM "http://www.docbook.org/xml/4.4/xinclude.mod" >
%xinclude;
<!ENTITY % local.common.attrib "xml:base CDATA #IMPLIED" >
]>
If you use a DocBook 5 XML document you do not have to include any module in order to have XInclude support because the DocBook 5 schema is a Relax NG schema with built-in XInclude support. You can see where it is located by looking at the predefined DocBook 5 document type in the Preferences dialog (menu Window -> Preferences -> oXygen -> Document Type Association -- DocBook 5): edit the DocBook 5 document type and look in the Schema tab of the Document Type dialog.
What transformation scenario did you use? Did you try the predefined Docbook PDF scenario or did you create a custom scenario? If you created a custom scenario please specify the XSLT parameters of your scenario for which you modified the default values in the Configure Parameters dialog opened from the Parameters button of the scenario edit dialog.sbo wrote:Likely my next problem: I tried to create a PDF file from my rudimentary docbook file without include (copy/paste approach). Then I got some FOP error saying:
Does the predefined Docbook PDF scenario create the result file sampleXInclude.pdf successfully in your Eclipse installation from the sampleXInclude.xml file that I mentioned above without editing the predefined Docbook PDF scenario in any way? It does that on my computer.
Regards,
Sorin
-
- Posts: 2
- Joined: Wed Jan 30, 2008 7:55 pm
Re: Problems getting XInclude to work in eclipse plugin
Hi Sorin
Thanks a lot for the speedy reply. I am positively impressed.
It seems that my problem stems from the fact, that I did not declare the 'local.common.attrib' entity (some documentation I have read says that this entry would be needed by docbook versions older than 4.3). So I explicitly excluded the line from the sample, because I thought it would not be needed. My bad...
The FOP error appears to stem from some experimental passages using index entries (nested with other tags such as firstterm, primary, etc). The docbook validation did not report any error, but the FOP processor failed nevertheless, which I did not expect, thinking that a documented validated without errors would also produce value *.fo files, and consequently valid *.pdf files. Again, I probably have to lower my expectations...
I will play around with my sample book, trying one feature after the other (my learning phase).
Two questions I still have:
Would you recommend using docbook 5? I decided against it because the release is not yet official (or have I misread the information available to me, again?)
If I bought a standalone licence, would I also be able to use the eclipse plugin?
Thanks once more for your excellent support.
/sbo
Thanks a lot for the speedy reply. I am positively impressed.
It seems that my problem stems from the fact, that I did not declare the 'local.common.attrib' entity (some documentation I have read says that this entry would be needed by docbook versions older than 4.3). So I explicitly excluded the line from the sample, because I thought it would not be needed. My bad...
The FOP error appears to stem from some experimental passages using index entries (nested with other tags such as firstterm, primary, etc). The docbook validation did not report any error, but the FOP processor failed nevertheless, which I did not expect, thinking that a documented validated without errors would also produce value *.fo files, and consequently valid *.pdf files. Again, I probably have to lower my expectations...
I will play around with my sample book, trying one feature after the other (my learning phase).
Two questions I still have:
Would you recommend using docbook 5? I decided against it because the release is not yet official (or have I misread the information available to me, again?)
If I bought a standalone licence, would I also be able to use the eclipse plugin?
Thanks once more for your excellent support.
/sbo
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Problems getting XInclude to work in eclipse plugin
Post by sorin_ristache »
The OASIS DocBook 5 schema is still a Release Candidate (RC 7 as far as I know). The official DocBook 5 schema will be a Relax NG one, not a DTD as for DocBook 4 and this is what the DocBook experts recommend for the long term. The DocBook stylesheets work with both versions so if you do not have a special need for element or attribute modifications introduced by DocBook 5 you should be fine with DocBook 4.sbo wrote:Would you recommend using docbook 5? I decided against it because the release is not yet official (or have I misread the information available to me, again?)
sbo wrote:If I bought a standalone licence, would I also be able to use the eclipse plugin?
Yes, the licensed user is allowed to use his license key with any distribution of oXygen (standalone application, Eclipse plugin, WebStart application) as long as he is the only one using that license.
Regards,
Sorin
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service