<div dir="ltr">Conclusion: I ran into problems invoking Xalan directly without it choking on the XIncludes, but getting FOP to do it was trivial. For those who follow: problem solved with something like<br><br>%FOP% -xml mydoc.xml -foout <a href="http://mydoc.fo">mydoc.fo</a> %DOCBKXSL%<br>
xep.bat -fo <a href="http://mydoc.fo">mydoc.fo</a> -pdf mydoc.pdf<br><br>Thanks for support...<br><br>Stephen<br><br><br><br><div class="gmail_quote">2008/8/21 Michael Bradbury <span dir="ltr">&lt;<a href="mailto:bradbury@renderx.com">bradbury@renderx.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello Stephen,<br>
<br>
I&#39;m not technical but I offer the following which was posted a few days ago:<br>
<br>
<br>
&gt; I have been trying to do a build file for ant using the xep tasks. See<br>
&gt; a small project zipped up on<br>
&gt; <a href="http://www.filejumbo.com/Download/2450CA55FE1455F1" target="_blank">http://www.filejumbo.com/Download/2450CA55FE1455F1</a><br>
&gt;<br>
&gt; I started out by changing the xep command line tool so it could handle<br>
&gt; xinclude. It needs to use a newer version of xerces with the xinclude<br>
&gt; parser configuration enabled, but because of the xml parser bundled<br>
&gt; with the JDK (old xerces), it needs to be in the endorsed directory.<br>
&gt; See this option below. I tried to get the old xerces inside the jdk to<br>
&gt; play along but that doesn&#39;t work with xinclude.<br>
&gt;<br>
&nbsp;started out by changing the xep command line tool so it could handle<br>
xinclude. It needs to use a newer version of xerces with the xinclude parser<br>
configuration enabled, but because of the xml parser bundled with the JDK<br>
(old xerces), it needs to be in the endorsed directory. See this option<br>
below. I tried to get the old xerces inside the jdk to play along but that<br>
doesn&#39;t work with xinclude.<br>
---- working ---<br>
#!/bin/sh<br>
<br>
# XEP command-line<br>
<br>
JAVA_HOME=&quot;/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home&quot;<br>
XEP_HOME=&quot;/Tools/XEP&quot;<br>
<br>
CP=&quot;/Users/tchristensen/.m2/repository/xerces/xercesImpl/2.8.1/xercesImpl-2.<br>
8.1.jar:$JAVA_HOME/lib/tools.jar:\<br>
$XEP_HOME/lib/xep.jar:\<br>
$XEP_HOME/lib/saxon.jar:\<br>
$XEP_HOME/lib/xt.jar&quot;<br>
<br>
&quot;$JAVA_HOME/bin/java&quot; \<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-classpath &quot;$CP&quot; \<br>
<br>
&quot;-Djava.endorsed.dirs=/Users/tchristensen/.m2/repository/xerces/xercesImpl/2<br>
.8.1&quot; \<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;-Dcom.renderx.xep.CONFIG=$XEP_HOME/xep.xml&quot; \<br>
<br>
&quot;-Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.par<br>
sers.XIncludeParserConfiguration&quot; \<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;com.renderx.xep.XSLDriver &quot;$@&quot;<br>
----- working ----<br>
<br>
The ant build file however doesn&#39;t work. It is set up to much the same way<br>
but it insists on using the xalan embedded in the jdk and fails with:<br>
<br>
ant docs:<br>
<br>
 &nbsp; &nbsp; [xep] [error] file:/target/lib/docbook-xsl-1.74.0/fo/table.xsl: line<br>
415: Attribute &#39;border-left-style&#39; outside of element.<br>
 &nbsp; &nbsp; [xep] [error] file:/target/lib/docbook-xsl-1.74.0/fo/table.xsl: line<br>
416: Attribute &#39;border-right-style&#39; outside of element.<br>
 &nbsp; &nbsp; [xep] [error] file:/target/lib/docbook-xsl-1.74.0/fo/table.xsl: line<br>
417: Attribute &#39;border-top-style&#39; outside of element.<br>
 &nbsp; &nbsp; [xep] [error] file:/target/lib/docbook-xsl-1.74.0/fo/table.xsl: line<br>
418: Attribute &#39;border-bottom-style&#39; outside of element.<br>
 &nbsp; &nbsp; [xep] [error] file:/target/lib/docbook-xsl-1.74.0/fo/index.xsl: line<br>
350: Attribute &#39;rx:key&#39; outside of element.<br>
 &nbsp; &nbsp; [xep] [error] The first argument to the non-static Java function<br>
&#39;insertCallouts&#39; is not a valid object reference.<br>
 &nbsp; &nbsp; [xep] [error] The first argument to the non-static Java function<br>
&#39;insertCallouts&#39; is not a valid object reference.<br>
 &nbsp; &nbsp; [xep] [error] The first argument to the non-static Java function<br>
&#39;highlight&#39; is not a valid object reference.<br>
 &nbsp; &nbsp; [xep] [error] Error checking type of the expression<br>
&#39;com.sun.org.apache.xalan.internal.xsltc.compiler.ApplyTemplates@ba5854&#39;.<br>
 &nbsp; &nbsp; [xep] [error] Could not compile stylesheet<br>
 &nbsp; &nbsp; [xep] [error] javax.xml.transform.TransformerConfigurationException:<br>
Could not compile stylesheet<br>
<br>
If I run it with the following:<br>
ant -lib ~/Tools/XEP/lib/saxon.jar:target/lib/xercesImpl-2.8.1.jar docs<br>
<br>
It does produce a pdf but we are back to the issue of xinclude:<br>
docs:<br>
 &nbsp; &nbsp; [xep] (document<br>
 &nbsp; &nbsp; [xep] [system-id<br>
file:/Users/tchristensen/Projects/tryouts/xeptest/src/index.xml]<br>
 &nbsp; &nbsp; [xep] Making portrait pages on USletter paper (8.5inx11in)<br>
 &nbsp; &nbsp; [xep] Element include in namespace &#39;<a href="http://www.w3.org/2001/XInclude" target="_blank">http://www.w3.org/2001/XInclude</a>&#39;<br>
encountered in article, but no template matches.<br>
 &nbsp; &nbsp; [xep] Element include in namespace &#39;<a href="http://www.w3.org/2001/XInclude" target="_blank">http://www.w3.org/2001/XInclude</a>&#39;<br>
encountered in article, but no template matches.<br>
<br>
I&#39;m running a Mac OS X 10.5 with Java 1.5.0_13.<br>
<br>
<br>
&gt;<br>
&gt; The ant build file however doesn&#39;t work. It is set up to much the same<br>
&gt; way but it insists on using the xalan embedded in the jdk and fails<br>
&gt; with:<br>
&gt;<br>
&gt; ...<br>
<br>
And the anwer provided was:<br>
<br>
<br>
The problem is that JVM has been already set its properties when started<br>
Ant.<br>
If you need to execute another Java application that overwrites some<br>
Java properties then the recommended way to do this is to use the &lt;java&gt;<br>
task with the &#39;fork&#39; attribute set to &#39;yes&#39;.<br>
<br>
Please note that you should add Ant lib directory into the classpath for<br>
the &quot;com.renderx.xepx.ant.XEPTask&quot; task.<br>
<br>
Another way is to launch Ant script with predefined Java arguments for<br>
XInclude support (but this is a hack, not a clean approach).<br>
<br>
<br>
Hoping the above helps. If not I suggest you post again to<br>
<a href="mailto:xep-support@renderx.com">xep-support@renderx.com</a> with more details of what you have changed in the<br>
xep.bat or xep.shell command.<br>
<br>
Best Regards,<br>
<br>
Michael Bradbury<br>
<a href="mailto:bradbury@renderx.com">bradbury@renderx.com</a><br>
<br>
<br>
<br>
<br>
<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:owner-xep-support@renderx.com">owner-xep-support@renderx.com</a> [mailto:<a href="mailto:owner-xep-support@renderx.com">owner-xep-support@renderx.com</a>]<br>
On Behalf Of Stephen Taylor<br>
Sent: Thursday, August 21, 2008 10:27 AM<br>
To: <a href="mailto:xep-support@renderx.com">xep-support@renderx.com</a><br>
Subject: [xep-support] Modular DocBook 5 documents using XInclude<br>
<br>
Can I use XEP to format modular DocBook V5 documents?<br>
<br>
These use XInclude rather than entity declarations. Apache FOP 0.95<br>
processes them, but XEP 4.13 objects:<br>
<br>
<br>
Element include in namespace . encountered in book, but no template matches.<br>
<br>
<br>
The only traffic I&#39;ve found on this list recommends modifying my call to XEP<br>
to<br>
<br>
<br>
* &nbsp; &nbsp; &nbsp; add xercesImpl.jar (from my FOP installation, I suppose) to the<br>
classpath<br>
* &nbsp; &nbsp; &nbsp; use option<br>
-Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.pars<br>
ers.XIncludeParserConfiguration<br>
<br>
This doesn&#39;t change the error report. What am I missing?<br>
<br>
Presumably I should be able to use Xalan for the XSLT and pipe the FO output<br>
to XEP? Is this a different line of attack?<br>
<br>
(I&#39;m running Java <a href="http://1.6.0.7" target="_blank">1.6.0.7</a>. I&#39;m considering switching from FOP to XEP in<br>
order to use figure floats and sidebars in my page designs.)<br>
<br>
Thanks in advance<br>
Stephen Taylor<br>
<br>
<br>
</blockquote></div><br></div>